-
Notifications
You must be signed in to change notification settings - Fork 202
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): Rearrange the eos-cli config for vlan-interfaces
to match with EOS
#4488
base: devel
Are you sure you want to change the base?
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-4488
# Activate the virtual environment
source test-avd-pr-4488/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/MaheshGSLAB/ansible-avd.git@vlan-config-order#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/MaheshGSLAB/ansible-avd.git#/ansible_collections/arista/avd/,vlan-config-order --force
# Optional: Install AVD examples
cd test-avd-pr-4488
ansible-playbook arista.avd.install_examples |
@@ -90,17 +90,17 @@ interface Vlan75 | |||
multicast ipv6 boundary ff00::/16 out | |||
multicast ipv6 boundary ff01::/16 out | |||
multicast ipv4 static | |||
ipv6 virtual-router address 1b11:3a00:22b0:1000::1 |
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.
IP order
interface Vlan41
description SVI Description
no shutdown
ip helper-address 10.10.64.150 source-interface Loopback0
ip helper-address 10.10.96.150 source-interface Loopback0
ip helper-address 10.10.96.151 source-interface Loopback0
ip igmp host-proxy
ip igmp host-proxy 239.0.0.1
ip igmp host-proxy 239.0.0.2 exclude 10.0.2.1
ip igmp host-proxy 239.0.0.3 include 10.0.3.1
interface Vlan41
description SVI Description
ip helper-address 10.10.64.150 source-interface Loopback0
ip helper-address 10.10.96.150 source-interface Loopback0
ip helper-address 10.10.96.151 source-interface Loopback0
ip igmp host-proxy
ip igmp host-proxy 239.0.0.2 exclude 10.0.2.1
ip igmp host-proxy 239.0.0.3 include 10.0.3.1
ip igmp host-proxy 239.0.0.1
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.
The EOS is not sorting as natural sort here. If you see 239.0.0.1 then it should come before to 239.0.0.2 but not happening actually
@@ -90,17 +90,17 @@ interface Vlan75 | |||
multicast ipv6 boundary ff00::/16 out | |||
multicast ipv6 boundary ff01::/16 out | |||
multicast ipv4 static | |||
ipv6 virtual-router address 1b11:3a00:22b0:1000::1 |
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.
Key-id order
interface Vlan43
description SVI Description
no shutdown
ipv6 dhcp relay destination a0::2 vrf TEST local-interface Loopback44 link-address a0::4
ipv6 address a0::1/64
isis authentication key-id 2 algorithm sha-512 key 0 password
isis authentication key-id 3 algorithm sha-512 rfc-5310 key 0 password1
isis authentication key-id 1 algorithm sha-1 key 0 password level-1
interface Vlan43
description SVI Description
ipv6 dhcp relay destination a0::2 vrf TEST local-interface Loopback44 link-address a0::4
ipv6 address a0::1/64
isis authentication key-id 1 algorithm sha-1 key 7 qZQzXEhWASbvrmcvHhTCZw==
isis authentication key-id 2 algorithm sha-512 key 7 qZQzXEhWASbvrmcvHhTCZw==
isis authentication key-id 3 algorithm sha-512 rfc-5310 key 7 yN8FIWN8ZbkSvVqiF90Gfw==
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.
interface Vlan44
description SVI Description
no shutdown
ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-address a0::7
ipv6 dhcp relay destination a0::8
interface Vlan44
description SVI Description
ipv6 dhcp relay destination a0::8
ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-addr
ess a0::7
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.
interface Vlan50
description IP NAT Testing
ip nat source static 3.0.0.1 4.0.0.1
ip nat source dynamic access-list ACL2 pool POOL2
ip nat destination static 1.0.0.1 2.0.0.1
ip nat destination dynamic access-list ACL1 pool POOL1
interface Vlan50
description IP NAT Testing
ip nat destination static 1.0.0.1 2.0.0.1
ip nat source static 3.0.0.1 4.0.0.1
ip nat destination dynamic access-list ACL1 pool POOL1
ip nat source dynamic access-list ACL2 pool POOL2
isis authentication mode text rx-disabled level-2
isis authentication key 7 bpM/wnochsWdunkFr0o/Bg== level-2
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.
About the isis authentication key-id order the logic is like it will first sort the isis both type level key-ids then lervel-1 and then level-2 so we will see the order difference here.
@ClausHolbechArista @gmuloc
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.
interface Vlan44 description SVI Description no shutdown ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-address a0::7 ipv6 dhcp relay destination a0::8
interface Vlan44 description SVI Description ipv6 dhcp relay destination a0::8 ipv6 dhcp relay destination a0::5 vrf TEST source-address a0::6 link-addr ess a0::7
We are already sorting base on address but EOS sorting base on vrf and none vrf destinations
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.
interface Vlan50 description IP NAT Testing ip nat source static 3.0.0.1 4.0.0.1 ip nat source dynamic access-list ACL2 pool POOL2 ip nat destination static 1.0.0.1 2.0.0.1 ip nat destination dynamic access-list ACL1 pool POOL1
interface Vlan50 description IP NAT Testing ip nat destination static 1.0.0.1 2.0.0.1 ip nat source static 3.0.0.1 4.0.0.1 ip nat destination dynamic access-list ACL1 pool POOL1 ip nat source dynamic access-list ACL2 pool POOL2 isis authentication mode text rx-disabled level-2 isis authentication key 7 bpM/wnochsWdunkFr0o/Bg== level-2
this ip nat is comes from interface-ip-nat.j2 so we can check there only
ip address virtual 10.10.75.1/24 | ||
ipv6 virtual-router address 1b11:3a00:22b0:1000::1 |
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.
interface Vlan75
description SVI Description
no shutdown
ipv6 address 1b11:3a00:22b0:1000::15/64
ipv6 nd managed-config-flag
ipv6 nd prefix 1b11:3a00:22b0:1000::/64 infinite infinite no-autoconfig
multicast ipv4 boundary 224.0.1.0/24 out
multicast ipv4 boundary 224.0.2.0/24
multicast ipv6 boundary ff00::/16 out
multicast ipv6 boundary ff01::/16 out
multicast ipv6 boundary ff01::/16 out
multicast ipv6 boundary ff00::/16 out
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.
already user natural sort on boundary address and as per sort ff00 comes first then ff01 but EOS do just opposite
Quality Gate passedIssues Measures |
{% endif %} | ||
{% if vlan_interface.ip_directed_broadcast is arista.avd.defined(true) %} | ||
ip directed-broadcast | ||
{% if vlan_interface.arp_monitor_mac_address is arista.avd.defined(true) %} |
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.
ipv6 nd cache expire 100
ipv6 nd cache dynamic capacity 100
arp monitor mac-address
ipv6 nd cache refresh always
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.
Arp monitor mac-address is above ipv6 nd cache refresh always
'ip helper-address...' commands is after 'ipv6 dhcp relay destinations' commands. |
@laxmikantchintakindi Can you share the config details as i dont see in my lab
|
interface Vlan333 |
It is sorting differently. interface Vlan333 it is sorting on the basis of ip address. |
Change Summary
Rearrange the eos-cli config for
vlan-interfaces
to match with EOS.Related Issue(s)
Fixes #
Component(s) name
arista.avd.eos_cli_config_gen
Proposed changes
Rearrange the eos-cli config for
vlan-interfaces
to match with EOS.How to test
Run molecule
Checklist
User Checklist
Repository Checklist