-
Notifications
You must be signed in to change notification settings - Fork 670
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
[show] vnet endpoint [ip/ipv6] command #2342
[show] vnet endpoint [ip/ipv6] command #2342
Conversation
The status may be active, inactive or not present at all. The status field cna have 3 values. Empty : Configured but not in ASIC Active : Configured and active in ASIC. Inacive : Configured but not in ASIC due to lack ofr BFD session.
show vnet endpoint [IPv4/IPv6] This command shows the status of a vxlan tunnel endpoint nad the number of prefixes pointing to it. Also this command can show the prefix details if endpoint ip is specified. This command checks the endpoint state using BFD monitoring session of the endpoint.
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.
please add tests
…status_addition' into CLI_vnet_endpoint_ip_addition
- Usage: | ||
|
||
``` | ||
show vnet endpoint <ipv4_address/ipv6_address> |
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 also print the "endpoint_monitor
" ip so we have a mapping? BFD session just have endpoint_monitor'
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.
ok
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.
done
show/vnet.py
Outdated
for idx, endpoint in enumerate(endpoints): | ||
monitor_dict[endpoint] = monitors[idx] | ||
if endpoint not in prefix_count: | ||
prefix_count[endpoint] =0 |
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.
space after =
for consistency
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.
done
show/vnet.py
Outdated
for k in vnet_rt_keys: | ||
val = appl_db.get_all(appl_db.APPL_DB, k) | ||
endpoints = val.get('endpoint').split(',') | ||
monitors = val.get('endpoint_monitor').split(',') |
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.
Extra space after =
. Please fix spacing in all places
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.
done
@siqbal1986 this change cannot be cherry-picked to 202205 branch cleanly. Please create separate PR. |
* [show] vnet endpoint [ip/ipv6] command
What I did Created a new CLI Command Show vnet endpoint with option to give IPv4 or IPv6 address parameter. How I did it This command goes over all vxlan tunnels and checks each endpoints monitor session to populate the endpoint state. while doing so it also tracks the prefixes pointing to an endpoint. How to verify it run show vnet endpoint or show vnet endpoint<ipv4 address/ipv6 address>. >>show vnet endpoint Endpoint Endpoint Monitor prefix count status --------------------- --------------------- -------------- -------- fddd:a100:a251::a10:1 fddd:a100:a251::a10:1 1 Unknown fddd:a101:a251::a10:1 fddd:a101:a251::a10:1 1 Down 100.251.7.1 100.251.7.1 3 Up >>show vnet endpoint fddd:a101:a251::a10:1 Endpoint Endpoint Monitor prefix status --------------------- ------------------------- ---------------------------- -------- fddd:a101:a251::a10:1 ['fddd:a101:a251::a10:1'] ['fddd:a156:a251::a6:1/128'] Down >>show vnet endpoint 100.251.7.1 Endpoint Endpoint Monitor prefix status ----------- ------------------ ------------------------------------------------------------ -------- 100.251.7.1 ['100.251.7.1'] ['160.162.191.1/32', '160.163.191.1/32', '160.164.191.1/32'] Up Previous command output (if the output of a command-line utility has changed) None New command output (if the output of a command-line utility has changed) NA
What I did
Created a new CLI Command Show vnet endpoint with option to give IPv4 or IPv6 address parameter.
How I did it
This command goes over all vxlan tunnels and checks each endpoints monitor session to populate the endpoint state. while doing so it also tracks the prefixes pointing to an endpoint.
How to verify it
run show vnet endpoint or show vnet endpoint<ipv4 address/ipv6 address>.
Previous command output (if the output of a command-line utility has changed)
None
New command output (if the output of a command-line utility has changed)
NA