Added Sonic CLI commands to configure VxLAN ports#4467
Draft
aakashtiwari2630-max wants to merge 1 commit intosonic-net:masterfrom
Draft
Added Sonic CLI commands to configure VxLAN ports#4467aakashtiwari2630-max wants to merge 1 commit intosonic-net:masterfrom
aakashtiwari2630-max wants to merge 1 commit intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Aakash Tiwari <[email protected]>
3f8be4f to
e2794dd
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
I dont think DEVICE_METADATA is the right place to save this vxlan configs |
Author
I followed the example of other similar SWITCH_TABLE properties like ecmp_hash_offset and ecmp_hash_seed for this. But let me know if you can think of any other option. |
This file contains hidden or 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
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.
What I did
Added three new Sonic CLI commands to configure VxLAN ports:
After configuring these commands, SWITCH_TABLE in APP_DB will be updated dynamically so that the VxLAN port values are active for installed VxLAN tunnels.
Also, after configuring these commands, the port values will be stored in DEVICE_METADATA, so that in case of config reload or reboot, the same values are replayed using vxlanmgrd. Refer to:
sonic-net/sonic-swss#4492
Please note: After configuring these commands, config save is necessary for the port settings saved under DEVICE_METADATA to persist.
How I did it
How to verify it
Added 3 new tests.
tests/vxlan_test.py::TestVxlan::test_config_vxlan_destination_port PASSED [ 91%]
tests/vxlan_test.py::TestVxlan::test_config_vxlan_source_port PASSED [ 95%]
tests/vxlan_test.py::TestVxlan::test_config_vxlan_source_port_mask PASSED [100%]
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)
root@sonic:/home/admin# config vxlan destination-port 51234
VXLAN destination port set to 51234
root@sonic:/home/admin# config vxlan source-port 1234
VXLAN source port set to 1234
root@sonic:/home/admin# config vxlan source-port-mask 7
VXLAN source port mask set to 7