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

Refactor(eos_cli_config_gen): Wildcard dict to list for tcam-profile #1753

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tcam_profile:
system: traffic_policy
profiles:
traffic_policy: "{{lookup('file', '{{ root_dir }}/inventory/TCAM_TRAFFIC_POLICY.conf')}}"
- name: traffic_policy
config: "{{lookup('file', '{{ root_dir }}/inventory/TCAM_TRAFFIC_POLICY.conf')}}"
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,8 @@ hardware_counters:
tcam_profile:
system: < tcam profile name to activate >
profiles:
< tcam_profile 01 >: "{{ lookup('file', '< path to TCAM profile using EOS syntax >') }}"
- name: < tcam_profile 01 >
config: "{{ lookup('file', '< path to TCAM profile using EOS syntax >') }}"
```

#### Platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ TCAM profile __`{{ tcam_profile.system | arista.avd.default('default') }}`__ is

Following TCAM profiles are configured on device:

{% for profile in tcam_profile.profiles %}
- Profile Name: `{{ profile }}`
{% for profile in tcam_profile.profiles | arista.avd.convert_dicts('name','config') %}
- Profile Name: `{{ profile.name }}`
{% endfor %}
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
!
hardware tcam
{% if tcam_profile.profiles is arista.avd.defined %}
{% for profile in tcam_profile.profiles | arista.avd.natural_sort %}
profile {{ profile }}
{{ tcam_profile.profiles[profile] }}
{% for profile in tcam_profile.profiles | arista.avd.convert_dicts('name','config') | arista.avd.natural_sort('name') %}
profile {{ profile.name }}
{{ profile.config }}
!
{% endfor %}
{% endif %}
Expand Down