summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml6
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml8
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml2
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml8
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml8
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml2
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml2
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml8
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml8
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/redirection/cli/shortname.yaml8
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/vars/main.yaml18
14 files changed, 45 insertions, 45 deletions
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml
index fa191ed3..3c6743c2 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_add_bond.yaml
@@ -2,7 +2,7 @@
- ansible.builtin.include_tasks: _remove_bond.yaml
- name: Add Bond
- vars:
- lines: "set interfaces bonding bond0\nset interfaces bonding bond1\n"
ansible.netcommon.cli_config:
- config: "{{ lines }}"
+ config: |-
+ set interfaces bonding bond0
+ set interfaces bonding bond1
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg
index 1a275bdd..d9f18551 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_parsed_config.cfg
@@ -4,5 +4,5 @@ set interfaces bonding bond0 primary 'eth1'
set interfaces bonding bond1 hash-policy 'layer2+3'
set interfaces bonding bond1 mode 'active-backup'
set interfaces bonding bond1 primary 'eth2'
-set interfaces ethernet eth1 bond-group 'bond0'
-set interfaces ethernet eth2 bond-group 'bond1'
+set interfaces bonding bond0 member interface 'eth1'
+set interfaces bonding bond1 member interface 'eth2'
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml
index be0d6351..728a8cf0 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_populate.yaml
@@ -7,12 +7,12 @@
set interfaces bonding bond0
set interfaces bonding bond0 hash-policy 'layer2'
set interfaces bonding bond0 mode 'active-backup'
- set interfaces ethernet eth1 bond-group bond0
+ set interfaces bonding bond0 member interface 'eth1'
set interfaces bonding bond1
set interfaces bonding bond0 primary 'eth1'
set interfaces bonding bond1 hash-policy 'layer2+3'
set interfaces bonding bond1 mode 'active-backup'
- set interfaces ethernet eth2 bond-group bond1
+ set interfaces bonding bond1 member interface 'eth2'
set interfaces bonding bond1 primary 'eth2'
ansible.netcommon.cli_config:
config: "{{ lines }}"
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml
index e22a6ca7..3643ae32 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/_remove_bond.yaml
@@ -2,11 +2,11 @@
vars:
lines: |-
delete interfaces bonding bond0 hash-policy
- delete interfaces ethernet eth1 bond-group bond0
+ delete interfaces bonding bond0 member interface 'eth1'
delete interfaces bonding bond0 mode
delete interfaces bonding bond0 primary
delete interfaces bonding bond1 hash-policy
- delete interfaces ethernet eth2 bond-group bond1
+ delete interfaces bonding bond1 member interface 'eth2'
delete interfaces bonding bond1 mode
delete interfaces bonding bond1 primary
ansible.netcommon.cli_config:
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml
index e30be078..d273f040 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/deleted.yaml
@@ -17,17 +17,17 @@
- name: Assert that the before dicts were correctly generated
assert:
that:
- - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+ - populate | symmetric_difference(result['before']) |length == 0
- name: Assert that the correct set of commands were generated
assert:
that:
- - "{{ deleted['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
+ - deleted['commands'] | symmetric_difference(result['commands']) |length == 0
- name: Assert that the after dicts were correctly generated
assert:
that:
- - "{{ deleted['after'] | symmetric_difference(result['after']) |length == 0 }}"
+ - deleted['after'] | symmetric_difference(result['after']) |length == 0
- name: Delete attributes of given interfaces (IDEMPOTENT)
register: result
@@ -41,6 +41,6 @@
- name: Assert that the before dicts were correctly generated
assert:
that:
- - "{{ deleted['after'] | symmetric_difference(result['before']) |length == 0 }}"
+ - deleted['after'] | symmetric_difference(result['before']) |length == 0
always:
- include_tasks: _remove_bond.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 f6c281f5..ff7f9c7d 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/gathered.yaml
@@ -14,7 +14,7 @@
- name: Assert that gathered dicts was correctly generated
assert:
that:
- - "{{ populate | symmetric_difference(result['gathered']) |length == 0 }}"
+ - populate | symmetric_difference(result['gathered']) |length == 0
always:
- include_tasks: _remove_bond.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 64ac9a4a..2274f301 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/merged.yaml
@@ -26,17 +26,17 @@
- name: Assert that before dicts were correctly generated
assert:
- that: "{{ merged['before'] | symmetric_difference(result['before']) |length == 0 }}"
+ that: merged['before'] | symmetric_difference(result['before']) |length == 0
- name: Assert that correct set of commands were generated
assert:
that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
+ - merged['commands'] | symmetric_difference(result['commands']) |length == 0
- name: Assert that after dicts was correctly generated
assert:
that:
- - "{{ merged['after'] | symmetric_difference(result['after']) |length == 0 }}"
+ - merged['after'] | symmetric_difference(result['after']) |length == 0
- name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
register: result
@@ -50,6 +50,6 @@
- name: Assert that before dicts were correctly generated
assert:
that:
- - "{{ merged['after'] | symmetric_difference(result['before']) |length == 0 }}"
+ - merged['after'] | symmetric_difference(result['before']) |length == 0
always:
- include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml
index 482d54d1..b1f0065c 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/overridden.yaml
@@ -20,17 +20,17 @@
- name: Assert that before dicts were correctly generated
assert:
that:
- - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+ - populate | symmetric_difference(result['before']) |length == 0
- name: Assert that correct commands were generated
assert:
that:
- - "{{ overridden['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
+ - overridden['commands'] | symmetric_difference(result['commands']) |length == 0
- name: Assert that after dicts were correctly generated
assert:
that:
- - "{{ overridden['after'] | symmetric_difference(result['after']) |length == 0 }}"
+ - overridden['after'] | symmetric_difference(result['after']) |length == 0
- name: Overrides all device configuration with provided configurations (IDEMPOTENT)
register: result
@@ -44,6 +44,6 @@
- name: Assert that before dicts were correctly generated
assert:
that:
- - "{{ overridden['after'] | symmetric_difference(result['before']) |length == 0 }}"
+ - overridden['after'] | symmetric_difference(result['before']) |length == 0
always:
- include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
index 81a7b46d..c3dd4ff2 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/parsed.yaml
@@ -21,7 +21,7 @@
- name: Assert that correct parsing done
assert:
- that: "{{ ansible_facts['network_resources']['lag_interfaces'] | symmetric_difference(result['parsed']) |length == 0 }}"
+ that: ansible_facts['network_resources']['lag_interfaces'] | symmetric_difference(result['parsed']) |length == 0
always:
- include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml
index 7d86a3ae..0241b7c4 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rendered.yaml
@@ -26,7 +26,7 @@
- name: Assert that correct set of commands were generated
assert:
that:
- - "{{ rendered['commands'] | symmetric_difference(result['rendered']) |length == 0 }}"
+ - rendered['commands'] | symmetric_difference(result['rendered']) |length == 0
always:
- include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml
index 66e55df7..caf3f1d1 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/replaced.yaml
@@ -19,17 +19,17 @@
- name: Assert that correct set of commands were generated
assert:
that:
- - "{{ replaced['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
+ - replaced['commands'] | symmetric_difference(result['commands']) |length == 0
- name: Assert that before dicts are correctly generated
assert:
that:
- - "{{ populate | symmetric_difference(result['before']) |length == 0 }}"
+ - populate | symmetric_difference(result['before']) |length == 0
- name: Assert that after dict is correctly generated
assert:
that:
- - "{{ replaced['after'] | symmetric_difference(result['after']) |length == 0 }}"
+ - replaced['after'] | symmetric_difference(result['after']) |length == 0
- name: Replace device configurations of listed LAG interfaces with provided configurarions (IDEMPOTENT)
register: result
@@ -43,6 +43,6 @@
- name: Assert that before dict is correctly generated
assert:
that:
- - "{{ replaced['after'] | symmetric_difference(result['before']) |length == 0 }}"
+ - replaced['after'] | symmetric_difference(result['before']) |length == 0
always:
- include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml
index 5e9dc752..b4c07abe 100644
--- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/rtt.yaml
@@ -37,20 +37,20 @@
config:
- name: bond0
hash_policy: layer2+3
- mode: 802.3ad
+ mode: transmit-load-balance
members:
- member: eth1
- name: bond1
hash_policy: layer2
- mode: xor-hash
+ mode: adaptive-load-balance
members:
- member: eth2
state: merged
- name: Assert that changes were applied
assert:
- that: "{{ round_trip['after'] | symmetric_difference(result['after']) |length == 0 }}"
+ that: round_trip['after'] | symmetric_difference(result['after']) |length == 0
- name: Revert back to base config using facts round trip
register: revert
@@ -60,6 +60,6 @@
- name: Assert that config was reverted
assert:
- that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length == 0 }}"
+ that: base_config['after'] | symmetric_difference(revert['after']) |length == 0
always:
- include_tasks: _remove_bond.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 40c5fe2b..fd2c10a5 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
@@ -26,17 +26,17 @@
- name: Assert that before dicts were correctly generated
assert:
- that: "{{ merged['before'] | symmetric_difference(result['before']) |length == 0 }}"
+ that: merged['before'] | symmetric_difference(result['before']) |length == 0
- name: Assert that correct set of commands were generated
assert:
that:
- - "{{ merged['commands'] | symmetric_difference(result['commands']) |length == 0 }}"
+ - merged['commands'] | symmetric_difference(result['commands']) |length == 0
- name: Assert that after dicts was correctly generated
assert:
that:
- - "{{ merged['after'] | symmetric_difference(result['after']) |length == 0 }}"
+ - merged['after'] | symmetric_difference(result['after']) |length == 0
- name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
register: result
@@ -50,6 +50,6 @@
- name: Assert that before dicts were correctly generated
assert:
that:
- - "{{ merged['after'] | symmetric_difference(result['before']) |length == 0 }}"
+ - merged['after'] | symmetric_difference(result['before']) |length == 0
always:
- include_tasks: _remove_bond.yaml
diff --git a/tests/integration/targets/vyos_lag_interfaces/vars/main.yaml b/tests/integration/targets/vyos_lag_interfaces/vars/main.yaml
index 9784fb97..40b6a9d8 100644
--- a/tests/integration/targets/vyos_lag_interfaces/vars/main.yaml
+++ b/tests/integration/targets/vyos_lag_interfaces/vars/main.yaml
@@ -6,11 +6,11 @@ merged:
commands:
- set interfaces bonding bond0 hash-policy 'layer2'
- set interfaces bonding bond0 mode 'active-backup'
- - set interfaces ethernet eth1 bond-group 'bond0'
+ - set interfaces bonding bond0 member interface 'eth1'
- set interfaces bonding bond0 primary 'eth1'
- set interfaces bonding bond1 hash-policy 'layer2+3'
- set interfaces bonding bond1 mode 'active-backup'
- - set interfaces ethernet eth2 bond-group 'bond1'
+ - set interfaces bonding bond1 member interface 'eth2'
- set interfaces bonding bond1 primary 'eth2'
after:
- name: bond0
@@ -58,7 +58,7 @@ replaced:
overridden:
commands:
- delete interfaces bonding bond0 hash-policy
- - delete interfaces ethernet eth1 bond-group 'bond0'
+ - delete interfaces bonding bond0 member interface 'eth1'
- delete interfaces bonding bond0 mode
- delete interfaces bonding bond0 primary
- set interfaces bonding bond1 hash-policy 'layer2'
@@ -73,11 +73,11 @@ overridden:
deleted:
commands:
- delete interfaces bonding bond0 hash-policy
- - delete interfaces ethernet eth1 bond-group 'bond0'
+ - delete interfaces bonding bond0 member interface 'eth1'
- delete interfaces bonding bond0 mode
- delete interfaces bonding bond0 primary
- delete interfaces bonding bond1 hash-policy
- - delete interfaces ethernet eth2 bond-group 'bond1'
+ - delete interfaces bonding bond1 member interface 'eth2'
- delete interfaces bonding bond1 mode
- delete interfaces bonding bond1 primary
after:
@@ -86,11 +86,11 @@ deleted:
rendered:
commands:
- set interfaces bonding bond0 hash-policy 'layer2'
- - set interfaces ethernet eth1 bond-group 'bond0'
+ - set interfaces bonding bond0 member interface 'eth1'
- set interfaces bonding bond0 mode 'active-backup'
- set interfaces bonding bond0 primary 'eth1'
- set interfaces bonding bond1 hash-policy 'layer2+3'
- - set interfaces ethernet eth2 bond-group 'bond1'
+ - set interfaces bonding bond1 member interface 'eth2'
- set interfaces bonding bond1 mode 'active-backup'
- set interfaces bonding bond1 primary 'eth2'
round_trip:
@@ -99,11 +99,11 @@ round_trip:
hash_policy: layer2+3
members:
- member: eth1
- mode: 802.3ad
+ mode: transmit-load-balance
primary: eth1
- name: bond1
hash_policy: layer2
members:
- member: eth2
- mode: xor-hash
+ mode: adaptive-load-balance
primary: eth2