From 850e572ae45613d8f29f25ac8d87a4d51db2f8fc Mon Sep 17 00:00:00 2001 From: xqm Date: Fri, 20 Dec 2024 14:47:41 -0800 Subject: [PATCH] Add set-as-path-prepend/use-last-as to support prepeding last AS to AS path. (#1221) --- release/models/bgp/openconfig-bgp-policy.yang | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/release/models/bgp/openconfig-bgp-policy.yang b/release/models/bgp/openconfig-bgp-policy.yang index ee5c34e01..a08c44b0d 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.0.0"; + oc-ext:openconfig-version "8.1.0"; + + revision "2024-11-13" { + description + "Add use-last-as leaf to set-as-path-prepend to prepend last AS."; + reference "8.1.0"; + } revision "2024-08-23" { description @@ -920,9 +926,19 @@ module openconfig-bgp-policy { leaf asn { type oc-inet:as-number; description - "The AS number to prepend to the AS path. If this leaf is - not specified and repeat-n is set, then the local AS - number will be used for prepending."; + "The AS number to prepend to the AS path. If neither this + leaf nor use-last-as leaf is specified but repeat-n is set, then + the local AS number will be used for prepending."; + } + + leaf use-last-as { + type boolean; + description + "Indicates whether to use the last AS number, which is also the + most recent AS number, to prepend to the AS path. + If neither this leaf nor asn leaf is specified + but repeat-n is set, then the local AS number will be + used for prepending."; } }