diff options
author | Sagar Paul <sagpaul@redhat.com> | 2021-06-22 23:55:12 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 18:25:12 +0000 |
commit | a8e806d61fc1e4fd88592bee7e501fbe259cca99 (patch) | |
tree | ce0a89c73c8e14c173c37dd9e720e94ad2576441 /tests/integration/targets | |
parent | eb46eb529a8bcfaeb5a7e736550d7cfb612b02d7 (diff) | |
download | vyos-ansible-old-a8e806d61fc1e4fd88592bee7e501fbe259cca99.tar.gz vyos-ansible-old-a8e806d61fc1e4fd88592bee7e501fbe259cca99.zip |
Spelling glitch fix on doc (#168)
Spelling glitch fix on doc
Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'tests/integration/targets')
39 files changed, 221 insertions, 296 deletions
diff --git a/tests/integration/targets/vyos_bgp_address_family/tests/cli/merged.yaml b/tests/integration/targets/vyos_bgp_address_family/tests/cli/merged.yaml index 45870c6..f10b196 100644 --- a/tests/integration/targets/vyos_bgp_address_family/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_bgp_address_family/tests/cli/merged.yaml @@ -8,8 +8,7 @@ - include_tasks: _preconfig.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_bgp_address_family: &id001 config: @@ -55,7 +54,8 @@ - result.before == {} - result.after == merged.after - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_bgp_address_family: *id001 @@ -66,5 +66,4 @@ - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_bgp_address_family/tests/cli/rtt.yaml b/tests/integration/targets/vyos_bgp_address_family/tests/cli/rtt.yaml index 3ef93c4..bb5aea1 100644 --- a/tests/integration/targets/vyos_bgp_address_family/tests/cli/rtt.yaml +++ b/tests/integration/targets/vyos_bgp_address_family/tests/cli/rtt.yaml @@ -8,8 +8,7 @@ - include_tasks: _preconfig.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: baseconfig vyos.vyos.vyos_bgp_address_family: config: @@ -84,7 +83,5 @@ assert: that: baseconfig.after == revert.after - always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml b/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml index 8a09c01..a398b7e 100644 --- a/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_bgp_global/tests/cli/merged.yaml @@ -8,8 +8,7 @@ - include_tasks: _preconfig.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_bgp_global: &id001 config: @@ -56,7 +55,8 @@ - result.before == {} - result.after == merged.after - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_bgp_global: *id001 @@ -67,5 +67,4 @@ - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml index eda24fd..a333803 100644 --- a/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_firewall_global/tests/cli/gathered.yaml @@ -8,8 +8,7 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_firewall_global: &id001 config: @@ -29,5 +28,4 @@ that: - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_firewall_global/tests/cli/merged.yaml b/tests/integration/targets/vyos_firewall_global/tests/cli/merged.yaml index 4f22660..67a16ce 100644 --- a/tests/integration/targets/vyos_firewall_global/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_firewall_global/tests/cli/merged.yaml @@ -1,13 +1,13 @@ --- - debug: - msg: START vyos_firewall_global merged integration tests on connection={{ ansible_connection + msg: + START vyos_firewall_global merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_firewall_global: &id001 config: @@ -20,7 +20,6 @@ all: true broadcast: true state_policy: - - connection_type: established action: accept log: true @@ -28,7 +27,6 @@ - connection_type: invalid action: reject route_redirects: - - afi: ipv4 ip_src_route: true icmp_redirects: @@ -36,22 +34,18 @@ receive: false group: address_group: - - name: MGMT-HOSTS description: This group has the Management hosts address list members: - - address: 192.0.1.1 - address: 192.0.1.3 - address: 192.0.1.5 network_group: - - name: MGMT description: This group has the Management network addresses members: - - address: 192.0.1.0/24 state: merged @@ -70,7 +64,8 @@ that: - "{{ merged['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_firewall_global: *id001 @@ -85,5 +80,4 @@ that: - "{{ merged['after'] == result['before'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_firewall_global/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_firewall_global/tests/redirection/cli/shortname.yaml index 2a31413..4e134d9 100644 --- a/tests/integration/targets/vyos_firewall_global/tests/redirection/cli/shortname.yaml +++ b/tests/integration/targets/vyos_firewall_global/tests/redirection/cli/shortname.yaml @@ -6,8 +6,7 @@ - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.firewall_global: &id001 config: @@ -20,7 +19,6 @@ all: true broadcast: true state_policy: - - connection_type: established action: accept log: true @@ -28,7 +26,6 @@ - connection_type: invalid action: reject route_redirects: - - afi: ipv4 ip_src_route: true icmp_redirects: @@ -36,22 +33,18 @@ receive: false group: address_group: - - name: MGMT-HOSTS description: This group has the Management hosts address list members: - - address: 192.0.1.1 - address: 192.0.1.3 - address: 192.0.1.5 network_group: - - name: MGMT description: This group has the Management network addresses members: - - address: 192.0.1.0/24 state: merged @@ -70,7 +63,8 @@ that: - "{{ merged['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.firewall_global: *id001 @@ -85,5 +79,4 @@ that: - "{{ merged['after'] == result['before'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/gathered.yaml index fd8dd74..2593a67 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/gathered.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_firewall_interfaces gathered integration tests on connection={{ + msg: + START vyos_firewall_interfaces gathered integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -12,8 +13,7 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_firewall_interfaces: &id001 config: @@ -34,7 +34,6 @@ that: - result['changed'] == false always: - - include_tasks: _remove_config.yaml - include_tasks: _remove_firewall_config.yaml diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged.yaml index 0c28eab..10c8f01 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_firewall_interfaces merged integration tests on connection={{ + msg: + START vyos_firewall_interfaces merged integration tests on connection={{ ansible_connection }} - include_tasks: _populate_rule_sets.yaml @@ -8,18 +9,14 @@ - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_firewall_interfaces: &id001 config: - - name: eth1 access_rules: - - afi: ipv4 rules: - - direction: in name: INBOUND @@ -31,16 +28,13 @@ - afi: ipv6 rules: - - direction: local name: V6-LOCAL - name: eth2 access_rules: - - afi: ipv4 rules: - - direction: in name: INBOUND @@ -52,14 +46,14 @@ - afi: ipv6 rules: - - direction: local name: V6-LOCAL state: merged - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -74,7 +68,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_firewall_interfaces: *id001 @@ -90,7 +85,6 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml - include_tasks: _remove_firewall_config.yaml diff --git a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged_edit.yaml b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged_edit.yaml index 873f4c4..1a53cab 100644 --- a/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged_edit.yaml +++ b/tests/integration/targets/vyos_firewall_interfaces/tests/cli/merged_edit.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_firewall_interfaces merged integration tests on connection={{ + msg: + START vyos_firewall_interfaces merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -12,18 +13,14 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_firewall_interfaces: &id001 config: - - name: eth1 access_rules: - - afi: ipv4 rules: - - direction: in name: OUTBOUND @@ -33,7 +30,8 @@ - name: Assert that before dicts were correctly generated assert: - that: "{{ populate | symmetric_difference(result['before']) |length == 0\ + that: + "{{ populate | symmetric_difference(result['before']) |length == 0\ \ }}" - name: Assert that correct set of commands were generated @@ -48,7 +46,8 @@ - "{{ merged_edit['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_firewall_interfaces: *id001 @@ -64,7 +63,6 @@ - "{{ merged_edit['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml - include_tasks: _remove_firewall_config.yaml diff --git a/tests/integration/targets/vyos_firewall_rules/tests/cli/gathered.yaml b/tests/integration/targets/vyos_firewall_rules/tests/cli/gathered.yaml index 59c81aa..b824198 100644 --- a/tests/integration/targets/vyos_firewall_rules/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_firewall_rules/tests/cli/gathered.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_firewall_rules gathered integration tests on connection={{ ansible_connection + msg: + START vyos_firewall_rules gathered integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,8 +9,7 @@ - include_tasks: _populate.yaml - block: - - - name: Gather the provided configuration with the exisiting running configuration + - name: Gather the provided configuration with the existing running configuration register: result vyos.vyos.vyos_firewall_rules: config: @@ -22,5 +22,4 @@ \ }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_firewall_rules/tests/cli/merged.yaml b/tests/integration/targets/vyos_firewall_rules/tests/cli/merged.yaml index adf7e47..d8b7d17 100644 --- a/tests/integration/targets/vyos_firewall_rules/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_firewall_rules/tests/cli/merged.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_firewall_rules merged integration tests on connection={{ ansible_connection + msg: + START vyos_firewall_rules merged integration tests on connection={{ ansible_connection }} - include_tasks: _populate.yaml @@ -8,20 +9,16 @@ - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_firewall_rules: &id001 config: - - afi: ipv6 rule_sets: - - name: UPLINK description: This is ipv6 specific rule-set default_action: accept rules: - - number: 1 action: accept description: Fwipv6-Rule 1 is configured by Ansible @@ -34,12 +31,10 @@ - afi: ipv4 rule_sets: - - name: INBOUND description: IPv4 INBOUND rule set default_action: accept rules: - - number: 101 action: accept description: Rule 101 is configured by Ansible @@ -67,7 +62,8 @@ - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -82,7 +78,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_firewall_rules: *id001 @@ -98,5 +95,4 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml index ac9892c..85bf4d3 100644 --- a/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_interfaces/tests/cli/gathered.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_interfaces gathered integration tests on connection={{ ansible_connection + msg: + START vyos_interfaces gathered integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,8 +9,7 @@ - include_tasks: _populate.yaml - block: - - - name: Gather the provided configuration with the exisiting running configuration + - name: Gather the provided configuration with the existing running configuration register: result vyos.vyos.vyos_interfaces: config: @@ -22,5 +22,4 @@ \ }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml index e0fa0b9..39f4938 100644 --- a/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_interfaces/tests/cli/merged.yaml @@ -1,24 +1,22 @@ --- - debug: - msg: START vyos_interfaces merged integration tests on connection={{ ansible_connection + msg: + START vyos_interfaces merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_interfaces: &id001 config: - - name: eth1 description: Configured by Ansible - Interface 1 mtu: 1500 speed: auto duplex: auto vifs: - - vlan_id: 100 description: Eth1 - VIF 100 mtu: 400 @@ -34,7 +32,8 @@ - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -49,7 +48,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_interfaces: *id001 @@ -65,5 +65,4 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml index d2e501a..810601a 100644 --- a/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml +++ b/tests/integration/targets/vyos_interfaces/tests/redirection/cli/shortname.yaml @@ -6,18 +6,16 @@ - include_tasks: _remove_config.yaml - block: - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.interfaces: &id001 config: - - name: eth1 description: Configured by Ansible - Interface 1 mtu: 1500 speed: auto duplex: auto vifs: - - vlan_id: 100 description: Eth1 - VIF 100 mtu: 400 @@ -33,7 +31,8 @@ - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -48,7 +47,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.interfaces: *id001 diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml index 625047b..ce8faba 100644 --- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/gathered.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_l3_interfaces gathered integration tests on connection={{ ansible_connection + msg: + START vyos_l3_interfaces gathered integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,8 +9,7 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_l3_interfaces: &id001 config: @@ -30,5 +30,4 @@ that: - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_l3_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_l3_interfaces/tests/cli/merged.yaml index 99fb552..d1f7bf0 100644 --- a/tests/integration/targets/vyos_l3_interfaces/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_l3_interfaces/tests/cli/merged.yaml @@ -1,43 +1,37 @@ --- - debug: - msg: START vyos_l3_interfaces merged integration tests on connection={{ ansible_connection + msg: + START vyos_l3_interfaces merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_l3_interfaces: &id001 config: - - name: eth1 ipv4: - - address: 192.0.2.10/24 ipv6: - - address: 2001:db8::10/32 - name: eth2 ipv4: - - address: 198.51.100.10/24 vifs: - - vlan_id: 101 ipv4: - - address: 198.51.100.130/25 ipv6: - - address: 2001:db8::20/32 state: merged - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -52,7 +46,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_l3_interfaces: *id001 @@ -68,5 +63,4 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml index aca168d..3e6d8e1 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_lag_interfaces gathered integration tests on connection={{ ansible_connection + msg: + START vyos_lag_interfaces gathered integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,8 +9,7 @@ - include_tasks: _populate.yaml - block: - - - name: Gather the provided configuration with the exisiting running configuration + - name: Gather the provided configuration with the existing running configuration register: result vyos.vyos.vyos_lag_interfaces: &id001 config: @@ -22,5 +22,4 @@ \ }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml index 35f1e35..4af04ff 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_lag_interfaces merged integration tests on connection={{ ansible_connection + msg: + START vyos_lag_interfaces merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -10,17 +11,14 @@ - include_tasks: _add_bond.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_lag_interfaces: &id001 config: - - name: bond0 hash_policy: layer2 mode: active-backup members: - - member: eth1 primary: eth1 @@ -28,14 +26,14 @@ hash_policy: layer2+3 mode: active-backup members: - - member: eth2 primary: eth2 state: merged - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -50,7 +48,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_lag_interfaces: *id001 @@ -66,5 +65,4 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml index be1cdc4..005aa85 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml +++ b/tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml @@ -9,17 +9,14 @@ - include_tasks: _add_bond.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.lag_interfaces: &id001 config: - - name: bond0 hash_policy: layer2 mode: active-backup members: - - member: eth1 primary: eth1 @@ -27,14 +24,14 @@ hash_policy: layer2+3 mode: active-backup members: - - member: eth2 primary: eth2 state: merged - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -49,7 +46,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.lag_interfaces: *id001 @@ -65,5 +63,4 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml index 95e01de..7e09b6b 100644 --- a/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_lldp_global/tests/cli/gathered.yaml @@ -8,8 +8,7 @@ - include_tasks: _populate.yaml - block: - - - name: Gather the provided configuration with the exisiting running configuration + - name: Gather the provided configuration with the existing running configuration register: result vyos.vyos.vyos_lldp_global: config: @@ -21,5 +20,4 @@ - "{{ populate == result['gathered'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml index aeabc9f..dc7b7b1 100644 --- a/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_lldp_global/tests/cli/merged.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_lldp_global merged integration tests on connection={{ ansible_connection + msg: + START vyos_lldp_global merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,8 +9,7 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_lldp_global: &id001 config: @@ -34,7 +34,8 @@ that: - "{{ merged['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_lldp_global: *id001 @@ -49,5 +50,4 @@ that: - "{{ merged['after'] == result['before'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml index 180b62f..8a59955 100644 --- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/gathered.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_lldp_interfaces gathered integration tests on connection={{ ansible_connection + msg: + START vyos_lldp_interfaces gathered integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,8 +9,7 @@ - include_tasks: _populate.yaml - block: - - - name: Gather the provided configuration with the exisiting running configuration + - name: Gather the provided configuration with the existing running configuration register: result vyos.vyos.vyos_lldp_interfaces: config: @@ -21,5 +21,4 @@ - "{{ populate | symmetric_difference(result['gathered']) |length == 0\ \ }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/merged.yaml index 657961f..30c46ec 100644 --- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/merged.yaml @@ -1,23 +1,21 @@ --- - debug: - msg: START vyos_lldp_interfaces merged integration tests on connection={{ ansible_connection + msg: + START vyos_lldp_interfaces merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_lldp_interfaces: &id001 config: - - name: eth1 location: civic_based: country_code: US ca_info: - - ca_type: 0 ca_value: ENGLISH @@ -32,7 +30,8 @@ - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -47,7 +46,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_lldp_interfaces: *id001 @@ -63,5 +63,4 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/merged.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/merged.yaml index 294b6f1..fd88780 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/merged.yaml @@ -6,8 +6,7 @@ - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_ospf_interfaces: &id001 config: @@ -38,7 +37,8 @@ - result.commands|symmetric_difference(merged.commands) == [] - result.after|symmetric_difference(ansible_facts['network_resources']['ospf_interfaces']) == [] - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_ospf_interfaces: *id001 @@ -49,5 +49,4 @@ - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml index 46eb79d..039d9f6 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml @@ -5,10 +5,8 @@ - include_tasks: _remove_config.yaml - - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: baseconfig vyos.vyos.vyos_ospf_interfaces: &id001 config: @@ -53,7 +51,6 @@ - afi: "ipv6" dead_interval: 39 - - name: Revert back to base config using facts round trip become: true register: revert @@ -66,5 +63,4 @@ that: baseconfig.after == revert.after always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml index bc5e1e2..fed8c98 100644 --- a/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_ospfv2/tests/cli/gathered.yaml @@ -8,8 +8,7 @@ - include_tasks: _populate.yaml - block: - - - name: Gather the provided configuration with the exisiting running configuration + - name: Gather the provided configuration with the existing running configuration register: result vyos.vyos.vyos_ospfv2: config: @@ -20,5 +19,4 @@ that: - "{{ populate == result['gathered'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/merged.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/merged.yaml index 6a58bb5..8aced96 100644 --- a/tests/integration/targets/vyos_ospfv2/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_ospfv2/tests/cli/merged.yaml @@ -1,17 +1,17 @@ --- - debug: - msg: START vyos_ospfv2 merged integration tests on connection={{ ansible_connection + msg: + START vyos_ospfv2 merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_ospfv2: &id001 config: - log_adjacency_changes: 'detail' + log_adjacency_changes: "detail" max_metric: router_lsa: administrative: true @@ -22,48 +22,48 @@ always: true metric: 10 metric_type: 2 - route_map: 'ingress' + route_map: "ingress" mpls_te: enabled: true - router_address: '192.0.11.11' + router_address: "192.0.11.11" auto_cost: reference_bandwidth: 2 neighbor: - - neighbor_id: '192.0.11.12' + - neighbor_id: "192.0.11.12" poll_interval: 10 priority: 2 redistribute: - - route_type: 'bgp' + - route_type: "bgp" metric: 10 metric_type: 2 passive_interface: - - 'eth1' - - 'eth2' + - "eth1" + - "eth2" parameters: - router_id: '192.0.1.1' + router_id: "192.0.1.1" opaque_lsa: true rfc1583_compatibility: true - abr_type: 'cisco' + abr_type: "cisco" areas: - - area_id: '2' + - area_id: "2" area_type: normal: true authentication: "plaintext-password" - shortcut: 'enable' - - area_id: '3' + shortcut: "enable" + - area_id: "3" area_type: nssa: set: true - - area_id: '4' + - area_id: "4" area_type: stub: default_cost: 20 network: - - address: '192.0.2.0/24' + - address: "192.0.2.0/24" range: - - address: '192.0.3.0/24' + - address: "192.0.3.0/24" cost: 10 - - address: '192.0.4.0/24' + - address: "192.0.4.0/24" cost: 12 state: merged @@ -82,7 +82,8 @@ that: - "{{ merged['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_ospfv2: *id001 @@ -97,5 +98,4 @@ that: - "{{ merged['after'] == result['before'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml b/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml index 9b6823c..30df9a4 100644 --- a/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml +++ b/tests/integration/targets/vyos_ospfv2/tests/cli/merged_update.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_ospfv2 merged integration tests on connection={{ ansible_connection + msg: + START vyos_ospfv2 merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,32 +9,31 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_ospfv2: &id001 config: - log_adjacency_changes: 'detail' + log_adjacency_changes: "detail" max_metric: router_lsa: administrative: true on_shutdown: 10 on_startup: 10 passive_interface: - - 'eth1' + - "eth1" areas: - - area_id: '3' + - area_id: "3" area_type: nssa: set: true - - area_id: '4' + - area_id: "4" area_type: stub: set: false network: - - address: '192.0.2.0/24' - - address: '192.0.22.0/24' - - address: '192.0.32.0/24' + - address: "192.0.2.0/24" + - address: "192.0.22.0/24" + - address: "192.0.32.0/24" state: merged - name: Assert that before dicts were correctly generated @@ -51,7 +51,8 @@ that: - "{{ merged_update['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_ospfv2: *id001 @@ -66,5 +67,4 @@ that: - "{{ merged_update['after'] == result['before'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospfv2/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_ospfv2/tests/redirection/cli/shortname.yaml index ecaf4bd..15295d1 100644 --- a/tests/integration/targets/vyos_ospfv2/tests/redirection/cli/shortname.yaml +++ b/tests/integration/targets/vyos_ospfv2/tests/redirection/cli/shortname.yaml @@ -6,11 +6,11 @@ - include_tasks: _remove_config.yaml - block: - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.ospfv2: &id001 config: - log_adjacency_changes: 'detail' + log_adjacency_changes: "detail" max_metric: router_lsa: administrative: true @@ -21,48 +21,48 @@ always: true metric: 10 metric_type: 2 - route_map: 'ingress' + route_map: "ingress" mpls_te: enabled: true - router_address: '192.0.11.11' + router_address: "192.0.11.11" auto_cost: reference_bandwidth: 2 neighbor: - - neighbor_id: '192.0.11.12' + - neighbor_id: "192.0.11.12" poll_interval: 10 priority: 2 redistribute: - - route_type: 'bgp' + - route_type: "bgp" metric: 10 metric_type: 2 passive_interface: - - 'eth1' - - 'eth2' + - "eth1" + - "eth2" parameters: - router_id: '192.0.1.1' + router_id: "192.0.1.1" opaque_lsa: true rfc1583_compatibility: true - abr_type: 'cisco' + abr_type: "cisco" areas: - - area_id: '2' + - area_id: "2" area_type: normal: true authentication: "plaintext-password" - shortcut: 'enable' - - area_id: '3' + shortcut: "enable" + - area_id: "3" area_type: nssa: set: true - - area_id: '4' + - area_id: "4" area_type: stub: default_cost: 20 network: - - address: '192.0.2.0/24' + - address: "192.0.2.0/24" range: - - address: '192.0.3.0/24' + - address: "192.0.3.0/24" cost: 10 - - address: '192.0.4.0/24' + - address: "192.0.4.0/24" cost: 12 state: merged @@ -81,7 +81,8 @@ that: - "{{ merged['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.ospfv2: *id001 diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml index 6645b99..1be8f8d 100644 --- a/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_ospfv3/tests/cli/gathered.yaml @@ -8,8 +8,7 @@ - include_tasks: _populate.yaml - block: - - - name: Gather the provided configuration with the exisiting running configuration + - name: Gather the provided configuration with the existing running configuration register: result vyos.vyos.vyos_ospfv3: config: @@ -21,5 +20,4 @@ - "{{ populate == result['gathered'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/merged.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/merged.yaml index 9309500..7bbc3c6 100644 --- a/tests/integration/targets/vyos_ospfv3/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_ospfv3/tests/cli/merged.yaml @@ -1,31 +1,31 @@ --- - debug: - msg: START vyos_ospfv3 merged integration tests on connection={{ ansible_connection + msg: + START vyos_ospfv3 merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_ospfv3: &id001 config: areas: - - area_id: '2' - export_list: 'export1' - import_list: 'import1' + - area_id: "2" + export_list: "export1" + import_list: "import1" range: - - address: '2001:db10::/32' - - address: '2001:db20::/32' - - address: '2001:db30::/32' - - area_id: '3' + - address: "2001:db10::/32" + - address: "2001:db20::/32" + - address: "2001:db30::/32" + - area_id: "3" range: - - address: '2001:db40::/32' + - address: "2001:db40::/32" parameters: - router_id: '192.0.2.10' + router_id: "192.0.2.10" redistribute: - - route_type: 'bgp' + - route_type: "bgp" state: merged - name: Assert that before dicts were correctly generated @@ -43,7 +43,8 @@ that: - "{{ merged['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_ospfv3: *id001 @@ -58,5 +59,4 @@ that: - "{{ merged['after'] == result['before'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml b/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml index 0d506b3..c6f0e8b 100644 --- a/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml +++ b/tests/integration/targets/vyos_ospfv3/tests/cli/merged_update.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_ospfv3 merged integration tests on connection={{ ansible_connection + msg: + START vyos_ospfv3 merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,23 +9,22 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_ospfv3: &id001 config: areas: - - area_id: '2' + - area_id: "2" range: - - address: '2001:db10::/32' - - area_id: '3' + - address: "2001:db10::/32" + - area_id: "3" range: - - address: '2001:db40::/32' - - address: '2001:db70::/32' + - address: "2001:db40::/32" + - address: "2001:db70::/32" parameters: - router_id: '192.0.2.10' + router_id: "192.0.2.10" redistribute: - - route_type: 'bgp' + - route_type: "bgp" state: merged - name: Assert that before dicts were correctly generated @@ -42,7 +42,8 @@ that: - "{{ merged_update['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_ospfv3: *id001 @@ -57,5 +58,4 @@ that: - "{{ merged_update['after'] == result['before'] }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_ospfv3/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_ospfv3/tests/redirection/cli/shortname.yaml index fdeeb89..65935e6 100644 --- a/tests/integration/targets/vyos_ospfv3/tests/redirection/cli/shortname.yaml +++ b/tests/integration/targets/vyos_ospfv3/tests/redirection/cli/shortname.yaml @@ -6,25 +6,25 @@ - include_tasks: _remove_config.yaml - block: - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.ospfv3: &id001 config: areas: - - area_id: '2' - export_list: 'export1' - import_list: 'import1' + - area_id: "2" + export_list: "export1" + import_list: "import1" range: - - address: '2001:db10::/32' - - address: '2001:db20::/32' - - address: '2001:db30::/32' - - area_id: '3' + - address: "2001:db10::/32" + - address: "2001:db20::/32" + - address: "2001:db30::/32" + - area_id: "3" range: - - address: '2001:db40::/32' + - address: "2001:db40::/32" parameters: - router_id: '192.0.2.10' + router_id: "192.0.2.10" redistribute: - - route_type: 'bgp' + - route_type: "bgp" state: merged - name: Assert that before dicts were correctly generated @@ -42,7 +42,8 @@ that: - "{{ merged['after'] == result['after'] }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.ospfv3: *id001 diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml index 2b86969..56812e4 100644 --- a/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_route_maps/tests/cli/merged.yaml @@ -6,8 +6,7 @@ - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_route_maps: &id001 config: @@ -45,7 +44,8 @@ - result.commands|symmetric_difference(merged.commands) == [] - result.after|symmetric_difference(ansible_facts['network_resources']['route_maps']) == [] - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_route_maps: *id001 @@ -56,5 +56,4 @@ - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml index 1675ec5..893f563 100644 --- a/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml +++ b/tests/integration/targets/vyos_route_maps/tests/cli/replaced.yaml @@ -8,8 +8,7 @@ - include_tasks: _populate.yaml - block: - - - name: Replace the provided configuration with the exisiting running configuration + - name: Replace the provided configuration with the existing running configuration register: result vyos.vyos.vyos_route_maps: &id001 config: @@ -41,7 +40,8 @@ - result.commands|symmetric_difference(replaced.commands) == [] - result.after|symmetric_difference(ansible_facts['network_resources']['route_maps']) == [] - - name: Replace the provided configuration with the existing running configuration + - name: + Replace the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_route_maps: *id001 @@ -52,5 +52,4 @@ - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_route_maps/tests/cli/rtt.yaml b/tests/integration/targets/vyos_route_maps/tests/cli/rtt.yaml index 2a95f1f..5c54c23 100644 --- a/tests/integration/targets/vyos_route_maps/tests/cli/rtt.yaml +++ b/tests/integration/targets/vyos_route_maps/tests/cli/rtt.yaml @@ -6,8 +6,7 @@ - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: baseconfig vyos.vyos.vyos_route_maps: config: @@ -77,5 +76,4 @@ that: baseconfig.after == revert.after always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml index d3b84d1..8435d04 100644 --- a/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml +++ b/tests/integration/targets/vyos_static_routes/tests/cli/gathered.yaml @@ -1,6 +1,7 @@ --- - debug: - msg: START vyos_static_routes gathered integration tests on connection={{ ansible_connection + msg: + START vyos_static_routes gathered integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml @@ -8,8 +9,7 @@ - include_tasks: _populate.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_static_routes: &id001 config: @@ -30,5 +30,4 @@ that: - result['changed'] == false always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml b/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml index 999ae86..19e71fa 100644 --- a/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml +++ b/tests/integration/targets/vyos_static_routes/tests/cli/merged.yaml @@ -1,41 +1,34 @@ --- - debug: - msg: START vyos_static_routes merged integration tests on connection={{ ansible_connection + msg: + START vyos_static_routes merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.vyos_static_routes: &id001 config: - - address_families: - - afi: ipv4 routes: - - dest: 192.0.2.32/28 blackhole_config: type: blackhole next_hops: - - forward_router_address: 192.0.2.10 - forward_router_address: 192.0.2.9 - address_families: - - afi: ipv6 routes: - - dest: 2001:db8:1000::/36 blackhole_config: distance: 2 next_hops: - - forward_router_address: 2001:db8:2000:2::1 - forward_router_address: 2001:db8:2000:2::2 @@ -43,7 +36,8 @@ - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -58,7 +52,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.vyos_static_routes: *id001 @@ -74,5 +69,4 @@ - "{{ merged['after'] | symmetric_difference(result['before']) |length\ \ == 0 }}" always: - - include_tasks: _remove_config.yaml diff --git a/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml index 08c22b9..364866e 100644 --- a/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml +++ b/tests/integration/targets/vyos_static_routes/tests/redirection/cli/shortname.yaml @@ -1,40 +1,34 @@ --- - debug: - msg: START shortname merged integration tests on connection={{ ansible_connection + msg: + START shortname merged integration tests on connection={{ ansible_connection }} - include_tasks: _remove_config.yaml - block: - - name: Merge the provided configuration with the exisiting running configuration + - name: Merge the provided configuration with the existing running configuration register: result vyos.vyos.static_routes: &id001 config: - - address_families: - - afi: ipv4 routes: - - dest: 192.0.2.32/28 blackhole_config: type: blackhole next_hops: - - forward_router_address: 192.0.2.10 - forward_router_address: 192.0.2.9 - address_families: - - afi: ipv6 routes: - - dest: 2001:db8:1000::/36 blackhole_config: distance: 2 next_hops: - - forward_router_address: 2001:db8:2000:2::1 - forward_router_address: 2001:db8:2000:2::2 @@ -42,7 +36,8 @@ - name: Assert that before dicts were correctly generated assert: - that: "{{ merged['before'] | symmetric_difference(result['before']) |length\ + that: + "{{ merged['before'] | symmetric_difference(result['before']) |length\ \ == 0 }}" - name: Assert that correct set of commands were generated @@ -57,7 +52,8 @@ - "{{ merged['after'] | symmetric_difference(result['after']) |length\ \ == 0 }}" - - name: Merge the provided configuration with the existing running configuration + - name: + Merge the provided configuration with the existing running configuration (IDEMPOTENT) register: result vyos.vyos.static_routes: *id001 |