-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added eos_cli_config_gen recirc_interfaces model and templates
- Loading branch information
1 parent
cb144b5
commit dbee146
Showing
8 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...ollections/arista/avd/roles/eos_cli_config_gen/docs/tables/recirc-interfaces.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/recirc-interfaces.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{# | ||
Copyright (c) 2023-2024 Arista Networks, Inc. | ||
Use of this source code is governed by the Apache License 2.0 | ||
that can be found in the LICENSE file. | ||
#} | ||
{# doc - recirc interfaces #} | ||
{% if recirc_interfaces is arista.avd.defined %} | ||
|
||
### Recirculation Interfaces | ||
|
||
#### Recirculation Interfaces Summary | ||
|
||
| Interface | Description | Shutdown | Recirc Features | | ||
| --------- | ----------- | -------- | --------------- | | ||
{% for recirc_interface in recirc_interfaces | arista.avd.natural_sort('name') %} | ||
{% set description = recirc_interface.description | arista.avd.default("-") %} | ||
{% set shutdown = recirc_interface.shutdown | arista.avd.default("-") %} | ||
{% set recirculation_features = recirc_interface.recirculation_features | arista.avd.default("-") %} | ||
| {{ recirc_interface.name }} | {{ description }} | {{ shutdown }} | {{ recirculation_features }} | | ||
{% endfor %} | ||
|
||
#### Recirculation Interfaces Device Configuration | ||
|
||
```eos | ||
{% include 'eos/recirc-interfaces.j2' %} | ||
``` | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/recirc-interfaces.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{# | ||
Copyright (c) 2023-2024 Arista Networks, Inc. | ||
Use of this source code is governed by the Apache License 2.0 | ||
that can be found in the LICENSE file. | ||
#} | ||
{# eos - recirc interfaces #} | ||
{% for recirc_interface in recirc_interfaces | arista.avd.natural_sort('name') %} | ||
! | ||
interface {{ recirc_interface.name }} | ||
{% if recirc_interface.description is arista.avd.defined %} | ||
description {{ recirc_interface.description }} | ||
{% endif %} | ||
{% if recirc_interface.shutdown is arista.avd.defined(true) %} | ||
shutdown | ||
{% elif recirc_interface.shutdown is arista.avd.defined(false) %} | ||
no shutdown | ||
{% endif %} | ||
{% if recirc_interface.recirculation_features is arista.avd.defined %} | ||
switchport recirculation features {{ recirc_interface.recirculation_features }} | ||
{% endif %} | ||
{% if recirc_interface.eos_cli is arista.avd.defined %} | ||
{{ recirc_interface.eos_cli | indent(3, false) }} | ||
{% endif %} | ||
{% endfor %} |
25 changes: 25 additions & 0 deletions
25
python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/recirc_interfaces.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) 2023-2024 Arista Networks, Inc. | ||
# Use of this source code is governed by the Apache License 2.0 | ||
# that can be found in the LICENSE file. | ||
# yaml-language-server: $schema=../../../_schema/avd_meta_schema.json | ||
# Line above is used by RedHat's YAML Schema vscode extension | ||
# Use Ctrl + Space to get suggestions for every field. Autocomplete will pop up after typing 2 letters. | ||
type: dict | ||
keys: | ||
recirc_interfaces: | ||
type: list | ||
primary_key: name | ||
items: | ||
type: dict | ||
keys: | ||
name: | ||
type: str | ||
description: "Recirculation interface name." | ||
description: | ||
type: str | ||
shutdown: | ||
type: bool | ||
recirculation_features: | ||
type: str | ||
valid_values: ["vxlan", "telemetry inband", "openflow", "cpu-mirror"] | ||
description: "Set the feature that will use this port for recirculation." | ||
eos_cli: | ||
type: str | ||
description: "Multiline String with EOS CLI rendered directly on the Dps interface in the final EOS configuration." |