From ac0e6b1e5436f5bfe8263d1944ecf3015aed5c47 Mon Sep 17 00:00:00 2001 From: Marius Orehovschi Date: Fri, 18 Aug 2023 11:15:10 +0300 Subject: [PATCH 1/8] Add LACP port priority #940 Deprecate aggregate-id and move it to dedicated ethernet container for for interface's link aggregation parameters. Add port-priority to this container. Add actor and partner port priority to LACP member state. --- .../interfaces/openconfig-if-aggregate.yang | 69 ++++++++++++++++++- release/models/lacp/openconfig-lacp.yang | 20 +++++- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/release/models/interfaces/openconfig-if-aggregate.yang b/release/models/interfaces/openconfig-if-aggregate.yang index f6a577bb0..2ed2819fa 100644 --- a/release/models/interfaces/openconfig-if-aggregate.yang +++ b/release/models/interfaces/openconfig-if-aggregate.yang @@ -23,7 +23,16 @@ module openconfig-if-aggregate { description "Model for managing aggregated (aka bundle, LAG) interfaces."; - oc-ext:openconfig-version "2.4.4"; + oc-ext:openconfig-version "2.5.4"; + + revision "2023-08-15" { + description + "Deprecate ethernet interface's aggregate-id and move it into a separate + container for individual interface link aggregation parameters at + /interfaces/interface/ethernet/aggregation. Add port-priority to said + container"; + reference "2.5.4"; + } revision "2022-06-28" { description @@ -201,6 +210,7 @@ module openconfig-if-aggregate { belonging to a logical aggregate / LAG"; leaf aggregate-id { + status deprecated; type leafref { path "/oc-if:interfaces/oc-if:interface/oc-if:name"; } @@ -210,6 +220,56 @@ module openconfig-if-aggregate { } } + grouping aggregation-ethernet-config { + description + "Adds configuration items for dedicated aggregation container + for Ethernet interfaces belonging to a logical aggregate / LAG"; + + leaf aggregate-id { + type leafref { + path "/oc-if:interfaces/oc-if:interface/oc-if:name"; + } + description + "Specify the logical aggregate interface to which + this interface belongs"; + } + + leaf port-priority { + type uint16; + default "32768"; + description + "This interface's priority in its aggregate interface"; + } + } + + grouping aggregation-ethernet-top { + description + "Top level configuration and state data for Ethernet interface's + aggregation parameters"; + + container aggregation { + description + "Configuration and operational state data for Ethernet interface's + aggregation parameters"; + + container config { + description + "Configuration for interface's aggregation parameters"; + + uses aggregation-ethernet-config; + } + + container state { + description + "Operational state for interface's aggregation parameters"; + + config false; + + uses aggregation-ethernet-config; + } + } + } + // data definition statements // augment statements @@ -226,6 +286,13 @@ module openconfig-if-aggregate { } } + augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet" { + description + "Adds LAG settings container for individual Ethernet interfaces"; + + uses aggregation-ethernet-top; + } + augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" + "oc-eth:config" { description diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index 078a6ef3b..dda7406b0 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -26,7 +26,13 @@ module openconfig-lacp { managing aggregate interfaces. It works in conjunction with the OpenConfig interfaces and aggregate interfaces models."; - oc-ext:openconfig-version "1.2.0"; + oc-ext:openconfig-version "1.2.1"; + + revision "2023-08-15" { + description + "Add actor and partner port priority state."; + reference "1.2.1"; + } revision "2021-07-20" { description @@ -245,6 +251,18 @@ module openconfig-lacp { timestamp in nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; } + + leaf port-priority { + type uint16; + description + "Port priority in the aggregate interface."; + } + + leaf partner-port-priority { + type uint16; + description + "Partner port's priority in its aggregate interface."; + } } grouping aggregation-lacp-members-statistics { From faad6539902147dc3b7705c347e2333533edb848 Mon Sep 17 00:00:00 2001 From: Marius Orehovschi Date: Fri, 18 Aug 2023 11:21:01 +0300 Subject: [PATCH 2/8] Fix versions, ordering, remove default Fix version numbering, ordering of yang statements to pass pyang --lint --strict, and remove default value for port priority --- release/models/interfaces/openconfig-if-aggregate.yang | 10 ++++------ release/models/lacp/openconfig-lacp.yang | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/release/models/interfaces/openconfig-if-aggregate.yang b/release/models/interfaces/openconfig-if-aggregate.yang index 2ed2819fa..3302a2a47 100644 --- a/release/models/interfaces/openconfig-if-aggregate.yang +++ b/release/models/interfaces/openconfig-if-aggregate.yang @@ -23,7 +23,7 @@ module openconfig-if-aggregate { description "Model for managing aggregated (aka bundle, LAG) interfaces."; - oc-ext:openconfig-version "2.5.4"; + oc-ext:openconfig-version "2.5.0"; revision "2023-08-15" { description @@ -31,7 +31,7 @@ module openconfig-if-aggregate { container for individual interface link aggregation parameters at /interfaces/interface/ethernet/aggregation. Add port-priority to said container"; - reference "2.5.4"; + reference "2.5.0"; } revision "2022-06-28" { @@ -210,10 +210,10 @@ module openconfig-if-aggregate { belonging to a logical aggregate / LAG"; leaf aggregate-id { - status deprecated; type leafref { path "/oc-if:interfaces/oc-if:interface/oc-if:name"; } + status deprecated; description "Specify the logical aggregate interface to which this interface belongs"; @@ -236,7 +236,6 @@ module openconfig-if-aggregate { leaf port-priority { type uint16; - default "32768"; description "This interface's priority in its aggregate interface"; } @@ -260,11 +259,10 @@ module openconfig-if-aggregate { } container state { + config false; description "Operational state for interface's aggregation parameters"; - config false; - uses aggregation-ethernet-config; } } diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index dda7406b0..dee65c076 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -26,12 +26,12 @@ module openconfig-lacp { managing aggregate interfaces. It works in conjunction with the OpenConfig interfaces and aggregate interfaces models."; - oc-ext:openconfig-version "1.2.1"; + oc-ext:openconfig-version "1.3.0"; revision "2023-08-15" { description "Add actor and partner port priority state."; - reference "1.2.1"; + reference "1.3.0"; } revision "2021-07-20" { From 5cdabc234435eaa4d3b759361481fbb20e14fb2e Mon Sep 17 00:00:00 2001 From: Marius Orehovschi Date: Mon, 28 Aug 2023 16:31:05 +0300 Subject: [PATCH 3/8] add config container to LACP aggregate interface member Add config container for LACP aggregate interface member with port-priority and interface. Change /lacp/interfaces/interface/members/member/interface to point to the new leaf /lacp/interfaces/interface/members/member/config/interface. Change /lacp/interfaces/interface/members to config true. --- .../interfaces/openconfig-if-aggregate.yang | 67 +------------------ release/models/lacp/openconfig-lacp.yang | 65 +++++++++++------- 2 files changed, 40 insertions(+), 92 deletions(-) diff --git a/release/models/interfaces/openconfig-if-aggregate.yang b/release/models/interfaces/openconfig-if-aggregate.yang index 3302a2a47..f6a577bb0 100644 --- a/release/models/interfaces/openconfig-if-aggregate.yang +++ b/release/models/interfaces/openconfig-if-aggregate.yang @@ -23,16 +23,7 @@ module openconfig-if-aggregate { description "Model for managing aggregated (aka bundle, LAG) interfaces."; - oc-ext:openconfig-version "2.5.0"; - - revision "2023-08-15" { - description - "Deprecate ethernet interface's aggregate-id and move it into a separate - container for individual interface link aggregation parameters at - /interfaces/interface/ethernet/aggregation. Add port-priority to said - container"; - reference "2.5.0"; - } + oc-ext:openconfig-version "2.4.4"; revision "2022-06-28" { description @@ -213,61 +204,12 @@ module openconfig-if-aggregate { type leafref { path "/oc-if:interfaces/oc-if:interface/oc-if:name"; } - status deprecated; description "Specify the logical aggregate interface to which this interface belongs"; } } - grouping aggregation-ethernet-config { - description - "Adds configuration items for dedicated aggregation container - for Ethernet interfaces belonging to a logical aggregate / LAG"; - - leaf aggregate-id { - type leafref { - path "/oc-if:interfaces/oc-if:interface/oc-if:name"; - } - description - "Specify the logical aggregate interface to which - this interface belongs"; - } - - leaf port-priority { - type uint16; - description - "This interface's priority in its aggregate interface"; - } - } - - grouping aggregation-ethernet-top { - description - "Top level configuration and state data for Ethernet interface's - aggregation parameters"; - - container aggregation { - description - "Configuration and operational state data for Ethernet interface's - aggregation parameters"; - - container config { - description - "Configuration for interface's aggregation parameters"; - - uses aggregation-ethernet-config; - } - - container state { - config false; - description - "Operational state for interface's aggregation parameters"; - - uses aggregation-ethernet-config; - } - } - } - // data definition statements // augment statements @@ -284,13 +226,6 @@ module openconfig-if-aggregate { } } - augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet" { - description - "Adds LAG settings container for individual Ethernet interfaces"; - - uses aggregation-ethernet-top; - } - augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" + "oc-eth:config" { description diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index dee65c076..214408aba 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -26,12 +26,13 @@ module openconfig-lacp { managing aggregate interfaces. It works in conjunction with the OpenConfig interfaces and aggregate interfaces models."; - oc-ext:openconfig-version "1.3.0"; + oc-ext:openconfig-version "2.0.0"; - revision "2023-08-15" { + revision "2023-08-28" { description - "Add actor and partner port priority state."; - reference "1.3.0"; + "Add config container for aggregation member and port-priority leaf under + both config and state"; + reference "2.0.0"; } revision "2021-07-20" { @@ -144,8 +145,17 @@ module openconfig-lacp { description "Configuration data for lacp member interfaces"; - //currently a placeholder -- the list of member interfaces - //and their status is considered opstate only + leaf interface { + type oc-if:base-interface-ref; + description + "Reference to interface member of the LACP aggregate"; + } + + leaf port-priority { + type uint16; + description + "Member interface's priority in its aggregate interface."; + } } grouping aggregation-lacp-members-state { @@ -240,6 +250,18 @@ module openconfig-lacp { port"; } + leaf port-priority { + type uint16; + description + "Member interface's priority in its aggregate interface."; + } + + leaf partner-port-priority { + type uint16; + description + "Member interface partner's priority in its aggregate interface."; + } + leaf last-change { type oc-types:timeticks64; description @@ -251,18 +273,6 @@ module openconfig-lacp { timestamp in nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; } - - leaf port-priority { - type uint16; - description - "Port priority in the aggregate interface."; - } - - leaf partner-port-priority { - type uint16; - description - "Partner port's priority in its aggregate interface."; - } } grouping aggregation-lacp-members-statistics { @@ -328,28 +338,31 @@ grouping aggregation-lacp-members-statistics { "Top-level grouping for aggregate members list"; container members { - config false; description - "Enclosing container for the list of members interfaces of - the aggregate. This list is considered operational state - only so is labeled config false and has no config container"; + "Configuration and operational state of the aggregate member + interfaces"; list member { key "interface"; description "List of member interfaces and their associated status for - a LACP-controlled aggregate interface. Member list is not - configurable here -- each interface indicates items - its participation in the LAG."; + a LACP-controlled aggregate interface"; leaf interface { type leafref { - path "../state/interface"; + path "../config/interface"; } description "Reference to aggregate member interface"; } + container config { + description + "Operational state data for aggregate members"; + + uses aggregation-lacp-members-config; + } + container state { From e86f15207e2b93f6c0dd6dc72c270513e0be1d4d Mon Sep 17 00:00:00 2001 From: Marius Orehovschi Date: Thu, 7 Sep 2023 11:01:07 +0100 Subject: [PATCH 4/8] replaced repeated definition with 'uses' statement Replaced repeated definition of leaf port-priority with `uses` statement, as per change request. --- release/models/lacp/openconfig-lacp.yang | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index 214408aba..2c238c808 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -162,12 +162,6 @@ module openconfig-lacp { description "Operational status data for the member interfaces"; - leaf interface { - type oc-if:base-interface-ref; - description - "Reference to interface member of the LACP aggregate"; - } - leaf activity { type lacp-activity-type; description "Indicates participant is active or passive"; @@ -250,12 +244,6 @@ module openconfig-lacp { port"; } - leaf port-priority { - type uint16; - description - "Member interface's priority in its aggregate interface."; - } - leaf partner-port-priority { type uint16; description @@ -371,6 +359,7 @@ grouping aggregation-lacp-members-statistics { description "Operational state data for aggregate members"; + uses aggregation-lacp-members-config; uses aggregation-lacp-members-state; uses aggregation-lacp-members-statistics; } From feb80f754fc633559c97c8732d27d32a412b7dee Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Tue, 28 Nov 2023 10:30:11 -0800 Subject: [PATCH 5/8] Update release/models/lacp/openconfig-lacp.yang --- release/models/lacp/openconfig-lacp.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index 2c238c808..ae6646bc7 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -26,7 +26,7 @@ module openconfig-lacp { managing aggregate interfaces. It works in conjunction with the OpenConfig interfaces and aggregate interfaces models."; - oc-ext:openconfig-version "2.0.0"; + oc-ext:openconfig-version "1.3.0"; revision "2023-08-28" { description From 6a561804c89477963cae9041639bfa75ea32c047 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Tue, 28 Nov 2023 10:30:19 -0800 Subject: [PATCH 6/8] Update release/models/lacp/openconfig-lacp.yang --- release/models/lacp/openconfig-lacp.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index ae6646bc7..97a7db207 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -32,7 +32,7 @@ module openconfig-lacp { description "Add config container for aggregation member and port-priority leaf under both config and state"; - reference "2.0.0"; + reference "1.3.0"; } revision "2021-07-20" { From efcce3f7a1c9fc08bc9dc0d303bec91d5f14eae8 Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Mon, 11 Dec 2023 14:32:17 -0800 Subject: [PATCH 7/8] indent Co-authored-by: Rob Shakir --- release/models/lacp/openconfig-lacp.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index 97a7db207..71ed35957 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -328,7 +328,7 @@ grouping aggregation-lacp-members-statistics { container members { description "Configuration and operational state of the aggregate member - interfaces"; + interfaces"; list member { key "interface"; From e02bd72adfd3798bd1b30bcd2afd2341e3855c3b Mon Sep 17 00:00:00 2001 From: Darren Loher Date: Mon, 11 Dec 2023 14:33:02 -0800 Subject: [PATCH 8/8] bump version Due to breaking change of changing type for list --- release/models/lacp/openconfig-lacp.yang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index 71ed35957..832a6a178 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -26,13 +26,13 @@ module openconfig-lacp { managing aggregate interfaces. It works in conjunction with the OpenConfig interfaces and aggregate interfaces models."; - oc-ext:openconfig-version "1.3.0"; + oc-ext:openconfig-version "2.0.0"; - revision "2023-08-28" { + revision "2023-12-11" { description "Add config container for aggregation member and port-priority leaf under both config and state"; - reference "1.3.0"; + reference "2.0.0"; } revision "2021-07-20" {