Khen Nursimulu | f8abbc9 | 2016-11-04 19:56:45 -0400 | [diff] [blame] | 1 | module openconfig-interfaces { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/interfaces"; |
| 7 | |
| 8 | prefix "oc-if"; |
| 9 | |
| 10 | // import some basic types |
| 11 | import ietf-interfaces { prefix ietf-if; } |
| 12 | import ietf-yang-types { prefix yang; } |
| 13 | import openconfig-extensions { prefix oc-ext; } |
| 14 | |
| 15 | // meta |
| 16 | organization "OpenConfig working group"; |
| 17 | |
| 18 | contact |
| 19 | "OpenConfig working group |
| 20 | netopenconfig@googlegroups.com"; |
| 21 | |
| 22 | description |
| 23 | "Model for managing network interfaces and subinterfaces. This |
| 24 | module also defines convenience types / groupings for other |
| 25 | models to create references to interfaces: |
| 26 | |
| 27 | base-interface-ref (type) - reference to a base interface |
| 28 | interface-ref (grouping) - container for reference to a |
| 29 | interface + subinterface |
| 30 | interface-ref-state (grouping) - container for read-only |
| 31 | (opstate) reference to interface + subinterface |
| 32 | |
| 33 | This model reuses data items defined in the IETF YANG model for |
| 34 | interfaces described by RFC 7223 with an alternate structure |
| 35 | (particularly for operational state data) and and with |
| 36 | additional configuration items."; |
| 37 | |
| 38 | oc-ext:openconfig-version "1.0.2"; |
| 39 | |
| 40 | revision "2016-05-26" { |
| 41 | description |
| 42 | "OpenConfig public release"; |
| 43 | reference "1.0.2"; |
| 44 | } |
| 45 | |
| 46 | |
| 47 | // typedef statements |
| 48 | |
| 49 | typedef base-interface-ref { |
| 50 | type leafref { |
| 51 | path "/oc-if:interfaces/oc-if:interface/oc-if:name"; |
| 52 | } |
| 53 | description |
| 54 | "Reusable type for by-name reference to a base interface. |
| 55 | This type may be used in cases where ability to reference |
| 56 | a subinterface is not required."; |
| 57 | } |
| 58 | |
| 59 | typedef interface-id { |
| 60 | type string; |
| 61 | description |
| 62 | "User-defined identifier for an interface, generally used to |
| 63 | name a interface reference. The id can be arbitrary but a |
| 64 | useful convention is to use a combination of base interface |
| 65 | name and subinterface index."; |
| 66 | } |
| 67 | |
| 68 | // grouping statements |
| 69 | |
| 70 | grouping interface-ref-common { |
| 71 | description |
| 72 | "Reference leafrefs to interface / subinterface"; |
| 73 | |
| 74 | leaf interface { |
| 75 | type leafref { |
| 76 | path "/oc-if:interfaces/oc-if:interface/oc-if:name"; |
| 77 | } |
| 78 | description |
| 79 | "Reference to a base interface. If a reference to a |
| 80 | subinterface is required, this leaf must be specified |
| 81 | to indicate the base interface."; |
| 82 | } |
| 83 | |
| 84 | leaf subinterface { |
| 85 | type leafref { |
| 86 | path "/oc-if:interfaces/" + |
| 87 | "oc-if:interface[oc-if:name=current()/../interface]/" + |
| 88 | "oc-if:subinterfaces/oc-if:subinterface/oc-if:index"; |
| 89 | } |
| 90 | description |
| 91 | "Reference to a subinterface -- this requires the base |
| 92 | interface to be specified using the interface leaf in |
| 93 | this container. If only a reference to a base interface |
| 94 | is requuired, this leaf should not be set."; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | grouping interface-ref-state-container { |
| 99 | description |
| 100 | "Reusable opstate w/container for a reference to an |
| 101 | interface or subinterface"; |
| 102 | |
| 103 | container state { |
| 104 | config false; |
| 105 | description |
| 106 | "Operational state for interface-ref"; |
| 107 | |
| 108 | uses interface-ref-common; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | grouping interface-ref { |
| 113 | description |
| 114 | "Reusable definition for a reference to an interface or |
| 115 | subinterface"; |
| 116 | |
| 117 | container interface-ref { |
| 118 | description |
| 119 | "Reference to an interface or subinterface"; |
| 120 | |
| 121 | container config { |
| 122 | description |
| 123 | "Configured reference to interface / subinterface"; |
| 124 | |
| 125 | uses interface-ref-common; |
| 126 | } |
| 127 | |
| 128 | uses interface-ref-state-container; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | grouping interface-ref-state { |
| 133 | description |
| 134 | "Reusable opstate w/container for a reference to an |
| 135 | interface or subinterface"; |
| 136 | |
| 137 | container interface-ref { |
| 138 | description |
| 139 | "Reference to an interface or subinterface"; |
| 140 | |
| 141 | uses interface-ref-state-container; |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | |
| 146 | grouping interface-common-config { |
| 147 | description |
| 148 | "Configuration data data nodes common to physical interfaces |
| 149 | and subinterfaces"; |
| 150 | |
| 151 | leaf name { |
| 152 | type string; |
| 153 | description |
| 154 | "[adapted from IETF interfaces model (RFC 7223)] |
| 155 | |
| 156 | The name of the interface. |
| 157 | |
| 158 | A device MAY restrict the allowed values for this leaf, |
| 159 | possibly depending on the type of the interface. |
| 160 | For system-controlled interfaces, this leaf is the |
| 161 | device-specific name of the interface. The 'config false' |
| 162 | list interfaces/interface[name]/state contains the currently |
| 163 | existing interfaces on the device. |
| 164 | |
| 165 | If a client tries to create configuration for a |
| 166 | system-controlled interface that is not present in the |
| 167 | corresponding state list, the server MAY reject |
| 168 | the request if the implementation does not support |
| 169 | pre-provisioning of interfaces or if the name refers to |
| 170 | an interface that can never exist in the system. A |
| 171 | NETCONF server MUST reply with an rpc-error with the |
| 172 | error-tag 'invalid-value' in this case. |
| 173 | |
| 174 | The IETF model in RFC 7223 provides YANG features for the |
| 175 | following (i.e., pre-provisioning and arbitrary-names), |
| 176 | however they are omitted here: |
| 177 | |
| 178 | If the device supports pre-provisioning of interface |
| 179 | configuration, the 'pre-provisioning' feature is |
| 180 | advertised. |
| 181 | |
| 182 | If the device allows arbitrarily named user-controlled |
| 183 | interfaces, the 'arbitrary-names' feature is advertised. |
| 184 | |
| 185 | When a configured user-controlled interface is created by |
| 186 | the system, it is instantiated with the same name in the |
| 187 | /interfaces/interface[name]/state list."; |
| 188 | reference |
| 189 | "RFC 7223: A YANG Data Model for Interface Management"; |
| 190 | } |
| 191 | |
| 192 | leaf description { |
| 193 | type string; |
| 194 | description |
| 195 | "[adapted from IETF interfaces model (RFC 7223)] |
| 196 | |
| 197 | A textual description of the interface. |
| 198 | |
| 199 | A server implementation MAY map this leaf to the ifAlias |
| 200 | MIB object. Such an implementation needs to use some |
| 201 | mechanism to handle the differences in size and characters |
| 202 | allowed between this leaf and ifAlias. The definition of |
| 203 | such a mechanism is outside the scope of this document. |
| 204 | |
| 205 | Since ifAlias is defined to be stored in non-volatile |
| 206 | storage, the MIB implementation MUST map ifAlias to the |
| 207 | value of 'description' in the persistently stored |
| 208 | datastore. |
| 209 | |
| 210 | Specifically, if the device supports ':startup', when |
| 211 | ifAlias is read the device MUST return the value of |
| 212 | 'description' in the 'startup' datastore, and when it is |
| 213 | written, it MUST be written to the 'running' and 'startup' |
| 214 | datastores. Note that it is up to the implementation to |
| 215 | |
| 216 | decide whether to modify this single leaf in 'startup' or |
| 217 | perform an implicit copy-config from 'running' to |
| 218 | 'startup'. |
| 219 | |
| 220 | If the device does not support ':startup', ifAlias MUST |
| 221 | be mapped to the 'description' leaf in the 'running' |
| 222 | datastore."; |
| 223 | reference |
| 224 | "RFC 2863: The Interfaces Group MIB - ifAlias"; |
| 225 | } |
| 226 | |
| 227 | leaf enabled { |
| 228 | type boolean; |
| 229 | default "true"; |
| 230 | description |
| 231 | "[adapted from IETF interfaces model (RFC 7223)] |
| 232 | |
| 233 | This leaf contains the configured, desired state of the |
| 234 | interface. |
| 235 | |
| 236 | Systems that implement the IF-MIB use the value of this |
| 237 | leaf in the 'running' datastore to set |
| 238 | IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry |
| 239 | has been initialized, as described in RFC 2863. |
| 240 | |
| 241 | Changes in this leaf in the 'running' datastore are |
| 242 | reflected in ifAdminStatus, but if ifAdminStatus is |
| 243 | changed over SNMP, this leaf is not affected."; |
| 244 | reference |
| 245 | "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; |
| 246 | } |
| 247 | |
| 248 | } |
| 249 | |
| 250 | grouping interface-phys-config { |
| 251 | description |
| 252 | "Configuration data for physical interfaces"; |
| 253 | |
| 254 | leaf type { |
| 255 | type identityref { |
| 256 | base ietf-if:interface-type; |
| 257 | } |
| 258 | mandatory true; |
| 259 | description |
| 260 | "[adapted from IETF interfaces model (RFC 7223)] |
| 261 | |
| 262 | The type of the interface. |
| 263 | |
| 264 | When an interface entry is created, a server MAY |
| 265 | initialize the type leaf with a valid value, e.g., if it |
| 266 | is possible to derive the type from the name of the |
| 267 | interface. |
| 268 | |
| 269 | If a client tries to set the type of an interface to a |
| 270 | value that can never be used by the system, e.g., if the |
| 271 | type is not supported or if the type does not match the |
| 272 | name of the interface, the server MUST reject the request. |
| 273 | A NETCONF server MUST reply with an rpc-error with the |
| 274 | error-tag 'invalid-value' in this case."; |
| 275 | reference |
| 276 | "RFC 2863: The Interfaces Group MIB - ifType"; |
| 277 | } |
| 278 | |
| 279 | leaf mtu { |
| 280 | type uint16; |
| 281 | description |
| 282 | "Set the max transmission unit size in octets |
| 283 | for the physical interface. If this is not set, the mtu is |
| 284 | set to the operational default -- e.g., 1514 bytes on an |
| 285 | Ethernet interface."; |
| 286 | } |
| 287 | |
| 288 | uses interface-common-config; |
| 289 | } |
| 290 | |
| 291 | grouping interface-phys-holdtime-config { |
| 292 | description |
| 293 | "Configuration data for interface hold-time settings -- |
| 294 | applies to physical interfaces."; |
| 295 | |
| 296 | leaf up { |
| 297 | type uint32; |
| 298 | units milliseconds; |
| 299 | default 0; |
| 300 | description |
| 301 | "Dampens advertisement when the interface |
| 302 | transitions from down to up. A zero value means dampening |
| 303 | is turned off, i.e., immediate notification."; |
| 304 | } |
| 305 | |
| 306 | leaf down { |
| 307 | type uint32; |
| 308 | units milliseconds; |
| 309 | default 0; |
| 310 | description |
| 311 | "Dampens advertisement when the interface transitions from |
| 312 | up to down. A zero value means dampening is turned off, |
| 313 | i.e., immediate notification."; |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | grouping interface-phys-holdtime-state { |
| 318 | description |
| 319 | "Operational state data for interface hold-time."; |
| 320 | } |
| 321 | |
| 322 | grouping interface-phys-holdtime-top { |
| 323 | description |
| 324 | "Top-level grouping for setting link transition |
| 325 | dampening on physical and other types of interfaces."; |
| 326 | |
| 327 | container hold-time { |
| 328 | description |
| 329 | "Top-level container for hold-time settings to enable |
| 330 | dampening advertisements of interface transitions."; |
| 331 | |
| 332 | container config { |
| 333 | description |
| 334 | "Configuration data for interface hold-time settings."; |
| 335 | |
| 336 | uses interface-phys-holdtime-config; |
| 337 | } |
| 338 | |
| 339 | container state { |
| 340 | |
| 341 | config false; |
| 342 | |
| 343 | description |
| 344 | "Operational state data for interface hold-time."; |
| 345 | |
| 346 | uses interface-phys-holdtime-config; |
| 347 | uses interface-phys-holdtime-state; |
| 348 | } |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | grouping interface-common-state { |
| 353 | description |
| 354 | "Operational state data (in addition to intended configuration) |
| 355 | at the global level for this interface"; |
| 356 | |
| 357 | leaf ifindex { |
| 358 | type uint32; |
| 359 | description |
| 360 | "System assigned number for each interface. Corresponds to |
| 361 | ifIndex object in SNMP Interface MIB"; |
| 362 | reference |
| 363 | "RFC 2863 - The Interfaces Group MIB"; |
| 364 | } |
| 365 | |
| 366 | leaf admin-status { |
| 367 | type enumeration { |
| 368 | enum UP { |
| 369 | description |
| 370 | "Ready to pass packets."; |
| 371 | } |
| 372 | enum DOWN { |
| 373 | description |
| 374 | "Not ready to pass packets and not in some test mode."; |
| 375 | } |
| 376 | enum TESTING { |
| 377 | //TODO: This is generally not supported as a configured |
| 378 | //admin state, though it's in the standard interfaces MIB. |
| 379 | //Consider removing it. |
| 380 | description |
| 381 | "In some test mode."; |
| 382 | } |
| 383 | } |
| 384 | //TODO:consider converting to an identity to have the |
| 385 | //flexibility to remove some values defined by RFC 7223 that |
| 386 | //are not used or not implemented consistently. |
| 387 | mandatory true; |
| 388 | description |
| 389 | "[adapted from IETF interfaces model (RFC 7223)] |
| 390 | |
| 391 | The desired state of the interface. In RFC 7223 this leaf |
| 392 | has the same read semantics as ifAdminStatus. Here, it |
| 393 | reflects the administrative state as set by enabling or |
| 394 | disabling the interface."; |
| 395 | reference |
| 396 | "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; |
| 397 | } |
| 398 | |
| 399 | leaf oper-status { |
| 400 | type enumeration { |
| 401 | enum UP { |
| 402 | value 1; |
| 403 | description |
| 404 | "Ready to pass packets."; |
| 405 | } |
| 406 | enum DOWN { |
| 407 | value 2; |
| 408 | description |
| 409 | "The interface does not pass any packets."; |
| 410 | } |
| 411 | enum TESTING { |
| 412 | value 3; |
| 413 | description |
| 414 | "In some test mode. No operational packets can |
| 415 | be passed."; |
| 416 | } |
| 417 | enum UNKNOWN { |
| 418 | value 4; |
| 419 | description |
| 420 | "Status cannot be determined for some reason."; |
| 421 | } |
| 422 | enum DORMANT { |
| 423 | value 5; |
| 424 | description |
| 425 | "Waiting for some external event."; |
| 426 | } |
| 427 | enum NOT_PRESENT { |
| 428 | value 6; |
| 429 | description |
| 430 | "Some component (typically hardware) is missing."; |
| 431 | } |
| 432 | enum LOWER_LAYER_DOWN { |
| 433 | value 7; |
| 434 | description |
| 435 | "Down due to state of lower-layer interface(s)."; |
| 436 | } |
| 437 | } |
| 438 | //TODO:consider converting to an identity to have the |
| 439 | //flexibility to remove some values defined by RFC 7223 that |
| 440 | //are not used or not implemented consistently. |
| 441 | mandatory true; |
| 442 | description |
| 443 | "[adapted from IETF interfaces model (RFC 7223)] |
| 444 | |
| 445 | The current operational state of the interface. |
| 446 | |
| 447 | This leaf has the same semantics as ifOperStatus."; |
| 448 | reference |
| 449 | "RFC 2863: The Interfaces Group MIB - ifOperStatus"; |
| 450 | } |
| 451 | |
| 452 | leaf last-change { |
| 453 | type yang:timeticks; |
| 454 | description |
| 455 | "Date and time of the last state change of the interface |
| 456 | (e.g., up-to-down transition). This corresponds to the |
| 457 | ifLastChange object in the standard interface MIB."; |
| 458 | reference |
| 459 | "RFC 2863: The Interfaces Group MIB - ifLastChange"; |
| 460 | } |
| 461 | |
| 462 | } |
| 463 | |
| 464 | |
| 465 | grouping interface-counters-state { |
| 466 | description |
| 467 | "Operational state representing interface counters |
| 468 | and statistics. Some of these are adapted from RFC 7223"; |
| 469 | |
| 470 | //TODO: we may need to break this list of counters into those |
| 471 | //that would appear for physical vs. subinterface or logical |
| 472 | //interfaces. For now, just replicating the full stats |
| 473 | //grouping to both interface and subinterface. |
| 474 | |
| 475 | container counters { |
| 476 | description |
| 477 | "A collection of interface-related statistics objects."; |
| 478 | |
| 479 | reference |
| 480 | "RFC 7223 - A YANG Data Model for Interface |
| 481 | Management"; |
| 482 | |
| 483 | leaf in-octets { |
| 484 | type yang:counter64; |
| 485 | description |
| 486 | "[adapted from IETF interfaces model (RFC 7223)] |
| 487 | |
| 488 | The total number of octets received on the interface, |
| 489 | including framing characters. |
| 490 | |
| 491 | Discontinuities in the value of this counter can occur |
| 492 | at re-initialization of the management system, and at |
| 493 | other times as indicated by the value of |
| 494 | 'discontinuity-time'."; |
| 495 | reference |
| 496 | "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; |
| 497 | } |
| 498 | |
| 499 | leaf in-unicast-pkts { |
| 500 | type yang:counter64; |
| 501 | description |
| 502 | "[adapted from IETF interfaces model (RFC 7223)] |
| 503 | |
| 504 | The number of packets, delivered by this sub-layer to a |
| 505 | higher (sub-)layer, that were not addressed to a |
| 506 | multicast or broadcast address at this sub-layer. |
| 507 | |
| 508 | Discontinuities in the value of this counter can occur |
| 509 | at re-initialization of the management system, and at |
| 510 | other times as indicated by the value of |
| 511 | 'discontinuity-time'."; |
| 512 | reference |
| 513 | "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; |
| 514 | } |
| 515 | |
| 516 | leaf in-broadcast-pkts { |
| 517 | type yang:counter64; |
| 518 | description |
| 519 | "[adapted from IETF interfaces model (RFC 7223)] |
| 520 | |
| 521 | The number of packets, delivered by this sub-layer to a |
| 522 | higher (sub-)layer, that were addressed to a broadcast |
| 523 | address at this sub-layer. |
| 524 | |
| 525 | Discontinuities in the value of this counter can occur |
| 526 | at re-initialization of the management system, and at |
| 527 | other times as indicated by the value of |
| 528 | 'discontinuity-time'."; |
| 529 | reference |
| 530 | "RFC 2863: The Interfaces Group MIB - |
| 531 | ifHCInBroadcastPkts"; |
| 532 | } |
| 533 | |
| 534 | leaf in-multicast-pkts { |
| 535 | type yang:counter64; |
| 536 | description |
| 537 | "[adapted from IETF interfaces model (RFC 7223)] |
| 538 | |
| 539 | |
| 540 | The number of packets, delivered by this sub-layer to a |
| 541 | higher (sub-)layer, that were addressed to a multicast |
| 542 | address at this sub-layer. For a MAC-layer protocol, |
| 543 | this includes both Group and Functional addresses. |
| 544 | |
| 545 | Discontinuities in the value of this counter can occur |
| 546 | at re-initialization of the management system, and at |
| 547 | other times as indicated by the value of |
| 548 | 'discontinuity-time'."; |
| 549 | reference |
| 550 | "RFC 2863: The Interfaces Group MIB - |
| 551 | ifHCInMulticastPkts"; |
| 552 | } |
| 553 | |
| 554 | leaf in-discards { |
| 555 | type yang:counter64; |
| 556 | description |
| 557 | "[adapted from IETF interfaces model (RFC 7223)] |
| 558 | Changed the counter type to counter64. |
| 559 | |
| 560 | The number of inbound packets that were chosen to be |
| 561 | discarded even though no errors had been detected to |
| 562 | prevent their being deliverable to a higher-layer |
| 563 | protocol. One possible reason for discarding such a |
| 564 | packet could be to free up buffer space. |
| 565 | |
| 566 | Discontinuities in the value of this counter can occur |
| 567 | at re-initialization of the management system, and at |
| 568 | other times as indicated by the value of |
| 569 | 'discontinuity-time'."; |
| 570 | |
| 571 | |
| 572 | reference |
| 573 | "RFC 2863: The Interfaces Group MIB - ifInDiscards"; |
| 574 | } |
| 575 | |
| 576 | leaf in-errors { |
| 577 | type yang:counter64; |
| 578 | description |
| 579 | "[adapted from IETF interfaces model (RFC 7223)] |
| 580 | Changed the counter type to counter64. |
| 581 | |
| 582 | For packet-oriented interfaces, the number of inbound |
| 583 | packets that contained errors preventing them from being |
| 584 | deliverable to a higher-layer protocol. For character- |
| 585 | oriented or fixed-length interfaces, the number of |
| 586 | inbound transmission units that contained errors |
| 587 | preventing them from being deliverable to a higher-layer |
| 588 | protocol. |
| 589 | |
| 590 | Discontinuities in the value of this counter can occur |
| 591 | at re-initialization of the management system, and at |
| 592 | other times as indicated by the value of |
| 593 | 'discontinuity-time'."; |
| 594 | reference |
| 595 | "RFC 2863: The Interfaces Group MIB - ifInErrors"; |
| 596 | } |
| 597 | |
| 598 | leaf in-unknown-protos { |
| 599 | type yang:counter32; |
| 600 | description |
| 601 | "[adapted from IETF interfaces model (RFC 7223)] |
| 602 | Changed the counter type to counter64. |
| 603 | |
| 604 | For packet-oriented interfaces, the number of packets |
| 605 | received via the interface that were discarded because |
| 606 | of an unknown or unsupported protocol. For |
| 607 | character-oriented or fixed-length interfaces that |
| 608 | support protocol multiplexing, the number of |
| 609 | transmission units received via the interface that were |
| 610 | discarded because of an unknown or unsupported protocol. |
| 611 | For any interface that does not support protocol |
| 612 | multiplexing, this counter is not present. |
| 613 | |
| 614 | Discontinuities in the value of this counter can occur |
| 615 | at re-initialization of the management system, and at |
| 616 | other times as indicated by the value of |
| 617 | 'discontinuity-time'."; |
| 618 | reference |
| 619 | "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; |
| 620 | } |
| 621 | |
| 622 | leaf out-octets { |
| 623 | type yang:counter64; |
| 624 | description |
| 625 | "[adapted from IETF interfaces model (RFC 7223)] |
| 626 | Changed the counter type to counter64. |
| 627 | |
| 628 | The total number of octets transmitted out of the |
| 629 | interface, including framing characters. |
| 630 | |
| 631 | Discontinuities in the value of this counter can occur |
| 632 | at re-initialization of the management system, and at |
| 633 | other times as indicated by the value of |
| 634 | 'discontinuity-time'."; |
| 635 | reference |
| 636 | "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; |
| 637 | } |
| 638 | |
| 639 | leaf out-unicast-pkts { |
| 640 | type yang:counter64; |
| 641 | description |
| 642 | "[adapted from IETF interfaces model (RFC 7223)] |
| 643 | |
| 644 | The total number of packets that higher-level protocols |
| 645 | requested be transmitted, and that were not addressed |
| 646 | to a multicast or broadcast address at this sub-layer, |
| 647 | including those that were discarded or not sent. |
| 648 | |
| 649 | Discontinuities in the value of this counter can occur |
| 650 | at re-initialization of the management system, and at |
| 651 | other times as indicated by the value of |
| 652 | 'discontinuity-time'."; |
| 653 | reference |
| 654 | "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; |
| 655 | } |
| 656 | |
| 657 | leaf out-broadcast-pkts { |
| 658 | type yang:counter64; |
| 659 | description |
| 660 | "[adapted from IETF interfaces model (RFC 7223)] |
| 661 | |
| 662 | The total number of packets that higher-level protocols |
| 663 | requested be transmitted, and that were addressed to a |
| 664 | broadcast address at this sub-layer, including those |
| 665 | that were discarded or not sent. |
| 666 | |
| 667 | Discontinuities in the value of this counter can occur |
| 668 | at re-initialization of the management system, and at |
| 669 | other times as indicated by the value of |
| 670 | 'discontinuity-time'."; |
| 671 | reference |
| 672 | "RFC 2863: The Interfaces Group MIB - |
| 673 | ifHCOutBroadcastPkts"; |
| 674 | } |
| 675 | |
| 676 | |
| 677 | leaf out-multicast-pkts { |
| 678 | type yang:counter64; |
| 679 | description |
| 680 | "[adapted from IETF interfaces model (RFC 7223)] |
| 681 | Changed the counter type to counter64. |
| 682 | |
| 683 | The total number of packets that higher-level protocols |
| 684 | requested be transmitted, and that were addressed to a |
| 685 | multicast address at this sub-layer, including those |
| 686 | that were discarded or not sent. For a MAC-layer |
| 687 | protocol, this includes both Group and Functional |
| 688 | addresses. |
| 689 | |
| 690 | Discontinuities in the value of this counter can occur |
| 691 | at re-initialization of the management system, and at |
| 692 | other times as indicated by the value of |
| 693 | 'discontinuity-time'."; |
| 694 | reference |
| 695 | "RFC 2863: The Interfaces Group MIB - |
| 696 | ifHCOutMulticastPkts"; |
| 697 | } |
| 698 | |
| 699 | leaf out-discards { |
| 700 | type yang:counter64; |
| 701 | description |
| 702 | "[adapted from IETF interfaces model (RFC 7223)] |
| 703 | Changed the counter type to counter64. |
| 704 | |
| 705 | The number of outbound packets that were chosen to be |
| 706 | discarded even though no errors had been detected to |
| 707 | prevent their being transmitted. One possible reason |
| 708 | for discarding such a packet could be to free up buffer |
| 709 | space. |
| 710 | |
| 711 | Discontinuities in the value of this counter can occur |
| 712 | at re-initialization of the management system, and at |
| 713 | other times as indicated by the value of |
| 714 | 'discontinuity-time'."; |
| 715 | reference |
| 716 | "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; |
| 717 | } |
| 718 | |
| 719 | leaf out-errors { |
| 720 | type yang:counter64; |
| 721 | description |
| 722 | "[adapted from IETF interfaces model (RFC 7223)] |
| 723 | Changed the counter type to counter64. |
| 724 | |
| 725 | For packet-oriented interfaces, the number of outbound |
| 726 | packets that could not be transmitted because of errors. |
| 727 | For character-oriented or fixed-length interfaces, the |
| 728 | number of outbound transmission units that could not be |
| 729 | transmitted because of errors. |
| 730 | |
| 731 | Discontinuities in the value of this counter can occur |
| 732 | at re-initialization of the management system, and at |
| 733 | other times as indicated by the value of |
| 734 | 'discontinuity-time'."; |
| 735 | reference |
| 736 | "RFC 2863: The Interfaces Group MIB - ifOutErrors"; |
| 737 | } |
| 738 | |
| 739 | leaf last-clear { |
| 740 | type yang:date-and-time; |
| 741 | description |
| 742 | "Indicates the last time the interface counters were |
| 743 | cleared."; |
| 744 | } |
| 745 | } |
| 746 | } |
| 747 | |
| 748 | // data definition statements |
| 749 | |
| 750 | grouping sub-unnumbered-config { |
| 751 | description |
| 752 | "Configuration data for unnumbered subinterfaces"; |
| 753 | |
| 754 | leaf enabled { |
| 755 | type boolean; |
| 756 | default false; |
| 757 | description |
| 758 | "Indicates that the subinterface is unnumbered. By default |
| 759 | the subinterface is numbered, i.e., expected to have an |
| 760 | IP address configuration."; |
| 761 | } |
| 762 | } |
| 763 | |
| 764 | grouping sub-unnumbered-state { |
| 765 | description |
| 766 | "Operational state data unnumbered subinterfaces"; |
| 767 | } |
| 768 | |
| 769 | grouping sub-unnumbered-top { |
| 770 | description |
| 771 | "Top-level grouping unnumbered subinterfaces"; |
| 772 | |
| 773 | container unnumbered { |
| 774 | description |
| 775 | "Top-level container for setting unnumbered interfaces. |
| 776 | Includes reference the interface that provides the |
| 777 | address information"; |
| 778 | |
| 779 | container config { |
| 780 | description |
| 781 | "Configuration data for unnumbered interface"; |
| 782 | |
| 783 | uses sub-unnumbered-config; |
| 784 | } |
| 785 | |
| 786 | container state { |
| 787 | |
| 788 | config false; |
| 789 | |
| 790 | description |
| 791 | "Operational state data for unnumbered interfaces"; |
| 792 | |
| 793 | uses sub-unnumbered-config; |
| 794 | uses sub-unnumbered-state; |
| 795 | } |
| 796 | |
| 797 | uses oc-if:interface-ref; |
| 798 | } |
| 799 | } |
| 800 | |
| 801 | grouping subinterfaces-config { |
| 802 | description |
| 803 | "Configuration data for subinterfaces"; |
| 804 | |
| 805 | leaf index { |
| 806 | type uint32; |
| 807 | default 0; |
| 808 | description |
| 809 | "The index of the subinterface, or logical interface number. |
| 810 | On systems with no support for subinterfaces, or not using |
| 811 | subinterfaces, this value should default to 0, i.e., the |
| 812 | default subinterface."; |
| 813 | } |
| 814 | |
| 815 | uses interface-common-config; |
| 816 | |
| 817 | } |
| 818 | |
| 819 | grouping subinterfaces-state { |
| 820 | description |
| 821 | "Operational state data for subinterfaces"; |
| 822 | |
| 823 | uses interface-common-state; |
| 824 | uses interface-counters-state; |
| 825 | } |
| 826 | |
| 827 | grouping subinterfaces-top { |
| 828 | description |
| 829 | "Subinterface data for logical interfaces associated with a |
| 830 | given interface"; |
| 831 | |
| 832 | container subinterfaces { |
| 833 | description |
| 834 | "Enclosing container for the list of subinterfaces associated |
| 835 | with a physical interface"; |
| 836 | |
| 837 | list subinterface { |
| 838 | key "index"; |
| 839 | |
| 840 | description |
| 841 | "The list of subinterfaces (logical interfaces) associated |
| 842 | with a physical interface"; |
| 843 | |
| 844 | leaf index { |
| 845 | type leafref { |
| 846 | path "../config/index"; |
| 847 | } |
| 848 | description |
| 849 | "The index number of the subinterface -- used to address |
| 850 | the logical interface"; |
| 851 | } |
| 852 | |
| 853 | container config { |
| 854 | description |
| 855 | "Configurable items at the subinterface level"; |
| 856 | |
| 857 | uses subinterfaces-config; |
| 858 | } |
| 859 | |
| 860 | container state { |
| 861 | |
| 862 | config false; |
| 863 | description |
| 864 | "Operational state data for logical interfaces"; |
| 865 | |
| 866 | uses subinterfaces-config; |
| 867 | uses subinterfaces-state; |
| 868 | } |
| 869 | } |
| 870 | } |
| 871 | } |
| 872 | |
| 873 | grouping interfaces-top { |
| 874 | description |
| 875 | "Top-level grouping for interface configuration and |
| 876 | operational state data"; |
| 877 | |
| 878 | container interfaces { |
| 879 | description |
| 880 | "Top level container for interfaces, including configuration |
| 881 | and state data."; |
| 882 | |
| 883 | |
| 884 | list interface { |
| 885 | key "name"; |
| 886 | |
| 887 | description |
| 888 | "The list of named interfaces on the device."; |
| 889 | |
| 890 | leaf name { |
| 891 | type leafref { |
| 892 | path "../config/name"; |
| 893 | } |
| 894 | description |
| 895 | "References the configured name of the interface"; |
| 896 | //TODO: need to consider whether this should actually |
| 897 | //reference the name in the state subtree, which |
| 898 | //presumably would be the system-assigned name, or the |
| 899 | //configured name. Points to the config/name now |
| 900 | //because of YANG 1.0 limitation that the list |
| 901 | //key must have the same "config" as the list, and |
| 902 | //also can't point to a non-config node. |
| 903 | } |
| 904 | |
| 905 | container config { |
| 906 | description |
| 907 | "Configurable items at the global, physical interface |
| 908 | level"; |
| 909 | |
| 910 | uses interface-phys-config; |
| 911 | } |
| 912 | |
| 913 | container state { |
| 914 | |
| 915 | config false; |
| 916 | description |
| 917 | "Operational state data at the global interface level"; |
| 918 | |
| 919 | uses interface-phys-config; |
| 920 | uses interface-common-state; |
| 921 | uses interface-counters-state; |
| 922 | } |
| 923 | |
| 924 | uses interface-phys-holdtime-top; |
| 925 | uses subinterfaces-top; |
| 926 | } |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | uses interfaces-top; |
| 931 | |
| 932 | |
| 933 | } |