Skip to content

Commit

Permalink
Add LACP port priority #940
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
marius-ore committed Aug 18, 2023
1 parent face342 commit d06055e
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 2 deletions.
69 changes: 68 additions & 1 deletion release/models/interfaces/openconfig-if-aggregate.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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";
}
Expand All @@ -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
Expand All @@ -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
Expand Down
20 changes: 19 additions & 1 deletion release/models/lacp/openconfig-lacp.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d06055e

Please sign in to comment.