summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_ospf_interfaces
diff options
context:
space:
mode:
authorNilashish Chakraborty <nilashishchakraborty8@gmail.com>2024-06-25 14:54:01 +0530
committerGitHub <noreply@github.com>2024-06-25 14:54:01 +0530
commitb872b6f21d14ff10c221d84217eb568318e9ad8b (patch)
tree0aacdea877a7e2b209735cd0f7c0b9d62a9446f7 /tests/integration/targets/vyos_ospf_interfaces
parent37baff3d4d547911bec1387218edfd477ca79062 (diff)
downloadvyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.tar.gz
vyos.vyos-b872b6f21d14ff10c221d84217eb568318e9ad8b.zip
`vyos.vyos` is no longer deprecated! 🎉 (#348)
* Remove deprecation notice for vyos.vyos Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Add changelog Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * fix review comments Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * chore: auto fixes from pre-commit.com hooks --------- Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'tests/integration/targets/vyos_ospf_interfaces')
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml9
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/empty_config.yaml7
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml3
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/merged.yaml19
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml16
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml4
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/rendered.yaml15
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml21
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml25
-rw-r--r--tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml40
10 files changed, 69 insertions, 90 deletions
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml
index 679a39be..59fe52ac 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/deleted.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_ospf_interfaces deleted integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces deleted integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
@@ -10,7 +9,7 @@
register: result
vyos.vyos.vyos_ospf_interfaces: &id001
config:
- - name: "bond2"
+ - name: bond2
state: deleted
- vyos.vyos.vyos_facts:
@@ -23,9 +22,7 @@
- result.commands|symmetric_difference(deleted.commands) == []
- result.after|symmetric_difference(ansible_facts['network_resources']['ospf_interfaces']) == []
- - name:
- Delete the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Delete the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_ospf_interfaces: *id001
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/empty_config.yaml
index f99b8fec..27273b48 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/empty_config.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/empty_config.yaml
@@ -1,8 +1,6 @@
---
- debug:
- msg:
- START vyos_ospf_interfaces empty_config integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces empty_config integration tests on connection={{ ansible_connection }}
- name: Merged with empty config should give appropriate error message
register: result
@@ -46,8 +44,7 @@
- assert:
that:
- - result.msg == 'value of running_config parameter must not be empty for state
- parsed'
+ - result.msg == 'value of running_config parameter must not be empty for state parsed'
- name: Rendered with empty config should give appropriate error message
register: result
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml
index 84c22cb9..69c5d108 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/gathered.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_ospf_interfaces gathered integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces gathered integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.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 1dcbac63..7b091dd7 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/merged.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_ospf_interfaces merged integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces merged integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -10,19 +9,19 @@
register: result
vyos.vyos.vyos_ospf_interfaces: &id001
config:
- - name: "eth0"
+ - name: eth0
address_family:
- - afi: "ipv4"
+ - afi: ipv4
cost: 50
priority: 26
- - afi: "ipv6"
+ - afi: ipv6
mtu_ignore: true
instance: 33
- - name: "bond2"
+ - name: bond2
address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 45
- - afi: "ipv6"
+ - afi: ipv6
passive: true
state: merged
@@ -36,9 +35,7 @@
- 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
- (IDEMPOTENT)
+ - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_ospf_interfaces: *id001
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml
index 2652c40a..7e728069 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/overridden.yaml
@@ -1,8 +1,6 @@
---
- debug:
- msg:
- START vyos_ospf_interfaces overridden integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces overridden integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
@@ -11,13 +9,13 @@
register: result
vyos.vyos.vyos_ospf_interfaces: &id001
config:
- - name: "eth0"
+ - name: eth0
address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 50
priority: 26
- network: "point-to-point"
- - afi: "ipv6"
+ network: point-to-point
+ - afi: ipv6
dead_interval: 39
state: overridden
@@ -31,9 +29,7 @@
- result.commands|symmetric_difference(overridden.commands) == []
- result.after|symmetric_difference(ansible_facts['network_resources']['ospf_interfaces']) == []
- - name:
- Override the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Override the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_ospf_interfaces: *id001
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml
index c260ec4a..0d13f76d 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml
@@ -1,8 +1,6 @@
---
- debug:
- msg:
- START vyos_ospfv3_interfaces parsed integration tests on connection={{ ansible_connection
- }}
+ msg: START vyos_ospfv3_interfaces parsed integration tests on connection={{ ansible_connection }}
- name: Provide the running configuration for parsing (config to be parsed)
register: result
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rendered.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rendered.yaml
index 2c276723..4cb5f4f9 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rendered.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_ospf_interfaces rendered integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces rendered integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
@@ -10,19 +9,19 @@
register: result
vyos.vyos.vyos_ospf_interfaces:
config:
- - name: "eth0"
+ - name: eth0
address_family:
- - afi: "ipv4"
+ - afi: ipv4
cost: 50
priority: 26
- - afi: "ipv6"
+ - afi: ipv6
mtu_ignore: true
instance: 33
- - name: "bond2"
+ - name: bond2
address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 45
- - afi: "ipv6"
+ - afi: ipv6
passive: true
state: rendered
diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml
index 9efcdea6..2bb8a02f 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/replaced.yaml
@@ -1,7 +1,6 @@
---
- debug:
- msg: START vyos_ospf_interfaces replaced integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces replaced integration tests on connection={{ ansible_connection }}
- include_tasks: _populate.yaml
@@ -10,24 +9,24 @@
register: result
vyos.vyos.vyos_ospf_interfaces: &id001
config:
- - name: "eth0"
+ - name: eth0
address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 50
priority: 26
- network: "point-to-point"
- - afi: "ipv6"
+ network: point-to-point
+ - afi: ipv6
dead_interval: 39
- - name: "bond2"
+ - name: bond2
address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 45
bandwidth: 70
authentication:
md5_key:
key_id: 10
key: "1111111111232345"
- - afi: "ipv6"
+ - afi: ipv6
passive: true
state: replaced
@@ -41,9 +40,7 @@
- result.commands|symmetric_difference(replaced.commands) == []
- result.after|symmetric_difference(ansible_facts['network_resources']['ospf_interfaces']) == []
- - name:
- Replace the existing configuration with the provided running configuration
- (IDEMPOTENT)
+ - name: Replace the existing configuration with the provided running configuration (IDEMPOTENT)
register: result
vyos.vyos.vyos_ospf_interfaces: *id001
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 5f6374d3..42da6ac2 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml
@@ -1,28 +1,27 @@
---
- debug:
- msg: START vyos_ospf_interfaces rtt integration tests on connection={{
- ansible_connection }}
+ msg: START vyos_ospf_interfaces rtt integration tests on connection={{ ansible_connection }}
- include_tasks: _remove_config.yaml
- block:
- name: Merge the provided configuration with the existing running configuration
register: baseconfig
- vyos.vyos.vyos_ospf_interfaces: &id001
+ vyos.vyos.vyos_ospf_interfaces:
config:
- - name: "eth0"
+ - name: eth0
address_family:
- - afi: "ipv4"
+ - afi: ipv4
cost: 50
priority: 26
- - afi: "ipv6"
+ - afi: ipv6
mtu_ignore: true
instance: 33
- - name: "bond2"
+ - name: bond2
address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 45
- - afi: "ipv6"
+ - afi: ipv6
passive: true
state: merged
@@ -40,13 +39,13 @@
register: result
vyos.vyos.vyos_ospf_interfaces:
config:
- - name: "eth0"
+ - name: eth0
address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 50
priority: 26
- network: "point-to-point"
- - afi: "ipv6"
+ network: point-to-point
+ - afi: ipv6
dead_interval: 39
- name: Revert back to base config using facts round trip
diff --git a/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml b/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml
index f585cbc8..5c618eed 100644
--- a/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml
+++ b/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml
@@ -9,19 +9,19 @@ merged:
- set interfaces bonding bond2 ipv6 ospfv3 passive
after:
- address_family:
- - afi: "ipv4"
+ - afi: ipv4
transmit_delay: 45
- - afi: "ipv6"
+ - afi: ipv6
passive: true
- name: "bond2"
+ name: bond2
- address_family:
- - afi: "ipv4"
+ - afi: ipv4
cost: 50
priority: 26
- - afi: "ipv6"
+ - afi: ipv6
instance: "33"
mtu_ignore: true
- name: "eth0"
+ name: eth0
replaced:
commands:
@@ -36,24 +36,24 @@ replaced:
after:
- address_family:
- - afi: "ipv4"
+ - afi: ipv4
authentication:
md5_key:
key: "1111111111232345"
key_id: 10
bandwidth: 70
transmit_delay: 45
- - afi: "ipv6"
+ - afi: ipv6
passive: true
- name: "bond2"
+ name: bond2
- address_family:
- - afi: "ipv4"
- network: "point-to-point"
+ - afi: ipv4
+ network: point-to-point
priority: 26
transmit_delay: 50
- - afi: "ipv6"
+ - afi: ipv6
dead_interval: 39
- name: "eth0"
+ name: eth0
overridden:
commands:
@@ -68,13 +68,13 @@ overridden:
after:
- address_family:
- - afi: "ipv4"
- network: "point-to-point"
+ - afi: ipv4
+ network: point-to-point
priority: 26
transmit_delay: 50
- - afi: "ipv6"
+ - afi: ipv6
dead_interval: 39
- name: "eth0"
+ name: eth0
deleted:
commands:
@@ -82,13 +82,13 @@ deleted:
- delete interfaces bonding bond2 ipv6 ospfv3
after:
- address_family:
- - afi: "ipv4"
+ - afi: ipv4
cost: 50
priority: 26
- - afi: "ipv6"
+ - afi: ipv6
instance: "33"
mtu_ignore: true
- name: "eth0"
+ name: eth0
rendered:
commands: