module ietf-eth-tran-types { /* TODO: FIXME */ yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-types"; prefix "etht-types"; organization "Internet Engineering Task Force (IETF) CCAMP WG"; contact " WG List: ID-draft editor: Haomian Zheng (zhenghaomian@huawei.com); Italo Busi (italo.busi@huawei.com); Aihua Guo (aihuaguo@huawei.com); Yunbin Xu (xuyunbin@ritt.cn); Yang Zhao (zhaoyangyjy@chinamobile.com); Xufeng Liu (Xufeng_Liu@jabil.com); Giuseppe Fioccola (giuseppe.fioccola@telecomitalia.it); "; description "This module defines the ETH transport types."; revision 2017-09-12 { description "Updeated version: Added bandwidth-profile-type "; } revision 2017-08-10 { description "Initial version"; } /* Identities */ identity eth-vlan-tag-type { description "ETH VLAN tag type."; } identity c-vlan-tag-type { base eth-vlan-tag-type; description "802.1Q Customer VLAN"; } identity s-vlan-tag-type { base eth-vlan-tag-type; description "802.1Q Service VLAN (QinQ)"; } identity service-classification-type { description "Service classification."; } identity port-classification { base service-classification-type; description "Port classification."; } identity vlan-classification { base service-classification-type; description "VLAN classification."; } identity eth-vlan-tag-classify { description "VLAN tag classification."; } identity classify-c-vlan { base eth-vlan-tag-classify; description "Classify 802.1Q Customer VLAN tag. Only C-tag type is accepted"; } identity classify-s-vlan { base eth-vlan-tag-classify; description "Classify 802.1Q Service VLAN (QinQ) tag. Only S-tag type is accepted"; } identity classify-s-or-c-vlan { base eth-vlan-tag-classify; description "Classify S-VLAN or C-VLAN tag-classify. Either tag is accepted"; } identity bandwidth-profile-type { description "Bandwidth Profile Types"; } identity mef-10-bwp { base bandwidth-profile-type; description "MEF 10 Bandwidth Profile"; } identity rfc-2697-bwp { base bandwidth-profile-type; description "RFC 2697 Bandwidth Profile"; } identity rfc-2698-bwp { base bandwidth-profile-type; description "RFC 2698 Bandwidth Profile"; } identity rfc-4115-bwp { base bandwidth-profile-type; description "RFC 4115 Bandwidth Profile"; } /* Type Definitions */ typedef eth-tag-type { type identityref { base eth-vlan-tag-type; } description "Identifies a specific ETH VLAN tag type."; } typedef eth-tag-classify { type identityref { base eth-vlan-tag-classify; } description "Identifies a specific VLAN tag classification."; } typedef vlanid { type uint16 { range "1..4094"; } description "The 12-bit VLAN-ID used in the VLAN Tag header."; } typedef vid-range-type { type string { pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)"; } description "A list of VLAN Ids, or non overlapping VLAN ranges, in ascending order, between 1 and 4094. This type is used to match an ordered list of VLAN Ids, or contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the range 1 to 4094, and included in the list in non overlapping ascending order. For example: 1,10-100,50,500-1000"; } typedef bandwidth-profile-type { type identityref { base bandwidth-profile-type; } description "Identifies a specific Bandwidth Profile type."; } /* Grouping Definitions */ grouping etht-bandwidth-profiles { description "Bandwidth profile configuration paramters."; leaf bandwidth-profile-name { type string; description "Name of the bandwidth profile."; } leaf bandwidth-profile-type { type etht-types:bandwidth-profile-type; description "The type of bandwidth profile."; } leaf CIR { type uint64; description "Committed Information Rate in Kbps"; } leaf CBS { type uint64; description "Committed Burst Size in in KBytes"; } leaf EIR { type uint64; /* Need to indicate that EIR is not supported by RFC 2697 must '../bw-profile-type = "mef-10-bwp" or ' + '../bw-profile-type = "rfc-2698-bwp" or ' + '../bw-profile-type = "rfc-4115-bwp"' must '../bw-profile-type != "rfc-2697-bwp"' */ description "Excess Information Rate in Kbps In case of RFC 2698, PIR = CIR + EIR"; } leaf EBS { type uint64; description "Excess Burst Size in KBytes. In case of RFC 2698, PBS = CBS + EBS"; } leaf color-aware { type boolean; description "Indicates weather the color-mode is color-aware or color-blind."; } leaf coupling-flag { type boolean; /* Need to indicate Coupling Flag is defined only for MEF 10 must '../bw-profile-type = "mef-10-bwp"' */ description "Coupling Flag."; } } }