From d06055e75c2d85a5ec6f3c2cd48f1a52f8886eeb Mon Sep 17 00:00:00 2001 From: Marius Orehovschi Date: Fri, 18 Aug 2023 10:14:42 +0300 Subject: [PATCH] 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 f6a577bb0e..2ed2819faf 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 078a6ef3b0..dda7406b05 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 {