Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ submodule openconfig-bgp-common-multiprotocol {
for multiple protocols in BGP. The groupings are common across
multiple contexts.";

oc-ext:openconfig-version "9.9.1";
oc-ext:openconfig-version "9.9.2";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though you are retaining the original type in a union, that is a backwards incompatible change at a high level and warrants a major version increment vs. patch

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit unclear on why this is considered backwards-incompatible given the boolean type is still supported in the union. Could you help me understand the impact? Please let me know what major version number you'd recommend bumping this to and I'll update the PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any type change can have impact beyond the wire encoding - in this case wire encoding could stay the same but codegen, validation, etc.. could now be problematic - impacts unknown. A client also has to adapt to new typing and values being a possibility.

Interleaving types like this is probably not a good idea either as it becomes messy and complex very fast - a usual approach would be to leave the current definition intact (unless there is proof there is no implementation, etc..) and introduce a new structure and create a migration path.

I don't think there are any widely published rulesets on this and is left to interpretation tbh - sliding unions in is just a gap that probably needs some rules around it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the detailed explanation, @earies . That makes complete sense, I hadn't fully considered the downstream blast radius for codegen tools (like ygot) where a union would fundamentally change the generated types and break existing clients expecting a standard boolean.

I agree with your suggested approach to leave the current definition intact and create a clean migration path. I have made the following changes to the PR:

  1. Revert the send leaf back to type boolean; to ensure strict backwards compatibility.
  2. Deprecate the send leaf by adding status deprecated; and updating the description to point to a new leaf.
  3. Introduce a new leaf (e.g., send-mode) of type enumeration (or identityref) to capture all add-path send states. This would include the new values (ADDPATH_ALL, ADDPATH_ECMP, ADDPATH_BACKUP) as well as a baseline value (e.g., STANDARD or BASIC) to map to the legacy send = true behavior.

Let me know if this looks good to you.


revision "2026-07-15" {
description
"Extend Add-path Send leaf with values ADDPATH-ECMP, ADDPATH-ALL and ADDPATH-BACKUP";
reference "9.9.2";
}

revision "2025-04-18" {
description
Expand Down
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp-common-structure.yang
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ submodule openconfig-bgp-common-structure {
"This sub-module contains groupings that are common across multiple BGP
contexts and provide structure around other primitive groupings.";

oc-ext:openconfig-version "9.9.1";
oc-ext:openconfig-version "9.9.2";

revision "2026-07-15" {
description
"Extend Add-path Send leaf with values ADDPATH-ECMP, ADDPATH-ALL and ADDPATH-BACKUP";
reference "9.9.2";
}

revision "2025-04-18" {
description
Expand Down
35 changes: 32 additions & 3 deletions release/models/bgp/openconfig-bgp-common.yang
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ submodule openconfig-bgp-common {
may be application to a subset of global, peer-group or neighbor
contexts.";

oc-ext:openconfig-version "9.9.1";
oc-ext:openconfig-version "9.9.2";
Comment thread
nupkanoi marked this conversation as resolved.

revision "2026-07-15" {
description
"Extend Add-path Send leaf with values ADDPATH-ECMP, ADDPATH-ALL and ADDPATH-BACKUP";
reference "9.9.2";
}

revision "2025-04-18" {
description
Expand Down Expand Up @@ -525,11 +531,34 @@ submodule openconfig-bgp-common {
}

leaf send {
type boolean;
type union {
type boolean;
type enumeration {
enum ADDPATH_ECMP {
description
"Enable capability negotiation to send multiple paths,
and select/advertise all active ECMP paths
for a destination to the peer.";
}
enum ADDPATH_ALL {
description
"Enable capability negotiation to send all RIB/FIB paths
to the peer.";
}
enum ADDPATH_BACKUP {
description
"Enable capability negotiation to send multiple paths,
and select/advertise the best path and backup path
for a destination to the peer.";
}
}
}
default false;
description
"Enable capability negotiation to send multiple path
advertisements for an NLRI from the neighbor or group";
advertisements for an NLRI from the neighbor or group.
Supports both backward-compatible boolean toggles or explicit
selection modes (ADDPATH_ECMP, ADDPATH_ALL, ADDPATH_BACKUP).";
reference
"RFC 7911 - Advertisement of Multiple Paths in BGP";
}
Expand Down
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp-global.yang
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ submodule openconfig-bgp-global {
"This sub-module contains groupings that are specific to the
global context of the OpenConfig BGP module";

oc-ext:openconfig-version "9.9.1";
oc-ext:openconfig-version "9.9.2";

revision "2026-07-15" {
description
"Extend Add-path Send leaf with values ADDPATH-ECMP, ADDPATH-ALL and ADDPATH-BACKUP";
reference "9.9.2";
}

revision "2025-04-18" {
description
Expand Down
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp-neighbor.yang
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ submodule openconfig-bgp-neighbor {
"This sub-module contains groupings that are specific to the
neighbor context of the OpenConfig BGP module.";

oc-ext:openconfig-version "9.9.1";
oc-ext:openconfig-version "9.9.2";

revision "2026-07-15" {
description
"Extend Add-path Send leaf with values ADDPATH-ECMP, ADDPATH-ALL and ADDPATH-BACKUP";
reference "9.9.2";
}

revision "2025-04-18" {
description
Expand Down
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp-peer-group.yang
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ submodule openconfig-bgp-peer-group {
"This sub-module contains groupings that are specific to the
peer-group context of the OpenConfig BGP module.";

oc-ext:openconfig-version "9.9.1";
oc-ext:openconfig-version "9.9.2";

revision "2026-07-15" {
description
"Extend Add-path Send leaf with values ADDPATH-ECMP, ADDPATH-ALL and ADDPATH-BACKUP";
reference "9.9.2";
}

revision "2025-04-18" {
description
Expand Down
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp.yang
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ module openconfig-bgp {
whereas leaf not present inherits its value from the leaf present
at the next higher level in the hierarchy.";

oc-ext:openconfig-version "9.9.1";
oc-ext:openconfig-version "9.9.2";

revision "2026-07-15" {
description
"Extend Add-path Send leaf with values ADDPATH-ECMP, ADDPATH-ALL and ADDPATH-BACKUP";
reference "9.9.2";
}

revision "2025-04-18" {
description
Expand Down
Loading