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): Remove error handling for missing name in hardware-counters #4302

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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ all:
children:
EOS_CLI_CONFIG_GEN_NEGATIVE_TESTS:
hosts:
hardware-counters:
router-bfd-dangerous-interval-false:
router-bfd-dangerous-interval-not-set:

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
| Feature | Flow Direction | Address Type | Layer3 | VRF | Prefix | Units Packets |
| ------- | -------------- | ------------ | ------ | --- | ------ | ------------- |
{% for feature in hardware_counters.features | arista.avd.natural_sort("name") %}
{% do feature.name is arista.avd.defined(fail_action="error", var_name="The data model 'hardware_counters' changed in AVD4.0.0. 'hardware_counters.features.name'") %}
{% set feature_direction = feature.direction | arista.avd.default("-") %}
{% set feature_address_type = feature.address_type | arista.avd.default("-") %}
{% set feature_vrf = feature.vrf | arista.avd.default("-") %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
{% if hardware_counters.features is arista.avd.defined %}
!
{% for feature in hardware_counters.features | arista.avd.natural_sort("name") %}
{% set hardware_counters_cli = "" %}
{% if feature.name is arista.avd.defined(fail_action="error", var_name="The data model 'hardware_counters' changed in AVD4.0.0. 'hardware_counters.features.name'") %}
{% set hardware_counters_cli = "hardware counter feature " ~ feature.name %}
{% endif %}
{% set hardware_counters_cli = "hardware counter feature " ~ feature.name %}
{% if feature.direction is arista.avd.defined %}
{% set hardware_counters_cli = hardware_counters_cli ~ " " ~ feature.direction %}
{% endif %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ keys:
hardware counter feature route ipv4 vrf test 192.168.0.0/24
```

# primary_key: name
# no primary key to allow multiple times the same name
items:
type: dict
Expand Down Expand Up @@ -92,6 +91,7 @@ keys:
- vni encap
- vtep decap
- vtep encap
required: true
direction:
type: str
valid_values:
Expand Down
Loading