Skip to content

Conversation

@RayWang910012
Copy link

What I did

Add cli show and config command for nd suppress

@gord1306 gord1306 requested a review from Copilot April 17, 2025 03:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

if vxlan_keys is not None:
for key in natsorted(vxlan_keys):
key1 = vxlan_table[key]['vlan']
netdev = vxlan_keys[0][0]+"-"+key1[4:]
Copy link

Copilot AI Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using vxlan_keys[0] to construct the netdev identifier may yield incorrect results when iterating over multiple keys; consider using the current key from the loop instead.

Suggested change
netdev = vxlan_keys[0][0]+"-"+key1[4:]
netdev = key[0]+"-"+key1[4:]

Copilot uses AI. Check for mistakes.
body.append([vxlan_table[key]['vlan'], supp_str, netdev])
click.echo(tabulate(body, header, tablefmt="grid"))
return
print(vlan + " is not configured in vxlan tunnel map table")
Copy link

Copilot AI Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with click-based output, replace the use of print() with click.echo() to ensure uniform behavior across command outputs.

Suggested change
print(vlan + " is not configured in vxlan tunnel map table")
click.echo(vlan + " is not configured in vxlan tunnel map table")

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant