sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

Add new cli to add a interface ip as secondary address

Open shbalaku-microsoft opened this issue 2 years ago • 4 comments

What I did

Added a new CLI command to add secondary subnet value.

How I did it

In the config class, added a snippet of code where the code to validate the secondary field and set the appropriate flag.

How to verify it

Added a test to validate the added flag

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

shbalaku-microsoft avatar Oct 18 '23 18:10 shbalaku-microsoft

@venkatmahalingam can you review the PR?

shbalaku-microsoft avatar Nov 22 '23 18:11 shbalaku-microsoft

@shbalaku-microsoft please make sure the new CLI is updated to https://github.com/sonic-net/sonic-utilities/blob/master/doc/Command-Reference.md

zhangyanzhao avatar Feb 05 '24 05:02 zhangyanzhao

@venkatmahalingam , can you signoff?

prsunny avatar Feb 06 '24 01:02 prsunny

@shbalaku-microsoft The design of the secondary IP seems to have an issue that hasn't been considered?

  1. If a VLAN interface has only an IPv6 address, it is also considered as the primary IP, and an IPv4 secondary IP can still be successfully configured.
  2. Deleting the primary IP seems to not check if the secondary IP exists?

irene-pan1202 avatar Apr 03 '24 07:04 irene-pan1202

@qiluo-msft can we merge this PR? Thanks.

zhangyanzhao avatar Apr 26 '24 23:04 zhangyanzhao

Please merge latest master branch. The semgrep checker is added after this PR raised, so it will always block.

qiluo-msft avatar Apr 27 '24 00:04 qiluo-msft

@shbalaku-microsoft , can you please rebase the code?

prsunny avatar Apr 29 '24 18:04 prsunny

@shbalaku-microsoft kind reminder to rebase the code, so that we can merge this feature before 202405 fork date on 5/30

zhangyanzhao avatar May 06 '24 01:05 zhangyanzhao