Skip to content
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

Open
wants to merge 27 commits into
base: devel
Choose a base branch
from

Conversation

Shivani-gslab
Copy link
Contributor

@Shivani-gslab Shivani-gslab commented Jul 2, 2024

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 and switchport.tool in interfaces.

How to test

Molecule test added. Test in EOS CLI.

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

Copy link

github-actions bot commented Jul 2, 2024

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

@Shivani-gslab Shivani-gslab marked this pull request as ready for review July 15, 2024 12:05
@Shivani-gslab Shivani-gslab requested review from a team as code owners July 15, 2024 12:05
@Shivani-gslab Shivani-gslab marked this pull request as draft July 21, 2024 17:24
@Shivani-gslab Shivani-gslab marked this pull request as ready for review July 22, 2024 12:38
@Shivani-gslab Shivani-gslab marked this pull request as draft July 22, 2024 13:24
Copy link

github-actions bot commented Nov 7, 2024

Conflicts have been resolved. A maintainer will review the pull request shortly.

@Shivani-gslab Shivani-gslab marked this pull request as draft November 7, 2024 10:47
@github-actions github-actions bot added the state: conflict PR with conflict label Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the state: conflict PR with conflict label Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot added the state: conflict PR with conflict label Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Shivani-gslab
Copy link
Contributor Author

Moving hostvars in PR #4697

Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the state: conflict PR with conflict label Nov 11, 2024
@Shivani-gslab Shivani-gslab marked this pull request as ready for review November 11, 2024 13:43
@github-actions github-actions bot added the state: conflict PR with conflict label Nov 11, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the state: conflict PR with conflict label Nov 13, 2024
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

description: MAC address for the source.
dest:
type: str
required: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please avoid the required here if we can just check for it in the template.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

`encapsulation.vxlan_strip` and `mpls_pop_all` are mutually exclusive.
`mpls_pop_all` takes precedence.
gre:
type: list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could any of the fields be a primary_key?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there could be commands like this -

   switchport tap encapsulation gre protocol 0x3 strip
   switchport tap encapsulation gre strip
   switchport tap encapsulation gre destination 1.1.1.1 protocol 0x0 strip
   switchport tap encapsulation gre destination 1.1.1.2 protocol 0xffff strip
   switchport tap encapsulation gre destination 1.1.1.3 protocol 0x2 strip
   switchport tap encapsulation gre destination 1.1.1.4 protocol 0x1 strip

Copy link
Contributor Author

@Shivani-gslab Shivani-gslab Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored the code to fix ordering!

@Shivani-gslab Shivani-gslab marked this pull request as draft November 18, 2024 05:52
@Shivani-gslab Shivani-gslab marked this pull request as ready for review November 18, 2024 06:59
Copy link

sonarcloud bot commented Nov 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants