From b9759d1bf8c2aeba264984593ed30c6f87bb6dea Mon Sep 17 00:00:00 2001 From: Mahesh Kumar <122076792+MaheshGSLAB@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:12:09 +0530 Subject: [PATCH] Cut(eos_cli_config_gen): Remove the deprecated keys for name-server (#4290) Co-authored-by: gmuloc --- .../arista/avd/docs/porting-guides/5.x.x.md | 2 +- .../documentation/devices/host1.md | 17 ----------- .../intended/configs/host1.cfg | 2 -- .../inventory/host_vars/host1/name-server.yml | 9 ------ .../docs/input-variables.md | 6 ---- .../docs/tables/ip-name-servers.md | 1 + .../docs/tables/name-server.md | 29 ------------------- .../documentation/ip-name-servers.j2 | 6 +--- .../j2templates/documentation/management.j2 | 2 -- .../j2templates/eos/ip-name-servers.j2 | 8 ----- .../schema/eos_cli_config_gen.schema.yml | 16 ++-------- .../schema_fragments/name_server.schema.yml | 16 ++-------- 12 files changed, 9 insertions(+), 105 deletions(-) delete mode 100644 ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/name-server.yml delete mode 100644 ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/name-server.md diff --git a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md index 5bfd4a54443..57bcac8c963 100644 --- a/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md +++ b/ansible_collections/arista/avd/docs/porting-guides/5.x.x.md @@ -77,7 +77,7 @@ The following data model keys have been removed from `eos_cli_config_gen` in v5. | old key 4.1(management_api_gnmi) | new key(TODO) | | old key 4.2(management_api_gnmi) | new key(TODO) | | management_security.entropy_source | management_security.entropy_sources | -| old key 6(name_server) | new key(TODO) | +| name_server | ip_name_servers | | old key 7.1(port_channel_interfaces) | new key(TODO) | | old key 7.2(port_channel_interfaces) | new key(TODO) | | old key 8(radius_servers) | new key(TODO) | diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/documentation/devices/host1.md index 22c3c607370..12f89df1dce 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/documentation/devices/host1.md @@ -4,7 +4,6 @@ - [Management](#management) - [Management Interfaces](#management-interfaces) - - [IP Name Servers](#ip-name-servers) - [Domain Lookup](#domain-lookup) - [Management SSH](#management-ssh) - [Management API gNMI](#management-api-gnmi) @@ -113,22 +112,6 @@ interface Management1 ip address 10.73.255.122/24 ``` -### IP Name Servers - -#### IP Name Servers Summary - -| Name Server | VRF | Priority | -| ----------- | --- | -------- | -| 10.10.128.10 | mgt | - | -| 10.10.129.10 | mgt | - | - -#### IP Name Servers Device Configuration - -```eos -ip name-server vrf mgt 10.10.128.10 -ip name-server vrf mgt 10.10.129.10 -``` - ### Domain Lookup #### DNS Domain Lookup Summary diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/intended/configs/host1.cfg index 1d58d1c6629..1ca872f2552 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/intended/configs/host1.cfg @@ -50,8 +50,6 @@ mac security hostname host1 ip domain lookup source-interface Loopback0 ip domain lookup vrf mgt source-interface Management0 -ip name-server vrf mgt 10.10.128.10 -ip name-server vrf mgt 10.10.129.10 ! radius-server host 10.10.10.157 vrf mgt key 7 071B245F5A radius-server host 10.10.10.249 key 7 071B245F5A diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/name-server.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/name-server.yml deleted file mode 100644 index d4c85a86d65..00000000000 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_deprecated_vars/inventory/host_vars/host1/name-server.yml +++ /dev/null @@ -1,9 +0,0 @@ -### Name Servers ### -# -# Testing name_server deprecated in 4.0.0. To be removed in 5.0.0 -name_server: - source: - vrf: mgt - nodes: - - 10.10.128.10 - - 10.10.129.10 diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md index dcd71896859..db0450461b3 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/input-variables.md @@ -529,12 +529,6 @@ roles/eos_cli_config_gen/docs/tables/management-ssh.md roles/eos_cli_config_gen/docs/tables/management-tech-support.md --8<-- -### Name server - ---8<-- -roles/eos_cli_config_gen/docs/tables/name-server.md ---8<-- - ### NTP --8<-- diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ip-name-servers.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ip-name-servers.md index 9989f3fed86..6c325315140 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ip-name-servers.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/ip-name-servers.md @@ -11,6 +11,7 @@ | [  - ip_address](## "ip_name_servers.[].ip_address") | String | | | | IPv4 or IPv6 address for DNS server. | | [    vrf](## "ip_name_servers.[].vrf") | String | | | | VRF Name. | | [    priority](## "ip_name_servers.[].priority") | Integer | | | Min: 0
Max: 4 | Priority value (lower is first). | + | [name_server](## "name_server") removed | Dictionary | | | | This key was removed. Support was removed in AVD version v5.0.0. Use ip_name_servers instead. | === "YAML" diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/name-server.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/name-server.md deleted file mode 100644 index 9dabeab0c53..00000000000 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/name-server.md +++ /dev/null @@ -1,29 +0,0 @@ - -=== "Table" - - | Variable | Type | Required | Default | Value Restrictions | Description | - | -------- | ---- | -------- | ------- | ------------------ | ----------- | - | [name_server](## "name_server") deprecated | Dictionary | | | | This key is deprecated. Support will be removed in AVD version v5.0.0. Use ip_name_servers instead. | - | [  source](## "name_server.source") | Dictionary | | | | | - | [    vrf](## "name_server.source.vrf") | String | | | | VRF Name. | - | [  nodes](## "name_server.nodes") | List, items: String | | | | | - | [    - <str>](## "name_server.nodes.[]") | String | | | | | - -=== "YAML" - - ```yaml - # This key is deprecated. - # Support will be removed in AVD version v5.0.0. - # Use ip_name_servers instead. - name_server: - source: - - # VRF Name. - vrf: - nodes: - - - ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ip-name-servers.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ip-name-servers.j2 index fc42283a29d..825d9619964 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ip-name-servers.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ip-name-servers.j2 @@ -4,7 +4,7 @@ that can be found in the LICENSE file. #} {# doc - ip name servers #} -{% if ip_name_servers is arista.avd.defined or name_server is arista.avd.defined %} +{% if ip_name_servers is arista.avd.defined %} ### IP Name Servers @@ -15,10 +15,6 @@ {% for name_server in ip_name_servers | arista.avd.default([]) %} | {{ name_server.ip_address }} | {{ name_server.vrf | arista.avd.default('-') }} | {{ name_server.priority | arista.avd.default('-') }} | {% endfor %} -{# legacy data model to be removed in AVD 5.0.0 #} -{% for node in name_server.nodes | arista.avd.default([]) %} -| {{ node }} | {{ name_server.source.vrf | arista.avd.default('-') }} | - | -{% endfor %} #### IP Name Servers Device Configuration diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/management.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/management.j2 index 8154653abdf..d61dd5499c4 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/management.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/management.j2 @@ -3,12 +3,10 @@ Use of this source code is governed by the Apache License 2.0 that can be found in the LICENSE file. #} -{# Remove name_server from the list below in AVD v5.0.0 #} {% if management_interfaces is arista.avd.defined or dns_domain is arista.avd.defined or domain_list is arista.avd.defined or ip_name_servers is arista.avd.defined - or name_server is arista.avd.defined or ip_domain_lookup is arista.avd.defined or clock is arista.avd.defined or ntp is arista.avd.defined diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ip-name-servers.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ip-name-servers.j2 index 16391f4ffcb..182718cc7fc 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ip-name-servers.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/ip-name-servers.j2 @@ -15,11 +15,3 @@ {% endif %} {{ name_server_cli }} {% endfor %} -{# legacy data model to be removed in AVD v5.0.0 #} -{% for node in name_server.nodes | arista.avd.natural_sort %} -{% if name_server.source.vrf is arista.avd.defined %} -ip name-server vrf {{ name_server.source.vrf }} {{ node }} -{% else %} -ip name-server {{ node }} -{% endif %} -{% endfor %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index 6fcb35ab268..b6174b42b86 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -7967,24 +7967,14 @@ keys: type: bool description: Enables the MPLS tunneling of TTL exceeded ICMP replies. name_server: + documentation_options: + table: ip-name-servers deprecation: + removed: true warning: true new_key: ip_name_servers remove_in_version: v5.0.0 type: dict - keys: - source: - type: dict - keys: - vrf: - description: VRF Name. - type: str - convert_types: - - int - nodes: - type: list - items: - type: str ntp: type: dict keys: diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/name_server.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/name_server.schema.yml index 7a8254bf45a..e11e8342833 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/name_server.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/name_server.schema.yml @@ -7,21 +7,11 @@ type: dict keys: name_server: + documentation_options: + table: ip-name-servers deprecation: + removed: true warning: true new_key: ip_name_servers remove_in_version: v5.0.0 type: dict - keys: - source: - type: dict - keys: - vrf: - description: VRF Name. - type: str - convert_types: - - int - nodes: - type: list - items: - type: str