From face342aaf2f65988b1bbd21a08faee72ec0d736 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Fri, 11 Aug 2023 14:30:46 -0700 Subject: [PATCH] multicast counters to subinterface, remove physical counters from subinterface (#934) * add multicast to ip if, remove physical counters from subinterface * add in deprecated leaves to subif for backwards compat * trim whitespace * add if common submodule * update spec.yml * use common grouping for if counters * cleanup * bump versions * bump versions * merge submodule to openconfig-interfaces * revert oc-if-ip counters * revert oc-if-ip counters * add counter container to wifi ap if model * update wifi version, fix indent --- .../interfaces/openconfig-interfaces.yang | 631 ++++++++++-------- .../models/wifi/openconfig-ap-interfaces.yang | 19 +- 2 files changed, 382 insertions(+), 268 deletions(-) diff --git a/release/models/interfaces/openconfig-interfaces.yang b/release/models/interfaces/openconfig-interfaces.yang index 7d349a07c..9589c2cb2 100644 --- a/release/models/interfaces/openconfig-interfaces.yang +++ b/release/models/interfaces/openconfig-interfaces.yang @@ -51,9 +51,16 @@ module openconfig-interfaces { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "3.0.2"; + oc-ext:openconfig-version "3.5.0"; -revision "2023-02-06" { + revision "2023-07-14" { + description + "Move counters which apply to both interfaces and subinterfaces to + a common grouping. Deprecate physical counters from subinterface"; + reference "3.5.0"; + } + + revision "2023-02-06" { description "Add further specification to interface-ref type to clarify that the interface and subinterface leaves @@ -637,298 +644,374 @@ revision "2023-02-06" { } } - - grouping interface-counters-state { + grouping interface-common-counters-state { description - "Operational state representing interface counters - and statistics."; + "Operational state representing interface counters and statistics + applicable to (physical) interfaces and (logical) subinterfaces."; - //TODO: we may need to break this list of counters into those - //that would appear for physical vs. subinterface or logical - //interfaces. For now, just replicating the full stats - //grouping to both interface and subinterface. + leaf in-octets { + type oc-yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. - oc-ext:operational; + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - container counters { + leaf in-pkts { + type oc-yang:counter64; description - "A collection of interface-related statistics objects."; + "The total number of packets received on the interface, + including all unicast, multicast, broadcast and bad packets + etc."; + reference + "RFC 2819: Remote Network Monitoring Management Information Base. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-octets { - type oc-yang:counter64; - description - "The total number of octets received on the interface, - including framing characters. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; - } + leaf in-unicast-pkts { + type oc-yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-pkts { - type oc-yang:counter64; - description - "The total number of packets received on the interface, - including all unicast, multicast, broadcast and bad packets - etc."; - reference - "RFC 2819: Remote Network Monitoring Management Information - Base"; - } + leaf in-broadcast-pkts { + type oc-yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInBroadcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-unicast-pkts { - type oc-yang:counter64; - description - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, that were not addressed to a - multicast or broadcast address at this sub-layer. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; - } + leaf in-multicast-pkts { + type oc-yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInMulticastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-broadcast-pkts { - type oc-yang:counter64; - description - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, that were addressed to a broadcast - address at this sub-layer. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCInBroadcastPkts"; - } + leaf in-errors { + type oc-yang:counter64; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-multicast-pkts { - type oc-yang:counter64; - description - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, that were addressed to a multicast - address at this sub-layer. For a MAC-layer protocol, - this includes both Group and Functional addresses. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCInMulticastPkts"; - } + leaf in-discards { + type oc-yang:counter64; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. - leaf in-discards { - type oc-yang:counter64; - description - "The number of inbound packets that were chosen to be - discarded even though no errors had been detected to - prevent their being deliverable to a higher-layer - protocol. One possible reason for discarding such a - packet could be to free up buffer space. + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - reference - "RFC 2863: The Interfaces Group MIB - ifInDiscards"; - } + leaf out-octets { + type oc-yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. - leaf in-errors { - type oc-yang:counter64; - description - "For packet-oriented interfaces, the number of inbound - packets that contained errors preventing them from being - deliverable to a higher-layer protocol. For character- - oriented or fixed-length interfaces, the number of - inbound transmission units that contained errors - preventing them from being deliverable to a higher-layer - protocol. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifInErrors"; - } + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-unknown-protos { - type oc-yang:counter64; - description - "For packet-oriented interfaces, the number of packets - received via the interface that were discarded because - of an unknown or unsupported protocol. For - character-oriented or fixed-length interfaces that - support protocol multiplexing, the number of - transmission units received via the interface that were - discarded because of an unknown or unsupported protocol. - For any interface that does not support protocol - multiplexing, this counter is not present. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; - } + leaf out-pkts { + type oc-yang:counter64; + description + "The total number of packets transmitted out of the + interface, including all unicast, multicast, broadcast, + and bad packets etc."; + reference + "RFC 2819: Remote Network Monitoring Management Information Base. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-fcs-errors { - type oc-yang:counter64; - description - "Number of received packets which had errors in the - frame check sequence (FCS), i.e., framing errors. + leaf out-unicast-pkts { + type oc-yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - Discontinuities in the value of this counter can occur - when the device is re-initialization as indicated by the - value of 'last-clear'."; - } + leaf out-broadcast-pkts { + type oc-yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutBroadcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-octets { - type oc-yang:counter64; - description - "The total number of octets transmitted out of the - interface, including framing characters. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; - } + leaf out-multicast-pkts { + type oc-yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutMulticastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-pkts { - type oc-yang:counter64; - description - "The total number of packets transmitted out of the - interface, including all unicast, multicast, broadcast, - and bad packets etc."; - reference - "RFC 2819: Remote Network Monitoring Management Information - Base"; - } + leaf out-discards { + type oc-yang:counter64; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-unicast-pkts { - type oc-yang:counter64; - description - "The total number of packets that higher-level protocols - requested be transmitted, and that were not addressed - to a multicast or broadcast address at this sub-layer, - including those that were discarded or not sent. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; - } + leaf out-errors { + type oc-yang:counter64; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-broadcast-pkts { - type oc-yang:counter64; - description - "The total number of packets that higher-level protocols - requested be transmitted, and that were addressed to a - broadcast address at this sub-layer, including those - that were discarded or not sent. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCOutBroadcastPkts"; - } + leaf last-clear { + type oc-types:timeticks64; + description + "Timestamp of the last time the interface counters were + cleared. + The value is the timestamp in nanoseconds relative to + the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + oc-ext:telemetry-on-change; + } + } - leaf out-multicast-pkts { - type oc-yang:counter64; - description - "The total number of packets that higher-level protocols - requested be transmitted, and that were addressed to a - multicast address at this sub-layer, including those - that were discarded or not sent. For a MAC-layer - protocol, this includes both Group and Functional - addresses. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCOutMulticastPkts"; - } + grouping interface-counters-state { + description + "Operational state representing interface counters + and statistics."; - leaf out-discards { - type oc-yang:counter64; - description - "The number of outbound packets that were chosen to be - discarded even though no errors had been detected to - prevent their being transmitted. One possible reason - for discarding such a packet could be to free up buffer - space. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; - } + oc-ext:operational; - leaf out-errors { - type oc-yang:counter64; - description - "For packet-oriented interfaces, the number of outbound - packets that could not be transmitted because of errors. - For character-oriented or fixed-length interfaces, the - number of outbound transmission units that could not be - transmitted because of errors. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifOutErrors"; - } + leaf in-unknown-protos { + type oc-yang:counter64; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } - leaf carrier-transitions { - type oc-yang:counter64; - description - "Number of times the interface state has transitioned - between up and down since the time the device restarted - or the last-clear time, whichever is most recent."; - oc-ext:telemetry-on-change; - } + leaf in-fcs-errors { + type oc-yang:counter64; + description + "Number of received packets which had errors in the + frame check sequence (FCS), i.e., framing errors. - leaf last-clear { - type oc-types:timeticks64; - description - "Timestamp of the last time the interface counters were - cleared. + Discontinuities in the value of this counter can occur + when the device is re-initialization as indicated by the + value of 'last-clear'."; + } - The value is the timestamp in nanoseconds relative to - the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; - oc-ext:telemetry-on-change; - } + leaf carrier-transitions { + type oc-yang:counter64; + description + "Number of times the interface state has transitioned + between up and down since the time the device restarted + or the last-clear time, whichever is most recent."; + oc-ext:telemetry-on-change; + } + + leaf resets { + type oc-yang:counter64; + description + "Number of times the interface hardware has been reset. The + triggers and effects of this event are hardware-specifc."; + oc-ext:telemetry-on-change; + + } + } + + grouping subinterfaces-counters-state { + description + "Operational state representing counters unique to subinterfaces"; + + oc-ext:operational; + leaf in-unknown-protos { + type oc-yang:counter64; + status deprecated; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf in-fcs-errors { + type oc-yang:counter64; + status deprecated; + description + "Number of received packets which had errors in the + frame check sequence (FCS), i.e., framing errors. + + Discontinuities in the value of this counter can occur + when the device is re-initialization as indicated by the + value of 'last-clear'."; + } + + leaf carrier-transitions { + type oc-yang:counter64; + status deprecated; + description + "Number of times the interface state has transitioned + between up and down since the time the device restarted + or the last-clear time, whichever is most recent."; + oc-ext:telemetry-on-change; } + } // data definition statements @@ -1020,7 +1103,15 @@ revision "2023-02-06" { } uses interface-common-state; - uses interface-counters-state; + + container counters { + description + "A collection of interface specific statistics entitites which are + not common to subinterfaces."; + + uses interface-common-counters-state; + uses subinterfaces-counters-state; + } } grouping subinterfaces-top { @@ -1119,7 +1210,15 @@ revision "2023-02-06" { uses interface-phys-config; uses interface-common-state; - uses interface-counters-state; + + container counters { + description + "A collection of interface specific statistics entitites which are + not common to subinterfaces."; + + uses interface-common-counters-state; + uses interface-counters-state; + } } uses interface-phys-holdtime-top; diff --git a/release/models/wifi/openconfig-ap-interfaces.yang b/release/models/wifi/openconfig-ap-interfaces.yang index 913520165..49f7f0a00 100644 --- a/release/models/wifi/openconfig-ap-interfaces.yang +++ b/release/models/wifi/openconfig-ap-interfaces.yang @@ -32,7 +32,14 @@ module openconfig-ap-interfaces { "This module defines the configuration and state data for non-radio interfaces on WiFi Access Points."; - oc-ext:openconfig-version "1.2.0"; + oc-ext:openconfig-version "1.3.0"; + + revision "2023-08-10" { + description + "Add container to make compatible with changes in + openconfig-interfaces"; + reference "1.3.0"; + } revision "2023-06-26" { description @@ -105,7 +112,15 @@ module openconfig-ap-interfaces { uses oc-if:interface-phys-config; uses oc-if:interface-common-state; - uses oc-if:interface-counters-state; + + container counters { + description + "A collection of interface specific statistics entitites which are + not common to subinterfaces."; + + uses oc-if:interface-common-counters-state; + uses oc-if:interface-counters-state; + } } } }