From bcf4a8f8805be0951147df6cc6d08e83b46b57ed Mon Sep 17 00:00:00 2001 From: jenna-mccampbell Date: Tue, 28 Apr 2026 12:35:46 -0600 Subject: [PATCH 1/2] Reapply "Add BGP group/neighbor level and policy support for AIGP (#1451)" This reverts commit 833a12ab86ad7661f636ee044e7c4ccfa118c4b9. --- release/models/bgp/openconfig-bgp-errors.yang | 8 +- release/models/bgp/openconfig-bgp-policy.yang | 41 ++++++- release/models/bgp/openconfig-bgp-types.yang | 17 ++- .../openconfig-network-instance-l2.yang | 8 +- .../openconfig-network-instance.yang | 101 +++++++++++++++++- .../rib/openconfig-rib-bgp-attributes.yang | 12 ++- .../openconfig-rib-bgp-shared-attributes.yang | 8 +- .../openconfig-rib-bgp-table-attributes.yang | 8 +- .../models/rib/openconfig-rib-bgp-tables.yang | 8 +- release/models/rib/openconfig-rib-bgp.yang | 8 +- 10 files changed, 206 insertions(+), 13 deletions(-) diff --git a/release/models/bgp/openconfig-bgp-errors.yang b/release/models/bgp/openconfig-bgp-errors.yang index 53372afc7d..86f56e9b53 100644 --- a/release/models/bgp/openconfig-bgp-errors.yang +++ b/release/models/bgp/openconfig-bgp-errors.yang @@ -18,7 +18,13 @@ submodule openconfig-bgp-errors { "This module defines BGP NOTIFICATION message error codes and subcodes"; - oc-ext:openconfig-version "6.1.0"; + oc-ext:openconfig-version "6.2.0"; + + revision "2026-03-24" { + description + "Add bgp-aigp-metric typedef."; + reference "6.2.0"; + } revision "2024-09-06" { description diff --git a/release/models/bgp/openconfig-bgp-policy.yang b/release/models/bgp/openconfig-bgp-policy.yang index a65c1d94fc..5b11608362 100644 --- a/release/models/bgp/openconfig-bgp-policy.yang +++ b/release/models/bgp/openconfig-bgp-policy.yang @@ -28,7 +28,13 @@ module openconfig-bgp-policy { It augments the base routing-policy module with BGP-specific options for conditions and actions."; - oc-ext:openconfig-version "8.2.0"; + oc-ext:openconfig-version "8.3.0"; + + revision "2026-03-17" { + description + "Add set-aigp to BGP policy actions."; + reference "8.3.0"; + } revision "2025-05-23" { description @@ -265,6 +271,17 @@ module openconfig-bgp-policy { bgp-set-med-type."; } + typedef bgp-set-aigp-action { + type enumeration { + enum SET { + description "Action to set the AIGP to a specific value."; + } + } + description + "Specifies which action to take on the value specified by the + set-aigp leaf."; + } + // grouping statements grouping match-as-path-config { @@ -1405,6 +1422,20 @@ module openconfig-bgp-policy { valid options. When set to 'IGP', this action must be set to 'SET'."; } + + leaf set-aigp { + type oc-bgp-types:bgp-aigp-metric; + description + "Set the AIGP metric attribute in the route update (RFC 7311, + Section 3.4)"; + } + + leaf set-aigp-action { + type bgp-set-aigp-action; + description + "This leaf is mandatory when `set-aigp` is specified. When + `set-aigp` is specified, the action must be set to 'SET'."; + } } grouping bgp-actions-state { @@ -1433,6 +1464,10 @@ module openconfig-bgp-policy { "otherwise any action must be specified if set-med is an " + "integer value."; } + + must "(not(set-aigp) or set-aigp-action)" { + error-message "set-aigp-action must be specified when set-aigp is set"; + } } container state { @@ -1452,6 +1487,10 @@ module openconfig-bgp-policy { "otherwise any action must be specified if set-med is an " + "integer value."; } + + must "(not(set-aigp) or set-aigp-action)" { + error-message "set-aigp-action must be specified when set-aigp is set"; + } } uses as-path-prepend-top; uses set-community-action-top; diff --git a/release/models/bgp/openconfig-bgp-types.yang b/release/models/bgp/openconfig-bgp-types.yang index 57b8e9b654..dededea46c 100644 --- a/release/models/bgp/openconfig-bgp-types.yang +++ b/release/models/bgp/openconfig-bgp-types.yang @@ -24,7 +24,13 @@ module openconfig-bgp-types { policy. It can be imported by modules that make use of BGP attributes"; - oc-ext:openconfig-version "6.1.0"; + oc-ext:openconfig-version "6.2.0"; + + revision "2026-03-24" { + description + "Add bgp-aigp-metric typedef."; + reference "6.2.0"; + } revision "2024-09-06" { description @@ -841,4 +847,13 @@ module openconfig-bgp-types { description "Defines the types of BGP AS path segments."; } + + typedef bgp-aigp-metric { + type uint64; + description + "Higher-precision metric, also known as Accumulated IGP + Metric [RFC7311]."; + reference + "RFC 7311 - The Accumulated IGP Metric Attribute for BGP"; + } } diff --git a/release/models/network-instance/openconfig-network-instance-l2.yang b/release/models/network-instance/openconfig-network-instance-l2.yang index 7a6295dd95..30a1eb1b32 100644 --- a/release/models/network-instance/openconfig-network-instance-l2.yang +++ b/release/models/network-instance/openconfig-network-instance-l2.yang @@ -25,7 +25,13 @@ submodule openconfig-network-instance-l2 { parameters."; - oc-ext:openconfig-version "4.6.0"; + oc-ext:openconfig-version "4.7.0"; + + revision "2026-03-17" { + description + "Add enable-aigp to BGP address families in neighbors and peer-groups."; + reference "4.7.0"; + } revision "2025-03-26" { description diff --git a/release/models/network-instance/openconfig-network-instance.yang b/release/models/network-instance/openconfig-network-instance.yang index 8bc711f1ba..2ecd63c64f 100644 --- a/release/models/network-instance/openconfig-network-instance.yang +++ b/release/models/network-instance/openconfig-network-instance.yang @@ -50,7 +50,13 @@ module openconfig-network-instance { virtual switch instance (VSI). Mixed Layer 2 and Layer 3 instances are also supported."; - oc-ext:openconfig-version "4.6.0"; + oc-ext:openconfig-version "4.7.0"; + + revision "2026-03-17" { + description + "Add enable-aigp to BGP address families in neighbors and peer-groups."; + reference "4.7.0"; + } revision "2025-03-26" { description @@ -1453,5 +1459,98 @@ module openconfig-network-instance { in the network instance"; } } + + grouping ni-bgp-afi-aigp-config { + description + "Grouping for enable-aigp leaf"; + leaf enable-aigp { + type boolean; + description + "Flag to enable sending / receiving accumulated IGP + attribute in routing updates for the address family as + stipulated by RFC 7311 Section 3.3"; + } + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:neighbors/oc-netinst:neighbor/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv4-unicast/oc-netinst:config" { + description + "Add enable-aigp to BGP neighbor IPv4 unicast config"; + uses ni-bgp-afi-aigp-config; + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:neighbors/oc-netinst:neighbor/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv4-unicast/oc-netinst:state" { + description + "Add enable-aigp to BGP neighbor IPv4 unicast state"; + uses ni-bgp-afi-aigp-config; + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:neighbors/oc-netinst:neighbor/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv6-unicast/oc-netinst:config" { + description + "Add enable-aigp to BGP neighbor IPv6 unicast config"; + uses ni-bgp-afi-aigp-config; + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:neighbors/oc-netinst:neighbor/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv6-unicast/oc-netinst:state" { + description + "Add enable-aigp to BGP neighbor IPv6 unicast state"; + uses ni-bgp-afi-aigp-config; + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:peer-groups/oc-netinst:peer-group/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv4-unicast/oc-netinst:config" { + description + "Add enable-aigp to BGP peer-group IPv4 unicast config"; + uses ni-bgp-afi-aigp-config; + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:peer-groups/oc-netinst:peer-group/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv4-unicast/oc-netinst:state" { + description + "Add enable-aigp to BGP peer-group IPv4 unicast state"; + uses ni-bgp-afi-aigp-config; + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:peer-groups/oc-netinst:peer-group/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv6-unicast/oc-netinst:config" { + description + "Add enable-aigp to BGP peer-group IPv6 unicast config"; + uses ni-bgp-afi-aigp-config; + } + + augment "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:protocols/oc-netinst:protocol/oc-netinst:bgp/" + + "oc-netinst:peer-groups/oc-netinst:peer-group/" + + "oc-netinst:afi-safis/oc-netinst:afi-safi/" + + "oc-netinst:ipv6-unicast/oc-netinst:state" { + description + "Add enable-aigp to BGP peer-group IPv6 unicast state"; + uses ni-bgp-afi-aigp-config; + } + uses network-instance-top; } diff --git a/release/models/rib/openconfig-rib-bgp-attributes.yang b/release/models/rib/openconfig-rib-bgp-attributes.yang index 3dbb0cc402..cb604a060a 100644 --- a/release/models/rib/openconfig-rib-bgp-attributes.yang +++ b/release/models/rib/openconfig-rib-bgp-attributes.yang @@ -24,7 +24,13 @@ submodule openconfig-rib-bgp-attributes { attributes for use in BGP RIB tables."; - oc-ext:openconfig-version "0.9.0"; + oc-ext:openconfig-version "0.10.0"; + + revision "2026-03-24" { + description + "Update aigp to use common AIGP metric typedef."; + reference "0.10.0"; + } revision "2022-12-20" { description @@ -350,12 +356,10 @@ submodule openconfig-rib-bgp-attributes { } leaf aigp { - type uint64; + type oc-bgpt:bgp-aigp-metric; description "BGP path attribute representing the accumulated IGP metric for the path"; - reference - "RFC 7311 - The Accumulated IGP Metric Attribute for BGP"; } } diff --git a/release/models/rib/openconfig-rib-bgp-shared-attributes.yang b/release/models/rib/openconfig-rib-bgp-shared-attributes.yang index 80b20c7180..2199fc7da0 100644 --- a/release/models/rib/openconfig-rib-bgp-shared-attributes.yang +++ b/release/models/rib/openconfig-rib-bgp-shared-attributes.yang @@ -21,7 +21,13 @@ submodule openconfig-rib-bgp-shared-attributes { "This submodule contains structural data definitions for attribute sets shared across routes."; - oc-ext:openconfig-version "0.9.0"; + oc-ext:openconfig-version "0.10.0"; + + revision "2026-03-24" { + description + "Add BGP AIGP support."; + reference "0.10.0"; + } revision "2022-12-20" { description diff --git a/release/models/rib/openconfig-rib-bgp-table-attributes.yang b/release/models/rib/openconfig-rib-bgp-table-attributes.yang index b2164e56a3..9e7ac5aa23 100644 --- a/release/models/rib/openconfig-rib-bgp-table-attributes.yang +++ b/release/models/rib/openconfig-rib-bgp-table-attributes.yang @@ -21,7 +21,13 @@ submodule openconfig-rib-bgp-table-attributes { "This submodule contains common data definitions for data related to a RIB entry, or RIB table."; - oc-ext:openconfig-version "0.9.0"; + oc-ext:openconfig-version "0.10.0"; + + revision "2026-03-24" { + description + "Add BGP AIGP support."; + reference "0.10.0"; + } revision "2022-12-20" { description diff --git a/release/models/rib/openconfig-rib-bgp-tables.yang b/release/models/rib/openconfig-rib-bgp-tables.yang index 268c9cd207..73044f7347 100644 --- a/release/models/rib/openconfig-rib-bgp-tables.yang +++ b/release/models/rib/openconfig-rib-bgp-tables.yang @@ -30,7 +30,13 @@ submodule openconfig-rib-bgp-tables { "This submodule contains structural data definitions for BGP routing tables."; - oc-ext:openconfig-version "0.9.0"; + oc-ext:openconfig-version "0.10.0"; + + revision "2026-03-24" { + description + "Add BGP AIGP support."; + reference "0.10.0"; + } revision "2022-12-20" { description diff --git a/release/models/rib/openconfig-rib-bgp.yang b/release/models/rib/openconfig-rib-bgp.yang index 8e93838e03..1c1d66a2fd 100644 --- a/release/models/rib/openconfig-rib-bgp.yang +++ b/release/models/rib/openconfig-rib-bgp.yang @@ -67,7 +67,13 @@ module openconfig-rib-bgp { eligible for sending (advertising) to the neighbor after output policy rules have been applied."; - oc-ext:openconfig-version "0.9.0"; + oc-ext:openconfig-version "0.10.0"; + + revision "2026-03-24" { + description + "Add BGP AIGP support."; + reference "0.10.0"; + } revision "2022-12-20" { description From 0f5dde9fc5d1e65a71b390d0bd847e7a82ad5c3f Mon Sep 17 00:00:00 2001 From: jenna-mccampbell <79030538+jenna-mccampbell@users.noreply.github.com> Date: Wed, 13 May 2026 08:22:55 -0600 Subject: [PATCH 2/2] fix set-aigp-action leaf description --- release/models/bgp/openconfig-bgp-policy.yang | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/release/models/bgp/openconfig-bgp-policy.yang b/release/models/bgp/openconfig-bgp-policy.yang index 5b11608362..3a105b07ff 100644 --- a/release/models/bgp/openconfig-bgp-policy.yang +++ b/release/models/bgp/openconfig-bgp-policy.yang @@ -279,7 +279,7 @@ module openconfig-bgp-policy { } description "Specifies which action to take on the value specified by the - set-aigp leaf."; + set-aigp-action leaf."; } // grouping statements @@ -1433,8 +1433,7 @@ module openconfig-bgp-policy { leaf set-aigp-action { type bgp-set-aigp-action; description - "This leaf is mandatory when `set-aigp` is specified. When - `set-aigp` is specified, the action must be set to 'SET'."; + "This leaf is mandatory when `set-aigp-action` is specified."; } }