-
Notifications
You must be signed in to change notification settings - Fork 662
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
[VRF] Update vrf add, del commands for duplicate/non-existing VRFs #2467
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Muhammad Danish <[email protected]>
mdanish-kh
force-pushed
the
vrf-add-del-update
branch
from
November 5, 2022 11:42
d0654c7
to
d367042
Compare
mdanish-kh
changed the title
Update vrf add, del commands for duplicate/non-existing VRFs
[VRF] Update vrf add, del commands for duplicate/non-existing VRFs
Nov 5, 2022
@prsunny @dgsudharsan @qiluo-msft Can someone kindly take a look please? |
dgsudharsan
approved these changes
Nov 15, 2022
@prsunny Can you please sign this off? |
prsunny
approved these changes
Nov 29, 2022
preetham-singh
pushed a commit
to preetham-singh/sonic-utilities
that referenced
this pull request
Dec 6, 2022
…et#2467) *[VRF] Update vrf add, del commands for duplicate/non-existing VRFs sonic-net#2467 *What I did Throw an error in case user wants to add a duplicate VRF. Throw an error if user wants to delete a VRF that does not exist. Update is_vrf_exists function to use vrf_name == management as a valid vrf name as well. Update grammar for vrf_name is invalid message. Renamed tests/show_vrf_test.py -> tests/vrf_test.py to correctly represent the file contents. Add test cases for the added/modified lines.
dprital
added a commit
to dprital/sonic-buildimage
that referenced
this pull request
Dec 6, 2022
Update sonic-utilities submodule pointer to include the following: * ca9a020 [generate_dump] [Mellanox] Fix the duplicate dfw dump collection problem by adding symlinks ([sonic-net#2536](sonic-net/sonic-utilities#2536)) * 92c7001 [config] Add check in config interface ip command to block if the interface is portchannel member ([sonic-net#2539](sonic-net/sonic-utilities#2539)) * e8130f5 [system-health] Improve code structure of system health CLIs ([sonic-net#2453](sonic-net/sonic-utilities#2453)) * 00c01b3 Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table ([sonic-net#2535](sonic-net/sonic-utilities#2535)) * 42f51c2 sonic-utilities: Update config reload() to verify formatting of an input file ([sonic-net#2529](sonic-net/sonic-utilities#2529)) * a5e1e2b [GCU] Add RemoveCreateOnlyDependency Validator/Generator ([sonic-net#2500](sonic-net/sonic-utilities#2500)) * 6411b52 [QoS] Introduce delay to the qos reload flow ([sonic-net#2503](sonic-net/sonic-utilities#2503)) * fce7ec3 Use github code scanning instead of LGTM ([sonic-net#2530](sonic-net/sonic-utilities#2530)) * 91bd6de Change show kube command default value of insecure key to True ([sonic-net#2517](sonic-net/sonic-utilities#2517)) * c44c584 Add db_migrator_constants.py script to setup.py ([sonic-net#2534](sonic-net/sonic-utilities#2534)) * 6a3238e [drop counters] Fix CLI script for unconfigured PGs ([sonic-net#2518](sonic-net/sonic-utilities#2518)) * 263810b Update vrf add, del commands for duplicate/non-existing VRFs ([sonic-net#2467](sonic-net/sonic-utilities#2467)) * addae73 Port 202012 DB migration changes to newer branches ([sonic-net#2515](sonic-net/sonic-utilities#2515)) * 2af8cfa [VXLAN]Fixing traceback in show remotemac when mac moves during command execution ([sonic-net#2506](sonic-net/sonic-utilities#2506)) Signed-off-by: dprital <[email protected]>
8 tasks
StormLiangMS
pushed a commit
that referenced
this pull request
Dec 30, 2022
*[VRF] Update vrf add, del commands for duplicate/non-existing VRFs #2467 *What I did Throw an error in case user wants to add a duplicate VRF. Throw an error if user wants to delete a VRF that does not exist. Update is_vrf_exists function to use vrf_name == management as a valid vrf name as well. Update grammar for vrf_name is invalid message. Renamed tests/show_vrf_test.py -> tests/vrf_test.py to correctly represent the file contents. Add test cases for the added/modified lines.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Muhammad Danish [email protected]
What I did
vrf_name == management
as a valid vrf name as well.tests/show_vrf_test.py
->tests/vrf_test.py
to correctly represent the file contents.The motivation is to make the VRF commands consistent with other SONiC CLI commands e.g., VLAN commands that throw an error in case the user tries to add a duplicate VLAN or tries to remove a VLAN that doesn't exist. VRF
bind
also throws an error if you try to bind to a non-existing VRF. This PR aims to add the same behavior in VRFadd
anddel
commands for consistency and to prevent unnecessary function calls.How I did it
How to verify it
All the tests pass locally.
Previous command output (if the output of a command-line utility has changed)
CASE 1
CASE 2
New command output (if the output of a command-line utility has changed)
CASE 1 (MODIFIED)
CASE 2 (MODIFIED)