-
Notifications
You must be signed in to change notification settings - Fork 661
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
[config] CLI command configure interface ip doesn't check correctness of inputs #1381
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: d-dashkov <Dmytro_Dashkov@Jabil.com>
Signed-off-by: d-dashkov <Dmytro_Dashkov@Jabil.com>
@d-dashkov - Are you going to handle this PR ? I see that it got a conflict. |
|
Sorry, I will resolve conflicts within a couple of days |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@dgsudharsan could you please review this PR? |
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.
Changes lgtm, please add some unit-tests
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 UT. Please also sync to the latest
Signed-off-by: Mykola Horb <mykola_horb@jabil.com>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@d-dashkov Can you please check the pipeline failures? |
Signed-off-by: d-dashkov <Dmytro_Dashkov@Jabil.com>
@dgsudharsan, I have fixed sonic-utilities tests and merge conflicts, but there are errors in pipeline which are not related to my changes, and it is about warm-reboot |
- What I did
Before writing the settings to the database, check the correctness of the entries.
If you try to bind the ip of a non-existent entry, show an error.
fixes sonic-net/sonic-buildimage#6358
- How I did it
Added functions that check if an entry from an argument exists in the database.
- How to verify it
Try to configure ip to non-existent entry(Ethernet, Vlan, PortChannel, Loopback):
$ config interface ip add Ethernet0.5 10.0.0.1/24
$ config interface ip add Vlan4095 10.0.0.1/24
- New command output (if the output of a command-line utility has changed)
Error: 'interface_name' is not valid. Valid names [Ethernet/PortChannel/Vlan/Loopback]