-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(eos_cli_config_gen): Add support for ip name server groups
- Loading branch information
Laxmikant Chintakindi
authored and
Laxmikant Chintakindi
committed
Nov 26, 2024
1 parent
766dd59
commit 13bff48
Showing
15 changed files
with
183 additions
and
29 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
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
20 changes: 20 additions & 0 deletions
20
...rista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/ip_name_server_groups.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,20 @@ | ||
--- | ||
ip_name_server_groups: | ||
- name: mynameserver1 | ||
ip_domain_list: domain-list1 | ||
dns_domain: arista.avd.com | ||
name_servers: | ||
- ip_address: 8.8.8.8 | ||
vrf: vrf1 | ||
- ip_address: 1.1.1.1 | ||
- ip_address: 2.2.2.2 | ||
vrf: vrf1 | ||
priority: 1 | ||
- name: mynameserver0 | ||
ip_domain_list: domain-list1 | ||
dns_domain: arista.avd.com | ||
name_servers: | ||
- ip_address: 8.8.8.8 | ||
- ip_address: 1.1.1.1 | ||
- ip_address: 2.2.2.2 | ||
priority: 1 |
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
38 changes: 38 additions & 0 deletions
38
...ctions/arista/avd/roles/eos_cli_config_gen/docs/tables/ip-name-server-groups.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
..._collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ip-name-servers.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
...ections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.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
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/eos/ip-name-server-groups.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. | ||
#} | ||
{% for name_server_group in ip_name_server_groups | arista.avd.natural_sort("name") %} | ||
! | ||
ip name-server group {{ name_server_group.name }} | ||
{% for name_server in name_server_group.name_servers | arista.avd.natural_sort("ip_address") %} | ||
{% if name_server.priority is not arista.avd.defined %} | ||
{% set name_server_cli = "name-server vrf " ~ name_server.vrf | arista.avd.default("default") ~ " " ~ name_server.ip_address %} | ||
{{ name_server_cli }} | ||
{% endif %} | ||
{% endfor %} | ||
{% for name_server in name_server_group.name_servers | arista.avd.natural_sort("ip_address") %} | ||
{% if name_server.priority is arista.avd.defined %} | ||
{% set name_server_cli = "name-server vrf " ~ name_server.vrf | arista.avd.default("default") ~ " " ~ name_server.ip_address ~ " priority " ~ name_server.priority %} | ||
{{ name_server_cli }} | ||
{% endif %} | ||
{% endfor %} | ||
{% if name_server_group.dns_domain is arista.avd.defined %} | ||
dns domain {{ name_server_group.dns_domain }} | ||
{% endif %} | ||
{% if name_server_group.ip_domain_list is arista.avd.defined %} | ||
ip domain-list {{ name_server_group.ip_domain_list }} | ||
{% endif %} | ||
{% endfor %} |
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
49 changes: 34 additions & 15 deletions
49
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.
24 changes: 24 additions & 0 deletions
24
...on-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/ip_name_server_groups.schema.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,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. | ||
# 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: | ||
ip_name_server_groups: | ||
type: list | ||
primary_key: name | ||
items: | ||
type: dict | ||
keys: | ||
name: | ||
type: str | ||
name_servers: | ||
type: list | ||
$ref: "eos_cli_config_gen#/$defs/ip_name_servers" | ||
dns_domain: | ||
type: str | ||
ip_domain_list: | ||
type: str | ||
description: Set domain names to complete unqualified host names. |
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
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