Skip to content

Commit

Permalink
Add set-as-path BGP action and bgp-as-builtin-type to support replacing
Browse files Browse the repository at this point in the history
entire AS path.
  • Loading branch information
xuqma committed Nov 14, 2024
1 parent ea290e3 commit 77cfe53
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
21 changes: 20 additions & 1 deletion release/models/bgp/openconfig-bgp-policy.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
21 changes: 20 additions & 1 deletion release/models/bgp/openconfig-bgp-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.";
}
}

0 comments on commit 77cfe53

Please sign in to comment.