Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
16 changes: 0 additions & 16 deletions src/sonic-yang-models/yang-models/sonic-bgp-common.yang
Original file line number Diff line number Diff line change
Expand Up @@ -382,22 +382,6 @@ module sonic-bgp-common {
description "Interval after which connection will get re-established";
}

leaf-list route_map_in {
type leafref {
path "/rmap:sonic-route-map/rmap:ROUTE_MAP_SET/rmap:ROUTE_MAP_SET_LIST/rmap:name";
}
description "Route-map filter for incoming routes";
max-elements 1;
}

leaf-list route_map_out {
type leafref {
path "/rmap:sonic-route-map/rmap:ROUTE_MAP_SET/rmap:ROUTE_MAP_SET_LIST/rmap:name";
}
description "Route-map filter for outgoing routes";
max-elements 1;
}

leaf soft_reconfiguration_in {
type boolean;
description "Inbound soft reconfiguration";
Expand Down
23 changes: 23 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-bgp-neighbor.yang
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module sonic-bgp-neighbor {
// prefix vlan;
//}

import sonic-route-map {
prefix rmap;
}

import sonic-bgp-global {
prefix bgpg;
}
Expand Down Expand Up @@ -130,7 +134,26 @@ module sonic-bgp-neighbor {
}
description "BGP Neighbor, it will be neighbor address or interface name";
}

uses bgpcmn:sonic-bgp-cmn-af;

// These should logically be in sonic-bgp-cmn-af, however due to a libyang2 bug when including
// a leaf-list entry, there are validation failures.
leaf-list route_map_in {
type leafref {
path "/rmap:sonic-route-map/rmap:ROUTE_MAP_SET/rmap:ROUTE_MAP_SET_LIST/rmap:name";
}
description "Route-map filter for incoming routes";
max-elements 1;
}

leaf-list route_map_out {
type leafref {
path "/rmap:sonic-route-map/rmap:ROUTE_MAP_SET/rmap:ROUTE_MAP_SET_LIST/rmap:name";
}
description "Route-map filter for outgoing routes";
max-elements 1;
}
}
}
}
Expand Down
22 changes: 22 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-bgp-peergroup.yang
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ module sonic-bgp-peergroup {
prefix bgpg;
}

import sonic-route-map {
prefix rmap;
}

organization
"SONiC";

Expand Down Expand Up @@ -68,6 +72,24 @@ module sonic-bgp-peergroup {
}

uses bgpcmn:sonic-bgp-cmn-af;

// These should logically be in sonic-bgp-cmn-af, however due to a libyang2 bug when including
// a leaf-list entry, there are validation failures.
leaf-list route_map_in {
type leafref {
path "/rmap:sonic-route-map/rmap:ROUTE_MAP_SET/rmap:ROUTE_MAP_SET_LIST/rmap:name";
}
description "Route-map filter for incoming routes";
max-elements 1;
}

leaf-list route_map_out {
type leafref {
path "/rmap:sonic-route-map/rmap:ROUTE_MAP_SET/rmap:ROUTE_MAP_SET_LIST/rmap:name";
}
description "Route-map filter for outgoing routes";
max-elements 1;
}
}
}

Expand Down