Link state pass through configuration.
Version: 2020-03-09
module huawei-lpt { yang-version 1; namespace "urn:huawei:yang:huawei-lpt"; prefix lpt; import huawei-extension { prefix ext; } import huawei-l2vpn { prefix l2vpn; } import ietf-inet-types { prefix inet; } organization "Huawei Technologies Co., Ltd."; contact "Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: http://www.huawei.com Email: support@huawei.com"; description "Link state pass through configuration."; revision "2020-03-09" { description "Modify description."; reference "Huawei private."; } revision "2019-12-29" { description "Initial revision."; reference "Huawei private."; } ext:task-name "lpt"; typedef port-state { type enumeration { enum "up" { value 1; description "Port state is open."; } enum "down" { value 0; description "Port state is closed."; } } description "Port state."; } typedef fsm-state { type enumeration { enum "init" { value 0; description "Fsm state is init."; } enum "normal" { value 3; description "Fsm state is Normal."; } enum "network-fault" { value 2; description "Fsm state is network fault."; } enum "user-fault" { value 1; description "Fsm state is user fault."; } enum "resume-wait" { value 4; description "Fsm state is wait resume."; } enum "user-resume" { value 5; description "Fsm state is user resume."; } } description "Lpt Fsm State."; } typedef vc-type { type enumeration { enum "ethernet" { value 5; description "The vc type is ETHERNET."; } enum "vlan" { value 4; description "The vc type is VLAN."; } } description "Vc type."; } typedef net-carrier-type { type enumeration { enum "pw" { value 0; description "The UNI leaf type is PW."; } enum "qinq-link" { value 1; description "The UNI leaf type is QINQ."; } } description "The network side carrier type."; } typedef notification-mode-type { type enumeration { enum "lpt-mode" { value 0; description "LPT packet mode for fault transfer."; } enum "csf-mode" { value 1; description "CSF packet mode for fault transfer."; } } description "Packet mode for fault transfer."; } typedef oam-type { type enumeration { enum "lpt-oam" { value 1; description "LPT oam detection."; } enum "pw-oam" { value 2; description "PW oam detection."; } } description "Network side fault detection mode."; } grouping ptp-instance-paras { description "LPT p2p instance configuration."; leaf enable { type boolean; default "false"; description "Enable/disable LPT state."; } leaf recover-time { ext:operation-exclude "update|delete" { when "../enable = 'true'"; description "The 'recover-time' cannot be updated or deleted, when enable node is 'true'."; } type uint32 { range "1..600"; } units "s"; default "1"; description "Recovery time value."; } leaf hold-off-time { ext:operation-exclude "update|delete" { when "../enable = 'true'"; description "The 'hold-off-time' cannot be updated or deleted, when enable node is 'true'."; } type uint32 { range "0..10000"; } units "ms"; must "(../hold-off-time mod 100)=0"; default "1000"; description "Holdoff time value."; } leaf oam-period { ext:operation-exclude "update|delete" { when "../enable = 'true'"; description "The 'oam-period' cannot be updated or deleted, when enable node is 'true'."; } type uint32 { range "10..100"; } units "100 ms"; default "10"; description "OAM period value."; } } // grouping ptp-instance-paras grouping ptp-instance-state { description "LPT p2p instance state."; leaf net-carrier-type { type net-carrier-type; config false; description "The network side Carrier Type."; } leaf user-port-state { type port-state; config false; description "User side port status."; } leaf protocol-state { type fsm-state; default "normal"; config false; description "LPT protocol status."; } leaf local-fault { type boolean; default "false"; config false; description "Local user side fault."; } leaf net-fault { type boolean; default "false"; config false; description "Local network side fault."; } leaf remote-fault { type boolean; default "false"; config false; description "LPT remote instance fault."; } leaf notification-mode { type notification-mode-type; config false; description "Packet mode for fault transfer."; } leaf oam-type { type oam-type; config false; description "Network side fault detection mode."; } } // grouping ptp-instance-state augment /l2vpn:l2vpn/l2vpn:instances/l2vpn:instance/l2vpn:vpws-ldp/l2vpn:acs/l2vpn:ac { description "LPT in a AC interface."; container lpt { description "Configure LPT in a AC interface."; container ptp-instance { presence "Create a ptp instance."; description "Configure point to point instance of LPT."; uses ptp-instance-paras; leaf peer-ip { type inet:ipv4-address-no-zone; config false; description "Remote IP address."; } leaf vc-id { type uint32 { range "1..4294967295"; } config false; description "Virtual channel ID."; } leaf vc-type { type vc-type; config false; description "Virtual channel type."; } uses ptp-instance-state; } // container ptp-instance } // container lpt } } // module huawei-lpt
© 2023 YumaWorks, Inc. All rights reserved.