diff --git a/release/models/bgp/openconfig-bgp-policy.yang b/release/models/bgp/openconfig-bgp-policy.yang index ee5c34e01..ba44d1abd 100644 --- a/release/models/bgp/openconfig-bgp-policy.yang +++ b/release/models/bgp/openconfig-bgp-policy.yang @@ -28,7 +28,14 @@ module openconfig-bgp-policy { It augments the base routing-policy module with BGP-specific options for conditions and actions."; - oc-ext:openconfig-version "8.0.0"; + oc-ext:openconfig-version "8.2.0"; + + revision "2024-11-13" { + description + "Add set-as-path BGP action and use-last-as leaf to + set-as-path-prepend to prepend last AS."; + reference "8.2.0"; + } revision "2024-08-23" { description @@ -1388,6 +1395,18 @@ module openconfig-bgp-policy { "When set-med is specified, this leaf is mandatory to set the appropriate action on the MED metric value."; } + + leaf-list set-as-path { + type union { + type oc-inet:as-number; + type oc-bgp-types:bgp-as-builtin-type; + } + ordered-by user; + description + "set the entire AS path attribute in the route update, + with an ordered list of ASes that consists of AS numbers + or last-as."; + } } grouping bgp-actions-state { diff --git a/release/models/bgp/openconfig-bgp-types.yang b/release/models/bgp/openconfig-bgp-types.yang index 57b8e9b65..7bbbb6ac4 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 "2024-08-09" { + description + "Add new bgp-as-builtin-type to support last AS for set-as-path action"; + reference "6.2.0"; + } revision "2024-09-06" { description @@ -841,4 +847,17 @@ module openconfig-bgp-types { description "Defines the types of BGP AS path segments."; } + + typedef bgp-as-builtin-type { + type enumeration { + enum LAST { + description + "The last AS in the AS path, which is also the most recent + AS added to the path."; + } + } + description + "Type definition for specifying the built in AS types + that can be used for setting AS path actions."; + } }