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

Allow 'comment' to interfaces/portprofiles/.. #4672

Open
1 task done
PieterL75 opened this issue Oct 30, 2024 · 3 comments
Open
1 task done

Allow 'comment' to interfaces/portprofiles/.. #4672

PieterL75 opened this issue Oct 30, 2024 · 3 comments
Labels
type: enhancement New feature or request

Comments

@PieterL75
Copy link

PieterL75 commented Oct 30, 2024

Enhancement summary

EOS allows you to add 'comments' in a lot of places.
This FR is to add the 'comments' knob in all possible places.

Which component of AVD is impacted

eos_designs, eos_cli_config_gen

Use case example

When applying a port-profile to an interfaces, it would be great if we can add that profilename to the 'comment' of the interfaces.
This gives people reviewing the config more insight to the AVD design behind it, and what profile to update

As there are many more places the comment field is available, all of them can get a similar usecase

Describe the solution you would like

Add the 'comment' field native to the cli_config and the design, were relevant

Describe alternatives you have considered

The comment can be added with raw_eos_cli, it renders a good config, but it fails when deployed ("Invalid input (at token 0: 'AVDProfile:')")

    raw_eos_cli: |
      comment
      AVDProfile: MyCoolProfile
     EOF

Additional context

No response

Contributing Guide

  • I agree to follow this project's Code of Conduct
@PieterL75 PieterL75 added the type: enhancement New feature or request label Oct 30, 2024
@gmuloc
Copy link
Contributor

gmuloc commented Oct 30, 2024

May be a duplicate (though with a more limited scope) of this one: #2863

@PieterL75
Copy link
Author

Additional :

  • a design-knob that automatically adds the portprofile as a comment to the interface..
    ex:
    portprofile_add_as_comment: <bool; default false>
    portprofile_comment_template: <str; default "AVDPortProfile: profilename">

@ClausHolbechArista
Copy link
Contributor

I think this could be used in many different ways, so I would prefer a more generic solution. Maybe we could add a comment field like we have the description field where we support various computed "fields" (port-profile could be one of them). Please take a look at the 5.0 documentation for descriptions. How-to and snip from inputs doc for connected endpoints:

        # Unique description per port. When set, takes priority over description.
        # This can be a template using the AVD string formatter syntax: https://avd.arista.com/devel/roles/eos_designs/docs/how-to/custom-descriptions-names.html#avd-string-formatter-syntax.
        # The available template fields are:
        #   - `endpoint_type` - the `type` from `connected_endpoints_keys` like `server`, `router` etc.
        #   - `endpoint` - The name of the connected endpoint
        #   - `endpoint_port` - The value from `endpoint_ports` for this switch port if set.
        #   - `port_channel_id`: The port-channel number for the switch.
        descriptions: <list>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants