From 18ae90c63cf6f3e7cd3a4437c8ef5f96b4fea440 Mon Sep 17 00:00:00 2001 From: Ebben Aries Date: Tue, 17 Sep 2024 10:51:40 -0700 Subject: [PATCH 1/3] Refactor physical ethernet vs. aggregate interface characteristics * (M) release/models/interfaces/openconfig-if-ethernet.yang - Split/restrict physical vs. aggregate ethernet config/state --- .../interfaces/openconfig-if-ethernet.yang | 78 ++++++++++++++----- 1 file changed, 59 insertions(+), 19 deletions(-) diff --git a/release/models/interfaces/openconfig-if-ethernet.yang b/release/models/interfaces/openconfig-if-ethernet.yang index 3991923f6..2154c4469 100644 --- a/release/models/interfaces/openconfig-if-ethernet.yang +++ b/release/models/interfaces/openconfig-if-ethernet.yang @@ -24,7 +24,14 @@ module openconfig-if-ethernet { "Model for managing Ethernet interfaces -- augments the OpenConfig model for interface configuration and state."; - oc-ext:openconfig-version "2.13.0"; + oc-ext:openconfig-version "3.0.0"; + + revision "2024-09-17" { + description + "Refactor config/state nodes to account for physical ethernet vs. + aggregate interface characteristics."; + reference "3.0.0"; + } revision "2023-03-10" { description @@ -294,7 +301,9 @@ module openconfig-if-ethernet { // grouping statements grouping ethernet-interface-config { - description "Configuration items for Ethernet interfaces"; + description + "Common interface configuration for physical ethernet + logical + aggregate interfaces"; leaf mac-address { type oc-yang:mac-address; @@ -304,6 +313,27 @@ module openconfig-if-ethernet { expected to show the system-assigned MAC address."; } + leaf enable-flow-control { + type boolean; + default false; + description + "Enable or disable flow control for this interface. + Ethernet flow control is a mechanism by which a receiver + may send PAUSE frames to a sender to stop transmission for + a specified time. + + This setting should override auto-negotiated flow control + settings. If left unspecified, and auto-negotiate is TRUE, + flow control mode is negotiated with the peer interface."; + reference + "IEEE 802.3x"; + } + } + + grouping physical-interface-config { + description + "Configuration specific to physical ethernet interfaces"; + leaf auto-negotiate { type boolean; default true; @@ -365,22 +395,6 @@ module openconfig-if-ethernet { by ETHERNET_SPEED identities"; } - leaf enable-flow-control { - type boolean; - default false; - description - "Enable or disable flow control for this interface. - Ethernet flow control is a mechanism by which a receiver - may send PAUSE frames to a sender to stop transmission for - a specified time. - - This setting should override auto-negotiated flow control - settings. If left unspecified, and auto-negotiate is TRUE, - flow control mode is negotiated with the peer interface."; - reference - "IEEE 802.3x"; - } - leaf fec-mode { type identityref { base INTERFACE_FEC; @@ -596,7 +610,7 @@ module openconfig-if-ethernet { } - grouping ethernet-interface-state { + grouping physical-interface-state { description "Grouping for defining Ethernet-specific operational state"; @@ -631,6 +645,11 @@ module openconfig-if-ethernet { completed auto-negotiation with the remote peer, this value shows the interface speed that has been negotiated."; } + } + + grouping ethernet-interface-state { + description + "Common state for physical ethernet and aggregate interfaces"; container counters { description "Ethernet interface counters"; @@ -654,6 +673,13 @@ module openconfig-if-ethernet { uses ethernet-interface-config; + uses physical-interface-config { + when "../../oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd'" { + description + "Configuration specific for physical ethernet interfaces"; + } + } + } container state { @@ -662,6 +688,20 @@ module openconfig-if-ethernet { description "State variables for Ethernet interfaces"; uses ethernet-interface-config; + + uses physical-interface-config { + when "../../oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd'" { + description + "Configuration specific for physical ethernet interfaces"; + } + } + + uses physical-interface-state { + when "../../oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd'" { + description + "State specific for physical ethernet interfaces"; + } + } uses ethernet-interface-state; } From 3b37c2b4d0109e05752a3148ef9486f0fe3a06e9 Mon Sep 17 00:00:00 2001 From: Ebben Aries Date: Mon, 7 Oct 2024 16:26:05 -0700 Subject: [PATCH 2/3] Remove when statements, adjust description stmts --- .../interfaces/openconfig-if-ethernet.yang | 37 +++++++------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/release/models/interfaces/openconfig-if-ethernet.yang b/release/models/interfaces/openconfig-if-ethernet.yang index 2154c4469..23201790b 100644 --- a/release/models/interfaces/openconfig-if-ethernet.yang +++ b/release/models/interfaces/openconfig-if-ethernet.yang @@ -332,7 +332,11 @@ module openconfig-if-ethernet { grouping physical-interface-config { description - "Configuration specific to physical ethernet interfaces"; + "Configuration specific to physical ethernet interfaces. Note + that this grouping is to only apply when the interface `type` is + set to 'ianaift:ethernetCsmacd'. This is not currently restricted + by YANG language statements (must/when) due to uses of this module + within other domains (e.g. wifi)."; leaf auto-negotiate { type boolean; @@ -612,7 +616,11 @@ module openconfig-if-ethernet { grouping physical-interface-state { description - "Grouping for defining Ethernet-specific operational state"; + "Grouping for operational state specific to physical ethernet + interfaces. Note that this grouping is to only apply when the + interface `type` is set to 'ianaift:ethernetCsmacd'. This is not + currently restricted by YANG language statements (must/when) due + to uses of this module within other domains (e.g. wifi)."; leaf hw-mac-address { type oc-yang:mac-address; @@ -672,14 +680,7 @@ module openconfig-if-ethernet { description "Configuration data for ethernet interfaces"; uses ethernet-interface-config; - - uses physical-interface-config { - when "../../oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd'" { - description - "Configuration specific for physical ethernet interfaces"; - } - } - + uses physical-interface-config; } container state { @@ -688,20 +689,8 @@ module openconfig-if-ethernet { description "State variables for Ethernet interfaces"; uses ethernet-interface-config; - - uses physical-interface-config { - when "../../oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd'" { - description - "Configuration specific for physical ethernet interfaces"; - } - } - - uses physical-interface-state { - when "../../oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd'" { - description - "State specific for physical ethernet interfaces"; - } - } + uses physical-interface-config; + uses physical-interface-state; uses ethernet-interface-state; } From 1880fdfb21fee21d4fb809d8f0fc889c4a23e64d Mon Sep 17 00:00:00 2001 From: Ebben Aries Date: Thu, 31 Oct 2024 18:08:16 +0000 Subject: [PATCH 3/3] Update version/description after reducing scope --- release/models/interfaces/openconfig-if-ethernet.yang | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/release/models/interfaces/openconfig-if-ethernet.yang b/release/models/interfaces/openconfig-if-ethernet.yang index 23201790b..6c1dae27d 100644 --- a/release/models/interfaces/openconfig-if-ethernet.yang +++ b/release/models/interfaces/openconfig-if-ethernet.yang @@ -24,13 +24,14 @@ module openconfig-if-ethernet { "Model for managing Ethernet interfaces -- augments the OpenConfig model for interface configuration and state."; - oc-ext:openconfig-version "3.0.0"; + oc-ext:openconfig-version "2.14.0"; revision "2024-09-17" { description "Refactor config/state nodes to account for physical ethernet vs. - aggregate interface characteristics."; - reference "3.0.0"; + aggregate interface characteristics along with description updates + to indicate applicability."; + reference "2.14.0"; } revision "2023-03-10" {