submodule dot1Q-types { belongs-to dot1Q { prefix dot1Q; } //import ieee-types { prefix ieee; } //import yang-types { prefix yang; } description "Common types used within dot1Q."; revision "2015-07-07" { description "Initial revision."; } typedef nameType { type string { length "0..32"; } } typedef portNumberType { type uint16 { range "0..4094"; } } typedef priorityType { type uint8 { range "0..7"; } } typedef vid-range { /* * Defines the type used to represent ranges of VLAN Ids. * * Ideally we would model that as a list of VLAN Ids in YANG, but * the model is easier to use if this is just represented as a * string. * * 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" * */ description "A list of VLAN Ids, or non overlapping VLAN ranges, in ascending order, between 1 and 4094"; type string { pattern "([0-9]{1,4}(-[0-9]{1,4})?(,[0-9]{1,4}" + "(-[0-9]{1,4})?)*)"; } } typedef componentCapabilityType { type bits { bit extended-filtering-services { position 0; } bit traffic-classes { position 1; } bit static-entry-individual-port { position 2; } bit ivl-capable { position 3; } bit svl-capable { position 4; } bit hybrid-capable { position 5; } bit configurable-pvid-tagging { position 6; } bit local-vlan-capable { position 7; } } } typedef pcpSelectionType { type enumeration { enum 8P0D; enum 7P1D; enum 6P2D; enum 5P3D; } } typedef serviceAccessPrioritySelectionType { type enumeration { enum enabled; enum disabled; } } typedef protocolTemplateFormatType { type enumeration { enum Ethernet; enum RFC1042; enum SNAP; enum LLC; } } typedef etherType { type string { pattern '[0-9a-fA-F]{2}-[0-9a-fA-F]{2}'; } } grouping priorityRegenerationTable { leaf priority0 { type priorityType; } leaf priority1 { type priorityType; } leaf priority2 { type priorityType; } leaf priority3 { type priorityType; } leaf priority4 { type priorityType; } leaf priority5 { type priorityType; } leaf priority6 { type priorityType; } leaf priority7 { type priorityType; } } grouping pcpDecodingTable { container pcp0 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } container pcp1 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } container pcp2 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } container pcp3 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } container pcp4 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } container pcp5 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } container pcp6 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } container pcp7 { leaf priority { type priorityType; } leaf drop-eligible { type boolean; } } } grouping pcpEncodingTable { container priority0 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } container priority1 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } container priority2 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } container priority3 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } container priority4 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } container priority5 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } container priority6 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } container priority7 { leaf pcp-dei-false { type priorityType; } leaf pcp-dei-true { type priorityType; } } } grouping serviceAccessPriorityTable { leaf priority0 { type priorityType; } leaf priority1 { type priorityType; } leaf priority2 { type priorityType; } leaf priority3 { type priorityType; } leaf priority4 { type priorityType; } leaf priority5 { type priorityType; } leaf priority6 { type priorityType; } leaf priority7 { type priorityType; } } grouping trafficClassTable { // To be defined } grouping portMap { list port-map { key "port-number"; leaf port-number { type portNumberType; } leaf map { // Need to work on this type enumeration { enum forward; enum filter; enum forward-filter; } } } } }