-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd: CLI Changes #17553
base: master
Are you sure you want to change the base?
bgpd: CLI Changes #17553
Conversation
Ticket:#3229030 Testing Done: UT Added sub group and json support for l2vpn update group. TEST: spine-1# show ip bgp l2vpn evpn update-groups json { "default":{ "3":{ "groupCreateTime":{ "epoch":1670880656, "epochString":"Mon Dec 12 21:30:56 2022\n" }, "afi":"l2vpn", "safi":"evpn", "minRouteAdvInt":0, "subGroup":[ { "subGroupId":3, "groupCreateTime":{ "epoch":1670880656, "epochString":"Mon Dec 12 21:30:56 2022\n" }, "statistics":{ "joinEvents":6, "pruneEvents":0, "mergeEvents":2, "splitEvents":0, "switchEvents":0, "peerRefreshEvents":0, "mergeCheckEvents":0 }, "coalesceTime":1300, "version":19, "packetQueueInfo":{ "qeueueLen":0, "queuedTotal":466, "queueHwmLen":39, "totalEnqueued":466 }, "adjListCount":2071, "needsRefresh":false, "peers":[ "swp6", "swp1", "swp3", "swp4", "swp2", "swp5" ] } ] } } } Signed-off-by: Ashwini Reddy <[email protected]>
Add support for command show bgp l2vpn evpn route rd <rd> prefix <prefix> [json] This is currently a Cumulus-specific change. Multiple of the EVPN operational commands need to be unified with upstream changes which have now caught up to display most of the needed information of the global EVPN table but differ in some aspects from existing Cumulus commands. The unification also needs to handle per-VNI (per-EVI) information and will be post CL 4.2. Signed-off-by: Vivek Venkatraman <[email protected]> Ticket: CM-26918 Reviewed By: Output reviewed by Mahesh & Chirag Testing Done: 1. Manual check 2. Precommit - https://trdb.cumulusnetworks.com/trdb3/product/1/userjobs?user=vivek&job=32
Fixed selectionDeferralTimer JSON field which was displaying stalepath timer value instead of select_defer_time. Issue:3803619 Signed-off-by: Pooja Jagadeesh Doijode <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Signed-off-by: Krishnasamy R <[email protected]>
acbcc74
to
abdedc5
Compare
/* | ||
* Display global EVPN routing table for specific RD and prefix (type-5). | ||
*/ | ||
DEFUN(show_bgp_l2vpn_evpn_route_rd_prefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEFPY, please.
"Route Distinguisher\n" | ||
"ASN:XX or A.B.C.D:XX\n" | ||
"prefix\n" | ||
"IP prefix\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe IPv4 prefix
?
json_object *json = NULL; | ||
|
||
bgp = bgp_get_evpn(); | ||
if (!bgp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we be consistent and return an empty JSON in such a case also if the user expects a JSON output?
ret = str2prefix_rd(argv[idx + 1]->arg, &prd); | ||
if (!ret) { | ||
vty_out(vty, "%% Malformed Route Distinguisher\n"); | ||
return CMD_WARNING; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, and everywhere else returning a warning. We have already some patterns when handling similar cases, e.g.:
json_object_string_add(
json_no, "warning",
"No such neighbor or address family");
"Detailed info about dynamic update groups\n") | ||
DEFPY(show_bgp_l2vpn_evpn_updgrps, | ||
show_bgp_l2vpn_evpn_updgrps_cmd, | ||
"show [ip] bgp l2vpn evpn update-groups [(1-1000)$subgrpid] [json$json]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add documentation for this command too (since you touch it)?
Also... to me, it sounds like Show EVPN update-groups with an update-group id
instead of subgroup-id. I think telling explicitly that we want a subgroup-id would be better (e.g.: show bgp l2vpn evpn update-group [subgroup-id (1-1000)...
), no?
This PR has below changes