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 support for mpls tunnel termination settings #4888

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

Conversation

ccsnw
Copy link
Contributor

@ccsnw ccsnw commented Jan 16, 2025

Change Summary

Add knobs to configure tunnel termination settings for MPLS

Related Issue(s)

Fixes #<N/A>

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

  tunnel:
    description: Configure tunnel termination model.
    type: dict
    keys:
      termination_model:
        type: str
        description: |
          TTL and DSCP configuration as a string.
          Example:
          - "ttl pipe dscp pipe"
        valid_values:
          - "ttl pipe dscp pipe"
          - "ttl uniform dscp pipe"
          - "ttl uniform dscp uniform"
      termination_php_model:
        type: str
        description: |
          TTL and DSCP configuration as a string.
          Example:
          - "ttl pipe dscp pipe"
        valid_values:
          - "ttl pipe dscp pipe"
          - "ttl uniform dscp pipe"

How to test

added molecule test
cli command order was tested on EOS 4.30.5 - Please let me know if newer version sort differently

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)

@ccsnw ccsnw requested review from a team as code owners January 16, 2025 09:47
Copy link

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-4888
# Activate the virtual environment
source test-avd-pr-4888/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ccsnw/ansible-avd.git@add_mpls_tunnel_termination#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/ccsnw/ansible-avd.git#/ansible_collections/arista/avd/,add_mpls_tunnel_termination --force
# Optional: Install AVD examples
cd test-avd-pr-4888
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added 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 labels Jan 16, 2025
@Vibhu-gslab Vibhu-gslab force-pushed the add_mpls_tunnel_termination branch from 361877d to 2a534aa Compare January 20, 2025 10:49
@ccsnw ccsnw force-pushed the add_mpls_tunnel_termination branch from 363a696 to ad6a3c4 Compare January 21, 2025 07:36
@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Jan 22, 2025
Copy link
Contributor

@ClausHolbechArista ClausHolbechArista left a comment

Choose a reason for hiding this comment

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

I would like a more elaborate data model instead of all these valid values in a multi-word string. I do not know the CLI here in detail, so @ccsnw if you could provide a suggestion, we can take a look. Otherwise we can investigate more and get back.

@ccsnw
Copy link
Contributor Author

ccsnw commented Jan 23, 2025

I would like a more elaborate data model instead of all these valid values in a multi-word string. I do not know the CLI here in detail, so @ccsnw if you could provide a suggestion, we can take a look. Otherwise we can investigate more and get back.

Hi @ClausHolbechArista

Not an expert on that CLI either. Colleagues are needing it on some WAN routers.

But I noticed that the modes (php vs no php) are not mutually exclusive, so we can have sth like:

mpls tunnel termination model ttl pipe dscp pipe
mpls tunnel termination php model ttl pipe dscp pipe

in the same config.

Hence I'd suggest a model like this:

tunnel:
  termination:
    - php: < true | false >
      model:   
        ttl: < pipe | uniform >
        dscp: < pipe | uniform >

We can leave it up to the user to decide with model config makes sense (and actually is supported).

What do you think?

@gmuloc gmuloc requested a review from MaheshGSLAB January 24, 2025 08:43
@gmuloc gmuloc removed the one approval This PR has one approval and is only missing one more. label Jan 24, 2025
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.

4 participants