[yang]: Add admin_status to BGP_NEIGHBOR_TEMPLATE_LIST. (#9341)

Add admin_status to BGP_NEIGHBOR_TEMPLATE_LIST.

Signed-off-by: Gang Lv ganglv@microsoft.com
This commit is contained in:
ganglyu 2021-11-25 15:54:19 +08:00 committed by GitHub
parent fdd8236864
commit adf1990dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 1 deletions

View File

@ -1087,7 +1087,8 @@
"local_addr": "10.0.0.2",
"name":"PEER1",
"nhopself":"0",
"rrclient":"0"
"rrclient":"0",
"admin_status":"up"
},
"default|192.168.1.1": {
"local_asn": "65200",

View File

@ -24,6 +24,11 @@
"desc": "Referring non-existing BGP neighbor table.",
"eStrKey" : "LeafRef"
},
"BGP_NEIGHBOR_NEG_INVALID_ADMIN_STATUS": {
"desc": "Incorrect admin status.",
"eStrKey": "InvalidValue",
"eStr": ["admin_status"]
},
"BGP_NEIGHBOR_NEG_INVALID_NAME": {
"desc": "Incorrect neighbor name.",
"eStrKey": "InvalidValue",

View File

@ -133,6 +133,19 @@
},
"sonic-bgp-neighbor:sonic-bgp-neighbor": {
"sonic-bgp-neighbor:BGP_NEIGHBOR": {
"BGP_NEIGHBOR_TEMPLATE_LIST": [
{
"neighbor": "10.0.0.1",
"asn": "65200",
"holdtime": "180",
"keepalive": "60",
"local_addr": "10.0.0.2",
"name":"PEER1",
"nhopself":"0",
"rrclient":"0",
"admin_status":"up"
}
],
"BGP_NEIGHBOR_LIST": [
{
"vrf_name": "default",
@ -434,6 +447,29 @@
}
},
"BGP_NEIGHBOR_NEG_INVALID_ADMIN_STATUS": {
"sonic-bgp-global:sonic-bgp-global": {
"sonic-bgp-global:BGP_GLOBALS": {
"BGP_GLOBALS_LIST": [
{
"vrf_name": "default",
"local_asn": 65001
}
]
}
},
"sonic-bgp-neighbor:sonic-bgp-neighbor": {
"sonic-bgp-neighbor:BGP_NEIGHBOR": {
"BGP_NEIGHBOR_TEMPLATE_LIST": [
{
"neighbor": "11.12.13.14",
"admin_status": "right"
}
]
}
}
},
"BGP_NEIGHBOR_NEG_INVALID_NAME": {
"sonic-bgp-global:sonic-bgp-global": {
"sonic-bgp-global:BGP_GLOBALS": {

View File

@ -7,6 +7,10 @@ module sonic-bgp-neighbor {
prefix inet;
}
import sonic-types {
prefix stypes;
}
import sonic-bgp-common {
prefix bgpcmn;
}
@ -97,6 +101,11 @@ module sonic-bgp-neighbor {
}
description "Route reflector client";
}
leaf admin_status {
type stypes:admin_status;
description "Admin status of BGP peer";
}
}
list BGP_NEIGHBOR_LIST {