From 53f373c984f2552f9e77221f95f00a014074649c Mon Sep 17 00:00:00 2001 From: roverflow Date: Thu, 21 Nov 2024 17:37:23 +0530 Subject: [PATCH] renderend --- .../tests/common/rendered.yaml | 49 +++++++++++++++++++ .../nxos_vrf_address_family/vars/main.yaml | 15 ++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/integration/targets/nxos_vrf_address_family/tests/common/rendered.yaml diff --git a/tests/integration/targets/nxos_vrf_address_family/tests/common/rendered.yaml b/tests/integration/targets/nxos_vrf_address_family/tests/common/rendered.yaml new file mode 100644 index 000000000..1ea69367c --- /dev/null +++ b/tests/integration/targets/nxos_vrf_address_family/tests/common/rendered.yaml @@ -0,0 +1,49 @@ +--- +- ansible.builtin.debug: + msg: START nxos_vrf_address_family rendered integration tests on connection={{ ansible_connection }} + +- ansible.builtin.include_tasks: _remove_config.yaml + +- block: + - name: Render provided configuration with device configuration + register: result + cisco.nxos.nxos_vrf_address_family: + config: + - name: VRF1 + address_families: + - afi: ipv6 + safi: unicast + route_target: + - export: 65512:200 + maximum: + max_routes: 500 + max_route_options: + threshold: + threshold_value: 60 + reinstall_threshold: 80 + export: + - map: "22" + - vrf: + allow_vpn: true + map_import: "44" + - vrf: + allow_vpn: true + - name: temp + address_families: + - afi: ipv4 + safi: unicast + route_target: + - import: 65512:200 + maximum: + max_routes: 1000 + export: + - map: "26" + - vrf: + allow_vpn: true + map_import: "46" + state: rendered + + - ansible.builtin.assert: + that: + - result.changed == false + - result.rendered|symmetric_difference(rendered.commands) == [] diff --git a/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml b/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml index bcd04a6db..18b330a44 100644 --- a/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml +++ b/tests/integration/targets/nxos_vrf_address_family/vars/main.yaml @@ -253,3 +253,18 @@ overridden: - route-target import 65512:200 - export map 26 - export vrf default map 46 allow-vpn +rendered: + commands: + - vrf context VRF1 + - address-family ipv6 unicast + - maximum routes 500 60 reinstall 80 + - route-target export 65512:200 + - export map 22 + - export vrf default map 44 allow-vpn + - export vrf allow-vpn + - vrf context temp + - address-family ipv4 unicast + - maximum routes 1000 + - route-target import 65512:200 + - export map 26 + - export vrf default map 46 allow-vpn