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 mac timestamp header command #4635

Merged

Conversation

laxmikantchintakindi
Copy link
Contributor

@laxmikantchintakindi laxmikantchintakindi commented Oct 23, 2024

Change Summary

Add support for mac timestamp header command.

Related Issue(s)

Fixes #4331

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

mac timestamp header is a flag you can enable on an interface in EOS.

interface <str>
    mac timestamp header

How to test

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

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-4635
# Activate the virtual environment
source test-avd-pr-4635/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@feat/mac-timestamp-header#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/,feat/mac-timestamp-header --force
# Optional: Install AVD examples
cd test-avd-pr-4635
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 Oct 23, 2024
@MaheshGSLAB MaheshGSLAB marked this pull request as ready for review October 23, 2024 12:43
@MaheshGSLAB MaheshGSLAB requested review from a team as code owners October 23, 2024 12:43
@alexeygorbunov
Copy link
Contributor

alexeygorbunov commented Oct 30, 2024

TAP Aggregation tool ports seem to support 3 different timestamp-ing modes (depending on a platform):

  • header - on platforms like 7280E/Rs and 7500E/Rs
  • before-fcs & replace-fcs on platforms like 7150s

EOS CLI (checked on 4.32.1F) supports all three under interface configuration mode:
IntfConfigMode: [no|default] mac timestamp ( before-fcs | replace-fcs | header )

  before-fcs   insert timestamp before fcs field
  replace-fcs  replace fcs field with timestamp
  header    insert timestamp in Ethernet header

Would it make sense to cover all three available options?

  type: dict
  keys:
    ethernet_interfaces:
      items:
        keys:
+        mac_timestamp:
+          type: str
+          valid_values: ["before-fcs", "replace-fcs", "header"]

P.S. Although interface-level mac timestamp <str> commands are only active on tool port of the EoS switch running in TAP aggregation mode - EoS allows to configure 'mac timestamp ' event if these conditions are not met, so probably we can skip interface mode validations within schema and can let CV/EOS to highlight warnings (based on workspace build validations) if platform|port_mode|etc is not matching.

@laxmikantchintakindi
Copy link
Contributor Author

TAP Aggregation tool ports seem to support 3 different timestamp-ing modes (depending on a platform):

  • header - on platforms like 7280E/Rs and 7500E/Rs
  • before-fcs & replace-fcs on platforms like 7150s

EOS CLI (checked on 4.32.1F) supports all three under interface configuration mode: IntfConfigMode: [no|default] mac timestamp ( before-fcs | replace-fcs | header )

  before-fcs   insert timestamp before fcs field
  replace-fcs  replace fcs field with timestamp
  header    insert timestamp in Ethernet header

Would it make sense to cover all three available options?

  type: dict
  keys:
    ethernet_interfaces:
      items:
        keys:
+        mac_timestamp:
+          type: str
+          valid_values: ["before-fcs", "replace-fcs", "header"]

P.S. Although interface-level mac timestamp <str> commands are only active on tool port of the EoS switch running in TAP aggregation mode - EoS allows to configure 'mac timestamp ' event if these conditions are not met, so probably we can skip interface mode validations within schema and can let CV/EOS to highlight warnings (based on workspace build validations) if platform|port_mode|etc is not matching.

Fixed. Thanks.

Copy link
Contributor

@alexeygorbunov alexeygorbunov left a comment

Choose a reason for hiding this comment

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

LGTM

@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Nov 7, 2024
Copy link

sonarcloud bot commented Nov 7, 2024

@gmuloc gmuloc merged commit f22b002 into aristanetworks:devel Nov 7, 2024
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
one approval This PR has one approval and is only missing one more. rn: Feat(eos_cli_config_gen) 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.

(eos_cli_config_gen) Add mac_timestamp_header to the ethernet_interfaces data model
4 participants