VLAN member interfaces and QinQ.
Version: 2021-08-12
module huawei-ethernet { yang-version 1; namespace "urn:huawei:yang:huawei-ethernet"; prefix ethernet; import huawei-pub-type { prefix pub-type; } import huawei-ifm { prefix ifm; } import huawei-vlan { prefix vlan; } import huawei-ip { prefix ip; } import huawei-extension { prefix ext; } 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 "VLAN member interfaces and QinQ."; revision "2021-08-12" { description "Modify description."; reference "Huawei private."; } revision "2020-05-14" { description "Modify leaf node qinq-vids's condition."; reference "Huawei private."; } revision "2020-03-09" { description "Modify description."; reference "Huawei private."; } revision "2019-04-23" { description "Initial revision."; reference "Huawei private."; } ext:task-name "ethernet"; typedef link-type { type enumeration { enum "access" { value 1; description "Access port that accepts packets without VLAN tags."; } enum "trunk" { value 2; description "Trunk port that accepts packets with VLAN tags."; } enum "hybrid" { value 3; description "Hybrid port that accepts packets with or without VLAN tags."; } enum "dot1qtunnel" { value 4; description "Dot1q tunnel port that accepts packets with double tags."; } } description "Ethernet link type."; } typedef enable-type { type enumeration { enum "disable" { value 0; description "Disable type."; } enum "enable" { value 1; description "Enable type."; } } description "Ethernet enable type definition."; } typedef tag-type { type enumeration { enum "none" { value 0; description "None type."; } enum "local-switch" { value 1; description "Enable local switching on a sub-interface for QinQ VLAN tag termination."; } enum "rt-protocol" { value 2; description "Enable the termination sub-interface to support routing protocols."; } } description "Tag type."; } typedef group-mode-type { type enumeration { enum "multiple" { value 1; description "Users of a VLAN group are considered as multiple users."; } enum "single" { value 2; description "Users of a VLAN group are considered one user."; } } description "The type of group mode."; } typedef pw-tag-mode { type enumeration { enum "null" { value 0; description "Null type."; } enum "outer-vlan" { value 1; description "Outer VLAN tag."; } enum "inner-vlan" { value 2; description "Inner VLAN tag."; } enum "user-define" { value 3; description "User definded."; } } description "The mode of pw tag."; } typedef policy-type { type enumeration { enum "8021p" { value 1; description "802.1p type."; } enum "dscp" { value 2; description "DSCP type."; } enum "pppoe" { value 3; description "Ethernet encapsulation type pppoe."; } enum "default" { value 4; description "Default type."; } } description "Policy Type."; } typedef remark-type { type enumeration { enum "precedence" { value 0; description "The remark type is the user-defined precedence."; } enum "trust-ce-8021p" { value 1; description "Trust the 802.1p in the inner VLAN tag."; } enum "trust-pe-8021p" { value 2; description "Trust the 802.1p in the outer VLAN tag."; } } description "Remark type."; } typedef symmetry-type { type enumeration { enum "asymmetry" { value 0; description "Asymmetry type."; } enum "symmetry" { value 1; description "Symmetry type."; } enum "transparent" { value 2; description "Transparent type."; } } description "Symmetry Type."; } typedef action-type { type enumeration { enum "pop-outer" { value 0; description "Pop the outer VLAN tag."; } enum "push1-layer" { value 1; description "Push one VLAN tag."; } enum "swap" { value 2; description "Swap the inner and outer VLAN tags."; } enum "map-offset-increase" { value 3; description "Offset increasing."; } enum "map-1-to-1" { value 4; description "Map one VLAN tag to a specified VLAN tag."; } enum "map-2-to-1" { value 5; description "Map two VLAN tags to a specified VLAN tag."; } enum "map-1-to-2" { value 6; description "Map one VLAN tag to two VLAN tags."; } enum "map-2-to-2" { value 7; description "Map two VLAN tags to two VLAN tags."; } enum "pop-double" { value 8; description "Pop double VLAN tags."; } enum "push2-layer" { value 9; description "Push two VLAN tags."; } enum "map-offset-decrease" { value 10; description "Offset decreasing."; } enum "map-single-outbound" { value 12; description "Map the pe-vid in outbound interface."; } } description "Traffic action type."; } rpc create-qinq-termination { ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:flow-type/ethernet:qinq-termination/ethernet:qinq-termination"; description "Enable QinQ VLAN tag termination on a sub-interface."; input { leaf interface-name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } mandatory true; description "Name of a sub-interface. For example, Ethernet 0/1/0.1."; } leaf pe-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start outer VLAN ID."; } leaf pe-vlan-end { type uint16 { range "1..4094"; } description "End outer VLAN ID."; } leaf ce-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start inner VLAN ID."; } leaf ce-vlan-end { type uint16 { range "1..4094"; } description "End inner VLAN ID."; } leaf group-id { type uint8 { range "1..16"; } description "Specified VLAN group ID."; } } } // rpc create-qinq-termination rpc delete-qinq-termination { ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:flow-type/ethernet:qinq-termination/ethernet:qinq-termination"; description "Disable QinQ VLAN tag termination on a sub-interface."; input { leaf interface-name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } mandatory true; description "Name of a sub-interface. For example, Ethernet 0/1/0.1."; } leaf pe-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start outer VLAN ID."; } leaf pe-vlan-end { type uint16 { range "1..4094"; } description "End outer VLAN ID."; } leaf ce-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start inner VLAN ID."; } leaf ce-vlan-end { type uint16 { range "1..4094"; } description "End inner VLAN ID."; } leaf group-id { type uint8 { range "1..16"; } description "Specified VLAN group ID."; } } } // rpc delete-qinq-termination rpc create-user-vlan-qinq { ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:flow-type/ethernet:user-vlan-comm/ethernet:user-vlan-common/ethernet:user-vlan-qinqs/ethernet:user-vlan-qinq"; description "Create User-VLAN QinQ."; input { leaf interface-name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } mandatory true; description "Name of a sub-interface. For example, Ethernet 0/1/0.1."; } leaf pe-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start outer VLAN ID."; } leaf pe-vlan-end { type uint16 { range "1..4094"; } description "End outer VLAN ID."; } leaf ce-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start inner VLAN ID."; } leaf ce-vlan-end { type uint16 { range "1..4094"; } description "End inner VLAN ID."; } } } // rpc create-user-vlan-qinq rpc delete-user-vlan-qinq { ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:flow-type/ethernet:user-vlan-comm/ethernet:user-vlan-common/ethernet:user-vlan-qinqs/ethernet:user-vlan-qinq"; description "Delete User-VLAN QinQ."; input { leaf interface-name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } mandatory true; description "Name of a sub-interface. For example, Ethernet 0/1/0.1."; } leaf pe-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start outer VLAN ID."; } leaf pe-vlan-end { type uint16 { range "1..4094"; } description "End outer VLAN ID."; } leaf ce-vlan-begin { type uint16 { range "1..4094"; } mandatory true; description "Start inner VLAN ID."; } leaf ce-vlan-end { type uint16 { range "1..4094"; } description "End inner VLAN ID."; } } } // rpc delete-user-vlan-qinq } // module huawei-ethernet
© 2023 YumaWorks, Inc. All rights reserved.