-
Notifications
You must be signed in to change notification settings - Fork 220
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
Feat(eos_cli_config_gen): Add switchport 'tap' and 'tool' mode config to the ethernet and port-channel interfaces #4174
base: devel
Are you sure you want to change the base?
Feat(eos_cli_config_gen): Add switchport 'tap' and 'tool' mode config to the ethernet and port-channel interfaces #4174
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-4174
# Activate the virtual environment
source test-avd-pr-4174/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Shivani-gslab/avd.git@switchport_tap_tool#subdirectory=python-avd" --force
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/Shivani-gslab/avd.git#/ansible_collections/arista/avd/,switchport_tap_tool --force
# Optional: Install AVD examples
cd test-avd-pr-4174
ansible-playbook arista.avd.install_examples |
4737324
to
9cc2279
Compare
0dbd7c7
to
2302af9
Compare
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ethernet-interfaces.md
Show resolved
Hide resolved
...lections/arista/avd/molecule/eos_cli_config_gen/intended/configs/port-channel-interfaces.cfg
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Outdated
Show resolved
Hide resolved
06cbda0
to
8e90dbc
Compare
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Show resolved
Hide resolved
...lections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/ethernet-interfaces.md
Outdated
Show resolved
Hide resolved
0c2451f
to
bb0d566
Compare
bb0d566
to
7e79986
Compare
for more information, see https://pre-commit.ci
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Outdated
Show resolved
Hide resolved
A lot of changes since then
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ethernet_interfaces.schema.yml
Outdated
Show resolved
Hide resolved
86ab872
to
772e6b5
Compare
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.
partial review as I need to find a correct device to carry on
ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md
Show resolved
Hide resolved
ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md
Show resolved
Hide resolved
switchport tap identity 3 inner 5 | ||
switchport tap mac-address dest 01:00:00:00:00:00 src 01:23:45:67:89:ab | ||
switchport tap mpls pop all | ||
switchport tap encapsulation gre protocol 0x0001 strip |
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.
this is rendered as
switchport tap encapsulation gre protocol 0x1 strip
not 0x0001
(need to check the tempaltes to conclude myself)
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.
yes, I kept it same as the command
switchport tap encapsulation gre protocol 0x0002 feature header length 3 strip | ||
switchport tap encapsulation gre protocol 0x0003 feature header length 2 strip re-encapsulation ethernet | ||
switchport tap encapsulation gre protocol 0x0004 strip re-encapsulation ethernet | ||
switchport tap encapsulation gre strip |
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.
this line disappears in my config
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.
its there for me -
interface Ethernet10
description Switchport_tap_tool
switchport tap native vlan 10
switchport tap identity 3 inner 5
switchport tap mac-address dest 01:00:00:00:00:00 src 01:23:45:67:89:ab
switchport tap encapsulation gre protocol 0x1 strip
switchport tap encapsulation gre protocol 0x2 feature header length 3 strip
switchport tap encapsulation gre protocol 0x3 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre protocol 0x4 strip re-encapsulation ethernet
switchport tap encapsulation gre strip
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 protocol 0x0 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x10 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x11 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x12 strip re-encapsulation ethernet
switchport tap mpls pop all
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
switchport tap allowed vlan 25
switchport tool allowed vlan 23
switchport tool identity qinq
switchport tool identity dot1q source dzgre port
switchport tap truncation 150
switchport tool truncation 1
switchport tap default group g1 group g2 group g3
switchport tap default nexthop-group nexthop_g1 nexthop_g2 nexthop_g3
switchport tap default interface Ethernet4
switchport tap default interface Po10
switchport tool group set group1 group2
switchport tool dot1q remove outer 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.
tested multiple ways, found out that - it replaces that command when we apply switchport tap encapsulation gre destination 2.1.1.2 strip
i.e. without specifying protocol and vice-versa.
@@ -4403,6 +4448,13 @@ interface Port-Channel100.101 | |||
logging event link-status | |||
encapsulation dot1q vlan 101 | |||
ip address 10.1.1.3/31 | |||
switchport tap identity 3 inner 10 |
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.
which device have you used for this?
site3-leaf1(config-s-gmu)#interface Port-Channel100.101
site3-leaf1(config-s-gmu-if-Po100.101)##interface Port-Channel100.101
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)# description IFL for TENANT01
site3-leaf1(config-s-gmu-if-Po100.101)# mtu 1500
site3-leaf1(config-s-gmu-if-Po100.101)# logging event link-status
site3-leaf1(config-s-gmu-if-Po100.101)# encapsulation dot1q vlan 101
site3-leaf1(config-s-gmu-if-Po100.101)# ip address 10.1.1.3/31
site3-leaf1(config-s-gmu-if-Po100.101)# switchport tap identity 3 inner 10
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)# switchport tap mac-address dest 01:00:00:00:00:00
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)# switchport tap encapsulation vxlan strip
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)# switchport tool identity dot1q
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)# switchport tool identity dot1q source dzgre policy
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)# switchport tap truncation 120
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)# switchport tool truncation
% Invalid input
site3-leaf1(config-s-gmu-if-Po100.101)#switch?
switch switchport
site3-leaf1(config-s-gmu-if-Po100.101)#switchport ?
default Configure switchport default behavior
ethernet Details on Ethernet 802.2 LLC header operation
port-security Configure MAC-address-based port security
vlan Details on VLAN operation
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.
ahh, it has the same issue (not applicable to sub interfaces)
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.
Fixed it
ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md
Show resolved
Hide resolved
...ons/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/ethernet-interfaces.yml
Outdated
Show resolved
Hide resolved
type: str | ||
description: |- | ||
Protocol type in GRE header. | ||
Protocol range: 0x0000-0xFFFF. |
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.
Protocol range: 0x0000-0xFFFF. | |
Protocol range: 0x0-0xFFFF. |
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.
Fixed
...ons/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/ethernet-interfaces.yml
Outdated
Show resolved
Hide resolved
d661f21
to
419c9e4
Compare
Change Summary
Add switchport 'tap' and 'tool' mode config to the interfaces
Related Issue(s)
Fixes #
Component(s) name
arista.avd.eos_cli_config_gen
Proposed changes
Add schema, template and tests for
switchport.tap
andswitchport.tool
in interfaces.How to test
Molecule test added. Test in EOS CLI.
Checklist
User Checklist
Repository Checklist