|
| 1 | +module ieee802-types { |
| 2 | + yang-version "1.1"; |
| 3 | + namespace urn:ieee:std:802.1Q:yang:ieee802-types; |
| 4 | + prefix ieee; |
| 5 | + organization |
| 6 | + "IEEE 802.1 Working Group"; |
| 7 | + contact |
| 8 | + "WG-URL: http://ieee802.org/1/ |
| 9 | + |
| 10 | +
|
| 11 | + Contact: IEEE 802.1 Working Group Chair |
| 12 | + Postal: C/O IEEE 802.1 Working Group |
| 13 | + IEEE Standards Association |
| 14 | + 445 Hoes Lane |
| 15 | + Piscataway, NJ 08854 |
| 16 | + USA |
| 17 | +
|
| 18 | + |
| 19 | + description |
| 20 | + "This module contains a collection of generally useful derived data |
| 21 | + types for IEEE YANG models. |
| 22 | +
|
| 23 | + Copyright (C) IEEE (2023). All rights reserved. |
| 24 | +
|
| 25 | + This version of this YANG module is part of IEEE Std 802.1Q; see the |
| 26 | + standard itself for full legal notices."; |
| 27 | + |
| 28 | + revision 2025-07-25 { |
| 29 | + description |
| 30 | + "Published as part of IEEE Std 802.1Q-202X. |
| 31 | +
|
| 32 | + The following reference statement identifies each referenced IEEE |
| 33 | + Standard as updated by applicable amendments."; |
| 34 | + reference |
| 35 | + "IEEE Std 802.1Q Bridges and Bridged Networks: |
| 36 | + IEEE Std 802.1Q-2022, IEEE Std 802.1Qcz-2023, IEEE Std 802.1Qcw-2023. |
| 37 | + IEEE Std 802 Overview and Architecture: |
| 38 | + IEEE Std 802-2014. |
| 39 | + IEEE 802.1AS Timing and Synchronization for Time-Sensitive Applications: |
| 40 | + IEEE Std 802.1AS-2020."; |
| 41 | + } |
| 42 | + revision 2023-10-22 { |
| 43 | + description |
| 44 | + "Published as part of IEEE Std 802.1Qcw-2023. |
| 45 | +
|
| 46 | + The following reference statement identifies each referenced IEEE |
| 47 | + Standard as updated by applicable amendments."; |
| 48 | + reference |
| 49 | + "IEEE Std 802.1Q Bridges and Bridged Networks: |
| 50 | + IEEE Std 802.1Q-2022, IEEE Std 802.1Qcz-2023, IEEE Std 802.1Qcw-2023. |
| 51 | + IEEE Std 802 Overview and Architecture: |
| 52 | + IEEE Std 802-2014. |
| 53 | + IEEE 802.1AS Timing and Synchronization for Time-Sensitive Applications: |
| 54 | + IEEE Std 802.1AS-2020."; |
| 55 | + } |
| 56 | + revision 2022-10-29 { |
| 57 | + description |
| 58 | + "Published as part of IEEE Std 802.1Q-2022."; |
| 59 | + reference |
| 60 | + "IEEE Std 802.1Q-2022, Bridges and Bridged Networks."; |
| 61 | + } |
| 62 | + revision 2022-03-16 { |
| 63 | + description |
| 64 | + "Published as part of IEEE Std 802.1ABcu."; |
| 65 | + reference |
| 66 | + "IEEE Std 802.1AB-2016"; |
| 67 | + } |
| 68 | + revision 2020-06-04 { |
| 69 | + description |
| 70 | + "Published as part of IEEE Std 802.1Qcx-2020. Second version."; |
| 71 | + reference |
| 72 | + "IEEE Std 802.1Qcx-2020, Bridges and Bridged Networks - YANG Data |
| 73 | + Model for Connectivity Fault Management."; |
| 74 | + } |
| 75 | + revision 2018-03-07 { |
| 76 | + description |
| 77 | + "Published as part of IEEE Std 802.1Q-2018. Initial version."; |
| 78 | + reference |
| 79 | + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; |
| 80 | + } |
| 81 | + typedef mac-address { |
| 82 | + type string { |
| 83 | + pattern "([0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5})|([0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5})"; |
| 84 | + } |
| 85 | + description |
| 86 | + "The mac-address type represents a MAC address in the canonical format |
| 87 | + and hexadecimal format specified by IEEE Std 802. The hexadecimal |
| 88 | + representation uses uppercase characters."; |
| 89 | + reference |
| 90 | + "3.1, 8.1 of IEEE Std 802"; |
| 91 | + } |
| 92 | + typedef chassis-id-subtype-type { |
| 93 | + type enumeration { |
| 94 | + enum chassis-component { |
| 95 | + value 1; |
| 96 | + description |
| 97 | + "Represents a chassis identifier based on the value of the |
| 98 | + entPhysicalAlias object (defined in IETF RFC 2737) for a chassis |
| 99 | + component (i.e., an entPhysicalClass value of chassis(3))."; |
| 100 | + } |
| 101 | + enum interface-alias { |
| 102 | + value 2; |
| 103 | + description |
| 104 | + "Represents a chassis identifier based on the value of the ifAlias |
| 105 | + object (defined in IETF RFC 2863) for an interface on the |
| 106 | + containing chassis."; |
| 107 | + } |
| 108 | + enum port-component { |
| 109 | + value 3; |
| 110 | + description |
| 111 | + "Represents a chassis identifier based on the value of the |
| 112 | + entPhysicalAlias object (defined in IETF RFC 2737) for a port or |
| 113 | + backplane component (i.e., entPhysicalClass value of port(10) or |
| 114 | + backplane(4)), within the containing chassis."; |
| 115 | + } |
| 116 | + enum mac-address { |
| 117 | + value 4; |
| 118 | + description |
| 119 | + "Represents a chassis identifier based on the value of a unicast |
| 120 | + source address (encoded in network byte order and IEEE 802.3 |
| 121 | + bit significance), of a port on the containing chassis as |
| 122 | + defined in IEEE Std 802."; |
| 123 | + } |
| 124 | + enum network-address { |
| 125 | + value 5; |
| 126 | + description |
| 127 | + "Represents a chassis identifier based on a network address, |
| 128 | + associated with a particular chassis. The encoded address is |
| 129 | + actually composed of two fields. The first field is a single |
| 130 | + octet, representing the IANA AddressFamilyNumbers value for the |
| 131 | + specific address type, and the second field is the network address |
| 132 | + value."; |
| 133 | + } |
| 134 | + enum interface-name { |
| 135 | + value 6; |
| 136 | + description |
| 137 | + "Represents a chassis identifier based on the value of the ifName |
| 138 | + object (defined in IETF RFC 2863) for an interface on the |
| 139 | + containing chassis."; |
| 140 | + } |
| 141 | + enum local { |
| 142 | + value 7; |
| 143 | + description |
| 144 | + "Represents a chassis identifier based on a locally defined value."; |
| 145 | + } |
| 146 | + } |
| 147 | + description |
| 148 | + "The source of a chassis identifier."; |
| 149 | + reference |
| 150 | + "IEEE Std 802 |
| 151 | + IETF RFC 2737 |
| 152 | + IETF RFC 2863"; |
| 153 | + } |
| 154 | + typedef chassis-id-type { |
| 155 | + type string { |
| 156 | + length "1..255"; |
| 157 | + } |
| 158 | + description |
| 159 | + "The format of a chassis identifier string. Objects of this type are |
| 160 | + always used with an associated chassis-id-subtype object, which |
| 161 | + identifies the format of the particular chassis-id object |
| 162 | + instance. |
| 163 | +
|
| 164 | + If the associated chassis-id-subtype object has a value of |
| 165 | + chassis-component, then the octet string identifies a particular |
| 166 | + instance of the entPhysicalAlias object (defined in IETF RFC 2737) for |
| 167 | + a chassis component (i.e., an entPhysicalClass value of chassis(3)). |
| 168 | +
|
| 169 | + If the associated chassis-id-subtype object has a value of |
| 170 | + interface-alias, then the octet string identifies a particular |
| 171 | + instance of the ifAlias object (defined in IETF RFC 2863) for an |
| 172 | + interface on the containing chassis. If the particular ifAlias object |
| 173 | + does not contain any values, another chassis identifier type should be |
| 174 | + used. |
| 175 | +
|
| 176 | + If the associated chassis-id-subtype object has a value of |
| 177 | + port-component, then the octet string identifies a particular instance |
| 178 | + of the entPhysicalAlias object (defined in IETF RFC 2737) for a port |
| 179 | + or backplane component within the containing chassis. |
| 180 | +
|
| 181 | + If the associated chassis-id-subtype object has a value of |
| 182 | + mac-address, then this string identifies a particular unicast source |
| 183 | + address (encoded in network byte order and IEEE 802.3 bit |
| 184 | + significance), of a port on the containing chassis as defined in |
| 185 | + IEEE Std 802. |
| 186 | +
|
| 187 | + If the associated chassis-id-subtype object has a value of |
| 188 | + network-address, then this string identifies a particular network |
| 189 | + address, encoded in network byte order, associated with one or more |
| 190 | + ports on the containing chassis. The first octet contains the IANA |
| 191 | + Address Family Numbers enumeration value for the specific address |
| 192 | + type, and octets 2 through N contain the network address value in |
| 193 | + network byte order. |
| 194 | +
|
| 195 | + If the associated chassis-id-subtype object has a value of |
| 196 | + interface-name, then the octet string identifies a particular instance |
| 197 | + of the ifName object (defined in IETF RFC 2863) for an interface on |
| 198 | + the containing chassis. If the particular ifName object does not |
| 199 | + contain any values, another chassis identifier type should be used. |
| 200 | +
|
| 201 | + If the associated chassis-id-subtype object has a value of local, |
| 202 | + then this string identifies a locally assigned Chassis ID."; |
| 203 | + reference |
| 204 | + "IEEE Std 802 |
| 205 | + IETF RFC 2737 |
| 206 | + IETF RFC 2863"; |
| 207 | + } |
| 208 | + typedef port-id-subtype-type { |
| 209 | + type enumeration { |
| 210 | + enum interface-alias { |
| 211 | + value 1; |
| 212 | + description |
| 213 | + "Represents a port identifier based on the ifAlias MIB object, |
| 214 | + defined in IETF RFC 2863."; |
| 215 | + } |
| 216 | + enum port-component { |
| 217 | + value 2; |
| 218 | + description |
| 219 | + "Represents a port identifier based on the value of |
| 220 | + entPhysicalAlias (defined in IETF RFC 2737) for a port component |
| 221 | + (i.e., entPhysicalClass value of port(10)), within the containing |
| 222 | + chassis."; |
| 223 | + } |
| 224 | + enum mac-address { |
| 225 | + value 3; |
| 226 | + description |
| 227 | + "Represents a port identifier based on a unicast source address |
| 228 | + (encoded in network byte order and IEEE 802.3 bit significance), |
| 229 | + which has been detected by the agent and associated with a |
| 230 | + particular port (IEEE Std 802)."; |
| 231 | + } |
| 232 | + enum network-address { |
| 233 | + value 4; |
| 234 | + description |
| 235 | + "Represents a port identifier based on a network address, detected |
| 236 | + by the agent and associated with a particular port."; |
| 237 | + } |
| 238 | + enum interface-name { |
| 239 | + value 5; |
| 240 | + description |
| 241 | + "Represents a port identifier based on the ifName MIB object, |
| 242 | + defined in IETF RFC 2863."; |
| 243 | + } |
| 244 | + enum agent-circuit-id { |
| 245 | + value 6; |
| 246 | + description |
| 247 | + "Represents a port identifier based on the agent-local identifier |
| 248 | + of the circuit (defined in RFC 3046), detected by the agent and |
| 249 | + associated with a particular port."; |
| 250 | + } |
| 251 | + enum local { |
| 252 | + value 7; |
| 253 | + description |
| 254 | + "Represents a port identifier based on a value locally assigned."; |
| 255 | + } |
| 256 | + } |
| 257 | + description |
| 258 | + "The source of a particular type of port identifier."; |
| 259 | + reference |
| 260 | + "IEEE Std 802 |
| 261 | + IETF RFC 2737 |
| 262 | + IETF RFC 2863 |
| 263 | + IETF RFC 3046"; |
| 264 | + } |
| 265 | + typedef port-id-type { |
| 266 | + type string { |
| 267 | + length "1..255"; |
| 268 | + } |
| 269 | + description |
| 270 | + "The format of a port identifier string. Objects of this type are |
| 271 | + always used with an associated port-id-subtype object, which |
| 272 | + identifies the format of the particular port-id object instance. |
| 273 | +
|
| 274 | + If the associated port-id-subtype object has a value of |
| 275 | + interface-alias, then the octet string identifies a particular |
| 276 | + instance of the ifAlias object (defined in IETF RFC 2863). If the |
| 277 | + particular ifAlias object does not contain any values, another port |
| 278 | + identifier type should be used. |
| 279 | +
|
| 280 | + If the associated port-id-subtype object has a value of |
| 281 | + port-component, then the octet string identifies a particular instance |
| 282 | + of the entPhysicalAlias object (defined in IETF RFC 2737) for a port |
| 283 | + or backplane component. |
| 284 | +
|
| 285 | + If the associated port-id-subtype object has a value of |
| 286 | + mac-address, then this string identifies a particular unicast source |
| 287 | + address (encoded in network byte order and IEEE 802.3 bit |
| 288 | + significance) associated with the port (IEEE Std 802). |
| 289 | +
|
| 290 | + If the associated port-id-subtype object has a value of |
| 291 | + network-address, then this string identifies a network address |
| 292 | + associated with the port. The first octet contains the IANA |
| 293 | + AddressFamilyNumbers enumeration value for the specific address type, |
| 294 | + and octets 2 through N contain the networkAddress address value in |
| 295 | + network byte order. |
| 296 | +
|
| 297 | + If the associated port-id-subtype object has a value of |
| 298 | + interface-name, then the octet string identifies a particular instance |
| 299 | + of the ifName object (defined in IETF RFC 2863). If the particular |
| 300 | + ifName object does not contain any values, another port identifier |
| 301 | + type should be used. |
| 302 | +
|
| 303 | + If the associated port-id-subtype object has a value of |
| 304 | + agent-circuit-id, then this string identifies a agent-local identifier |
| 305 | + of the circuit (defined in RFC 3046). |
| 306 | +
|
| 307 | + If the associated port-id-subtype object has a value of local, |
| 308 | + then this string identifies a locally assigned port ID."; |
| 309 | + reference |
| 310 | + "IEEE Std 802 |
| 311 | + IETF RFC 2737 |
| 312 | + IETF RFC 2863 |
| 313 | + IETF RFC 3046"; |
| 314 | + } |
| 315 | + grouping rational-grouping { |
| 316 | + description |
| 317 | + "Definition of a non-negative rational number."; |
| 318 | + leaf numerator { |
| 319 | + type uint32; |
| 320 | + description |
| 321 | + "Numerator of the rational number."; |
| 322 | + } |
| 323 | + leaf denominator { |
| 324 | + type uint32 { |
| 325 | + range "1..4294967295"; |
| 326 | + } |
| 327 | + description |
| 328 | + "Denominator of the rational number."; |
| 329 | + } |
| 330 | + } |
| 331 | + grouping ptp-time-grouping { |
| 332 | + description |
| 333 | + "This grouping specifies a PTP timestamp, represented as a 48-bit |
| 334 | + unsigned integer number of seconds and a 32-bit unsigned integer |
| 335 | + number of nanoseconds."; |
| 336 | + reference |
| 337 | + "6.4.3.4 of IEEE Std 802.1AS"; |
| 338 | + leaf seconds { |
| 339 | + type uint64; |
| 340 | + description |
| 341 | + "This is the integer portion of the timestamp in units of seconds. |
| 342 | + The upper 16 bits are always zero."; |
| 343 | + } |
| 344 | + leaf nanoseconds { |
| 345 | + type uint32; |
| 346 | + description |
| 347 | + "This is the fractional portion of the timestamp in units of |
| 348 | + nanoseconds. This value is always less than 10^9."; |
| 349 | + } |
| 350 | + } |
| 351 | +} |
0 commit comments