-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[DPB] Allow BGP_NEIGHBOR YANG model with just IP as the key #7992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
872ac28
bceff9f
2410e97
93d1a2b
a2e31bb
77aca99
03fa4a4
ce770fe
8b73264
8726536
f512b88
6eb74b1
3e50732
c6fe9ed
655b54a
1997a62
cfd09bf
e2692d5
68cabce
981bb5d
aed0a16
e87037b
6955e31
e4c22b2
54c7028
075d760
b52b0b8
6e4ccb9
6e9ea10
bf17722
b6a50fc
08188ac
5abc11a
cf933a3
969d9ad
71e4a37
b7adb38
0ee82b1
157a7d6
d176f2e
45e526b
d4df009
daace08
d7eee7b
858b08f
e63af87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -867,6 +867,15 @@ | |
| } | ||
| }, | ||
| "BGP_NEIGHBOR": { | ||
| "10.0.0.1": { | ||
| "asn": "65200", | ||
| "holdtime": "180", | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @venkatmahalingam: Yeah, [current translation doesn't allow all the variation of leaf, only choice and leaf is allowed.] if you are using grouping, please add support at: Also, about the other BGP_NEIGHBOR table
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New generic BGP config models are being processed by the below frrcfgd daemon in BGP container. @praveen-li I'm not familiar with libyang infra code, can you please add support for grouping?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @venkatmahalingam: can you please point to the function or relevant line in frrcfgd.py, where it is doing config validation against yang. Also from where it reads the config i.e. source of config?.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @praveen-li There is no config validation against YANG in frrcfgd, frrcfgd simply listens for config-DB events and handles them, all configs validations are expected to handle in SONiC YANGs before pushing to config-DB. |
||
| "keepalive": "60", | ||
| "local_addr": "10.0.0.2", | ||
| "name":"PEER1", | ||
| "nhopself":"0", | ||
| "rrclient":"0" | ||
| }, | ||
| "default|192.168.1.1": { | ||
venkatmahalingam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,60 @@ module sonic-bgp-neighbor { | |
|
|
||
| container sonic-bgp-neighbor { | ||
| container BGP_NEIGHBOR { | ||
| list BGP_NEIGHBOR_TEMPLATE_LIST { | ||
| description "This list is to support template based BGP neighbor configuration handled by bgpcfgd"; | ||
venkatmahalingam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| key "neighbor"; | ||
venkatmahalingam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| leaf neighbor { | ||
venkatmahalingam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| type inet:ip-address; | ||
| description "BGP Neighbor address"; | ||
| } | ||
|
|
||
| leaf asn { | ||
| type uint32 { | ||
| range "1..4294967295"; | ||
| } | ||
| description "Peer AS number"; | ||
| } | ||
|
|
||
| leaf holdtime { | ||
| type uint16; | ||
| description "Hold time"; | ||
| } | ||
|
|
||
| leaf keepalive { | ||
| type uint16; | ||
| description "Keepalive interval"; | ||
| } | ||
|
|
||
| leaf local_addr { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we make sure that local address and Peer address belongs to same address family?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont see any easy way to check this, do you see easy YANG check? |
||
| type inet:ip-address; | ||
| description "Local source address or interface name to use for connection."; | ||
| } | ||
|
|
||
| leaf name { | ||
| type string; | ||
| description "Peer description"; | ||
| } | ||
|
|
||
| leaf nhopself { | ||
venkatmahalingam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| type uint8 { | ||
| range "0..1"; | ||
| } | ||
| description "Nexthop is self, no nexthop calculation"; | ||
| } | ||
|
|
||
| leaf rrclient { | ||
| type uint8 { | ||
| range "0..1"; | ||
| } | ||
| description "Route reflector client"; | ||
| } | ||
| } | ||
|
|
||
| list BGP_NEIGHBOR_LIST { | ||
| description "This list is to support generic BGP neighbor configuration handled by frrcfgd and | ||
| frr_mgmt_framework_config field should be set to true in DEVICE_METADATA talbe for accepting the generic BGP table configurations."; | ||
| key "vrf_name neighbor"; | ||
|
|
||
| leaf vrf_name { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.