summaryrefslogtreecommitdiff
path: root/test/integration/targets/junos_lacp_interfaces/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/junos_lacp_interfaces/tests')
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml16
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml17
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml97
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml56
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml76
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml100
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml90
7 files changed, 0 insertions, 452 deletions
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml
deleted file mode 100644
index 75f9612a29..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- debug:
- msg: "Start junos_lacp_interfaces base config ansible_connection={{ ansible_connection }}"
-
-- name: Configure base lag interface
- junos_config:
- lines:
- - set interfaces ae1 description "Configured by Ansible"
- - set interfaces ae2 description "Configured by Ansible"
- - set interfaces ge-0/0/1 ether-options 802.3ad ae1
- - set interfaces ge-0/0/2 ether-options 802.3ad ae1
- - set interfaces ge-0/0/3 ether-options 802.3ad ae2
- - set interfaces ge-0/0/4 ether-options 802.3ad ae2
-
-- debug:
- msg: "End junos_lacp_interfaces base config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml
deleted file mode 100644
index ef784f1b0e..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- debug:
- msg: "Start junos_nterfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
-
-- name: "Setup - remove interface config"
- junos_config:
- lines:
- - delete interfaces ae1
- - delete interfaces ae2
- - delete interfaces ge-0/0/1
- - delete interfaces ge-0/0/2
- - delete interfaces ge-0/0/3
- - delete interfaces ge-0/0/4
- - delete interfaces lo0
-
-- debug:
- msg: "End junos_nterfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml
deleted file mode 100644
index 449ed3aba5..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,97 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces deleted integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_deleted_output:
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
-
-- block:
- - name: Configure initial state for interface
- junos_lacp_interfaces: &initial
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
- force_up: False
- state: merged
- register: result
-
- - name: Delete the provided interface configuration from running configuration
- junos_lacp_interfaces: &deleted
- config:
- - name: ae1
- - name: ge-0/0/1
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the provided lacp interface configuration from running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- - name: Configure initial state for interface
- junos_lacp_interfaces: *initial
- register: result
-
- - name: Delete the all lacp interface configuration from running configuration
- junos_lacp_interfaces:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ result['after'] == [] }}"
-
- - name: Delete the all lacp interfaces configuration from running configuration (IDEMPOTENT)
- junos_lacp_interfaces:
- state: deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml
deleted file mode 100644
index 0019dffe1d..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,56 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_merged_output:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_lacp_interfaces: &merged
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml
deleted file mode 100644
index d2d16c7205..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml
+++ /dev/null
@@ -1,76 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces overide integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:01
-
-- block:
- - name: Configure initial state for lacp interface
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
- force_up: False
- state: merged
- register: result
-
- - name: Override the provided configuration with the exisiting running configuration
- junos_lacp_interfaces: &overridden
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:01
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces override integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml
deleted file mode 100644
index 27e5f23df3..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,100 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces replaced integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_replaced_output:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/1
- force_up: true
- port_priority: 100
- - name: ge-0/0/2
- port_priority: 250
- - name: ge-0/0/3
- port_priority: 300
- - name: ge-0/0/4
- port_priority: 400
- force_up: true
-
-- block:
- - name: Configure initial state for lacp interface
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
- force_up: False
- state: merged
- register: result
-
- - name: Replace the provided configuration with the exisiting running configuration
- junos_lacp_interfaces: &replaced
- config:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ge-0/0/2
- port_priority: 250
- force_up: False
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/4
- port_priority: 400
- force_up: True
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml
deleted file mode 100644
index a46fbe83b6..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml
+++ /dev/null
@@ -1,90 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces round trip integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_revert_output:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/2
- port_priority: 250
- force_up: True
- - name: ge-0/0/4
- port_priority: 400
- force_up: True
-
-- block:
- - name: Apply the provided configuration (base config)
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ge-0/0/2
- port_priority: 250
- force_up: False
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/4
- port_priority: 400
- force_up: True
- state: merged
- register: base_config
-
- - name: Gather interfaces facts
- junos_facts:
- gather_subset:
- - default
- gather_network_resources:
- - lacp_interfaces
-
- - name: Apply the provided configuration (config to be reverted)
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:01
- state: merged
- register: result
-
- - name: Assert that changes were applied
- assert:
- that: "result['changed'] == true"
-
- - name: Revert back to base config using facts round trip
- junos_lacp_interfaces:
- config: "{{ ansible_facts['network_resources']['lacp_interfaces'] }}"
- state: overridden
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ expected_revert_output | symmetric_difference(revert['after']) |length == 0 }}"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces round trip integration tests on connection={{ ansible_connection }}"