-
Notifications
You must be signed in to change notification settings - Fork 231
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
Refactor(eos_cli_config_gen): Add support to set vlan and vni ranges in vxlan interface #4749
base: devel
Are you sure you want to change the base?
Refactor(eos_cli_config_gen): Add support to set vlan and vni ranges in vxlan interface #4749
Conversation
Review docs on Read the Docs To test this pull request: # Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4749
# Activate the virtual environment
source test-avd-pr-4749/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@refactor/eos_cli/vxlan_vni#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/laxmikantchintakindi/avd.git#/ansible_collections/arista/avd/,refactor/eos_cli/vxlan_vni --force
# Optional: Install AVD examples
cd test-avd-pr-4749
ansible-playbook arista.avd.install_examples |
Quality Gate passedIssues Measures |
ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg
Show resolved
Hide resolved
797398b
to
ce4705e
Compare
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/vxlan-interface.j2
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/vxlan-interface.j2
Outdated
Show resolved
Hide resolved
fff30e2
to
1ae28e3
Compare
Shall I add ability to set multicast_group on vlan ranges?
This will result in below commands:
|
3b5ee1c
to
01469f9
Compare
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/vxlan_interface.schema.yml
Outdated
Show resolved
Hide resolved
c7be07a
to
e323630
Compare
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/vxlan_interface.schema.yml
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/vxlan_interface.schema.yml
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/vxlan-interface.j2
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/vxlan-interface.j2
Outdated
Show resolved
Hide resolved
type: dict | ||
description: |- | ||
Set VNI on range of vlans. | ||
If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`. |
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.
vxlan_interface.vxlan1.vxlan.vlans
is duplicated
If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`. | |
If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlan_range`. |
@@ -35,6 +35,9 @@ | |||
| [<samp> multicast_group</samp>](## "vxlan_interface.vxlan1.vxlan.vlans.[].multicast_group") | String | | | | IP Multicast Group Address. | | |||
| [<samp> flood_vteps</samp>](## "vxlan_interface.vxlan1.vxlan.vlans.[].flood_vteps") | List, items: String | | | | | | |||
| [<samp> - <str></samp>](## "vxlan_interface.vxlan1.vxlan.vlans.[].flood_vteps.[]") | String | | | | Remote VTEP IP Address. | | |||
| [<samp> vlan_range</samp>](## "vxlan_interface.vxlan1.vxlan.vlan_range") | Dictionary | | | | Set VNI on range of vlans.<br>If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`.<br>Number of VLANs must equal number of VNIs. | |
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.
| [<samp> vlan_range</samp>](## "vxlan_interface.vxlan1.vxlan.vlan_range") | Dictionary | | | | Set VNI on range of vlans.<br>If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`.<br>Number of VLANs must equal number of VNIs. | | |
| [<samp> vlan_range</samp>](## "vxlan_interface.vxlan1.vxlan.vlan_range") | Dictionary | | | | Set VNI on range of vlans.<br>If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlan_range`.<br>Number of VLANs must equal number of VNIs. | |
@@ -70,6 +73,9 @@ | |||
| [<samp> multicast_group</samp>](## "vxlan_interface.Vxlan1.vxlan.vlans.[].multicast_group") | String | | | | IP Multicast Group Address. | | |||
| [<samp> flood_vteps</samp>](## "vxlan_interface.Vxlan1.vxlan.vlans.[].flood_vteps") | List, items: String | | | | | | |||
| [<samp> - <str></samp>](## "vxlan_interface.Vxlan1.vxlan.vlans.[].flood_vteps.[]") | String | | | | Remote VTEP IP Address. | | |||
| [<samp> vlan_range</samp>](## "vxlan_interface.Vxlan1.vxlan.vlan_range") | Dictionary | | | | Set VNI on range of vlans.<br>If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`.<br>Number of VLANs must equal number of VNIs. | |
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.
| [<samp> vlan_range</samp>](## "vxlan_interface.Vxlan1.vxlan.vlan_range") | Dictionary | | | | Set VNI on range of vlans.<br>If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`.<br>Number of VLANs must equal number of VNIs. | | |
| [<samp> vlan_range</samp>](## "vxlan_interface.Vxlan1.vxlan.vlan_range") | Dictionary | | | | Set VNI on range of vlans.<br>If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlan_range`.<br>Number of VLANs must equal number of VNIs. | |
@@ -129,6 +135,18 @@ | |||
|
|||
# Remote VTEP IP Address. | |||
- <str> | |||
|
|||
# Set VNI on range of vlans. | |||
# If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`. |
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.
# If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`. | |
# If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlan_range`. |
@@ -194,6 +212,18 @@ | |||
|
|||
# Remote VTEP IP Address. | |||
- <str> | |||
|
|||
# Set VNI on range of vlans. | |||
# If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`. |
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.
# If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlans`. | |
# If vni is set on the vlan in `vxlan_interface.vxlan1.vxlan.vlans`, it should not overlap with `vxlan_interface.vxlan1.vxlan.vlan_range`. |
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.
Can I change vxlan_interface.vxlan1.vxlan.vlan_range
to vxlan_interface.vxlan1.vxlan.vlan_range.vlans
?
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.
Right, this is probably even better
@@ -3787,6 +3787,7 @@ interface Vxlan1 | |||
vxlan flood vtep learned data-plane | |||
vxlan vlan 110 vni 10110 | |||
vxlan vlan 111 vni 10111 | |||
vxlan vlan 113,115-118 vni 10113,10115-10118 |
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.
discussion on PR review call: what happens with many tokens 1,3,5,7,9,11,...
to see if EOS will wrap it.
We may need to be able to give multiple ranges if EOS wraps to make it possible to match the output.
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.
s1-host1(config-if-Vx1)#sh active
interface Vxlan1
vxlan udp-port 4789
vxlan vlan 10-13,17-20 vni 10010-10013,10017-10020
s1-host1(config-if-Vx1)#vxlan vlan add 25-30 vni 10025-10030
s1-host1(config-if-Vx1)#sh active
interface Vxlan1
vxlan udp-port 4789
vxlan vlan 10-13,17-20,25-30 vni 10010-10013,10017-10020,10025-10030
Yes it is supporting multiple ranges and wraps all individual and ranges in a single line.
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.
For long input of vlan/vnis the command doesnt change.
s1-leaf1(config-if-Vx1)#Vxlan vlan 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 vni 10001,10003,10005,10007,10009,10011,10013,10015,10017,10019,10021,10023,10025,10027,10029,10031
s1-leaf1(config-if-Vx1)#sh active
interface Vxlan1
vxlan udp-port 4789
vxlan vlan 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 vni 10001,10003,10005,10007,10009,10011,10013,10015,10017,10019,10021,10023,10025,10027,10029,10031
…/vxlan-interface.j2 Co-authored-by: Shivani-gslab <[email protected]>
…xlan_interface.schema.yml Co-authored-by: Claus Holbech <[email protected]>
…xlan_interface.schema.yml Co-authored-by: Vibhu-gslab <[email protected]>
…xlan_interface.schema.yml Co-authored-by: Vibhu-gslab <[email protected]>
…/vxlan-interface.j2 Co-authored-by: Vibhu-gslab <[email protected]>
522a81f
to
33cffb1
Compare
Change Summary
Add support to set vlan and vni ranges in vxlan interface
Related Issue(s)
Fixes #4664
Component(s) name
arista.avd.eos_cli_config_gen
Proposed changes
Add support to set vlan and vni ranges in vxlan interface.
How to test
Checklist
User Checklist
Repository Checklist