summaryrefslogtreecommitdiff
path: root/tests/integration/targets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets')
-rw-r--r--tests/integration/targets/vyos_banner/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_command/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_config/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_facts/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_interface/defaults/main.yaml3
-rw-r--r--tests/integration/targets/vyos_interface/tasks/cli.yaml26
-rw-r--r--tests/integration/targets/vyos_interface/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_interface/tests/cli/basic.yaml248
-rw-r--r--tests/integration/targets/vyos_l3_interface/defaults/main.yaml3
-rw-r--r--tests/integration/targets/vyos_l3_interface/tasks/cli.yaml26
-rw-r--r--tests/integration/targets/vyos_l3_interface/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_l3_interface/tests/cli/basic.yaml231
-rw-r--r--tests/integration/targets/vyos_linkagg/defaults/main.yaml3
-rw-r--r--tests/integration/targets/vyos_linkagg/tasks/cli.yaml26
-rw-r--r--tests/integration/targets/vyos_linkagg/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_linkagg/tests/cli/basic.yaml200
-rw-r--r--tests/integration/targets/vyos_lldp/aliases1
-rw-r--r--tests/integration/targets/vyos_lldp/defaults/main.yaml3
-rw-r--r--tests/integration/targets/vyos_lldp/tasks/cli.yaml26
-rw-r--r--tests/integration/targets/vyos_lldp/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp/tests/cli/basic.yaml44
-rw-r--r--tests/integration/targets/vyos_lldp_interface/aliases1
-rw-r--r--tests/integration/targets/vyos_lldp_interface/defaults/main.yaml3
-rw-r--r--tests/integration/targets/vyos_lldp_interface/tasks/cli.yaml26
-rw-r--r--tests/integration/targets/vyos_lldp_interface/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml181
-rw-r--r--tests/integration/targets/vyos_logging/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_static_route/aliases1
-rw-r--r--tests/integration/targets/vyos_static_route/defaults/main.yaml3
-rw-r--r--tests/integration/targets/vyos_static_route/tasks/cli.yaml26
-rw-r--r--tests/integration/targets/vyos_static_route/tasks/main.yaml2
-rw-r--r--tests/integration/targets/vyos_static_route/tests/cli/basic.yaml137
-rw-r--r--tests/integration/targets/vyos_system/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_user/tasks/cli.yaml8
-rw-r--r--tests/integration/targets/vyos_vlan/tasks/cli.yaml8
35 files changed, 0 insertions, 1294 deletions
diff --git a/tests/integration/targets/vyos_banner/tasks/cli.yaml b/tests/integration/targets/vyos_banner/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_banner/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_banner/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_command/tasks/cli.yaml b/tests/integration/targets/vyos_command/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_command/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_command/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_config/tasks/cli.yaml b/tests/integration/targets/vyos_config/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_config/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_config/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_facts/tasks/cli.yaml b/tests/integration/targets/vyos_facts/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_facts/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_facts/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_interface/defaults/main.yaml b/tests/integration/targets/vyos_interface/defaults/main.yaml
deleted file mode 100644
index a845c24..0000000
--- a/tests/integration/targets/vyos_interface/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: '*'
-test_items: []
diff --git a/tests/integration/targets/vyos_interface/tasks/cli.yaml b/tests/integration/targets/vyos_interface/tasks/cli.yaml
deleted file mode 100644
index b23cb60..0000000
--- a/tests/integration/targets/vyos_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: '{{ role_path }}/tests/cli'
- patterns: '{{ testcase }}.yaml'
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test case (connection=ansible.netcommon.network_cli)
- include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
- with_items: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_interface/tasks/main.yaml b/tests/integration/targets/vyos_interface/tasks/main.yaml
deleted file mode 100644
index 07b0f2e..0000000
--- a/tests/integration/targets/vyos_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- include: cli.yaml
diff --git a/tests/integration/targets/vyos_interface/tests/cli/basic.yaml b/tests/integration/targets/vyos_interface/tests/cli/basic.yaml
deleted file mode 100644
index b50d7da..0000000
--- a/tests/integration/targets/vyos_interface/tests/cli/basic.yaml
+++ /dev/null
@@ -1,248 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Run vyos lsmod command
- register: lsmod_out
- vyos.vyos.vyos_command:
- commands:
- - lsmod
-
-- name: Set up - delete interface
- vyos.vyos.vyos_interface:
- name: eth1
- state: absent
-
-- name: Set up - Create interface
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- state: present
- description: test-interface
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth1" in result.commands'
- - "\"set interfaces ethernet eth1 description 'test-interface'\" in result.commands"
-
-- name: Configure interface params
- when: "'virtio_net' not in lsmod_out.stdout[0]"
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- state: present
- description: test-interface-1
- speed: 100
- duplex: half
- mtu: 256
-
-- assert:
- that:
- - result.changed == true
- - "\"set interfaces ethernet eth1 description 'test-interface-1'\" in result.commands"
- - '"set interfaces ethernet eth1 speed 100" in result.commands'
- - '"set interfaces ethernet eth1 duplex half" in result.commands'
- - '"set interfaces ethernet eth1 mtu 256" in result.commands'
- when: "'virtio_net' not in lsmod_out.stdout[0]"
-
-- name: Configure interface params (idempotent)
- register: result
- when: "'virtio_net' not in lsmod_out.stdout[0]"
- vyos.vyos.vyos_interface:
- name: eth1
- state: present
- description: test-interface-1
- speed: 100
- duplex: half
- mtu: 256
-
-- assert:
- that:
- - result.changed == false
- when: "'virtio' not in lsmod_out.stdout[0]"
-
-- name: Change interface params
- register: result
- when: "'virtio_net' not in lsmod_out.stdout[0]"
- vyos.vyos.vyos_interface:
- name: eth1
- state: present
- description: test-interface-2
- speed: 1000
- duplex: full
- mtu: 512
-
-- assert:
- that:
- - result.changed == true
- - "\"set interfaces ethernet eth1 description 'test-interface-2'\" in result.commands"
- - '"set interfaces ethernet eth1 speed 1000" in result.commands'
- - '"set interfaces ethernet eth1 duplex full" in result.commands'
- - '"set interfaces ethernet eth1 mtu 512" in result.commands'
- when: "'virtio_net' not in lsmod_out.stdout[0]"
-
-- name: Disable interface
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- enabled: false
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth1 disable" in result.commands'
-
-- name: Enable interface
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- enabled: true
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 disable" in result.commands'
-
-- name: Delete interface
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1" in result.commands'
-
-- name: Delete interface (idempotent)
- register: result
- vyos.vyos.vyos_interface:
- name: eth1
- state: absent
-
-- assert:
- that:
- - result.changed == false
-
-- name: Aggregate setup- delete interface
- register: result
- vyos.vyos.vyos_interface:
- name: eth2
- state: absent
-
-- name: Set interface on aggregate
- register: result
- when: "'virtio_net' not in lsmod_out.stdout[0]"
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth1
- description: test-interface-1
- speed: 100
- duplex: half
- mtu: 512
-
- - name: eth2
- description: test-interface-2
- speed: 1000
- duplex: full
- mtu: 256
-
-- assert:
- that:
- - result.changed == true
- - "\"set interfaces ethernet eth1 description 'test-interface-1'\" in result.commands"
- - '"set interfaces ethernet eth1 speed 100" in result.commands'
- - '"set interfaces ethernet eth1 duplex half" in result.commands'
- - '"set interfaces ethernet eth1 mtu 512" in result.commands'
- - "\"set interfaces ethernet eth2 description 'test-interface-2'\" in result.commands"
- - '"set interfaces ethernet eth2 speed 1000" in result.commands'
- - '"set interfaces ethernet eth2 duplex full" in result.commands'
- - '"set interfaces ethernet eth2 mtu 256" in result.commands'
- when: "'virtio_net' not in lsmod_out.stdout[0]"
-
-- name: Set interface on aggregate (idempotent)
- register: result
- when: "'virtio_net' not in lsmod_out.stdout[0]"
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth1
- description: test-interface-1
- speed: 100
- duplex: half
- mtu: 512
-
- - name: eth2
- description: test-interface-2
- speed: 1000
- duplex: full
- mtu: 256
-
-- assert:
- that:
- - result.changed == false
- when: "'virtio_net' not in lsmod_out.stdout[0]"
-
-- name: Disable interface on aggregate
- register: result
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- description: test-interface
- enabled: false
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth1 disable" in result.commands'
- - '"set interfaces ethernet eth2 disable" in result.commands'
-
-- name: Enable interface on aggregate
- register: result
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- enabled: true
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 disable" in result.commands'
- - '"delete interfaces ethernet eth2 disable" in result.commands'
-
-- name: Delete interface aggregate
- register: result
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1" in result.commands'
- - '"delete interfaces ethernet eth2" in result.commands'
-
-- name: Delete interface aggregate (idempotent)
- register: result
- vyos.vyos.vyos_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: absent
-
-- assert:
- that:
- - result.changed == false
diff --git a/tests/integration/targets/vyos_l3_interface/defaults/main.yaml b/tests/integration/targets/vyos_l3_interface/defaults/main.yaml
deleted file mode 100644
index a845c24..0000000
--- a/tests/integration/targets/vyos_l3_interface/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: '*'
-test_items: []
diff --git a/tests/integration/targets/vyos_l3_interface/tasks/cli.yaml b/tests/integration/targets/vyos_l3_interface/tasks/cli.yaml
deleted file mode 100644
index b23cb60..0000000
--- a/tests/integration/targets/vyos_l3_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: '{{ role_path }}/tests/cli'
- patterns: '{{ testcase }}.yaml'
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test case (connection=ansible.netcommon.network_cli)
- include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
- with_items: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_l3_interface/tasks/main.yaml b/tests/integration/targets/vyos_l3_interface/tasks/main.yaml
deleted file mode 100644
index 07b0f2e..0000000
--- a/tests/integration/targets/vyos_l3_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- include: cli.yaml
diff --git a/tests/integration/targets/vyos_l3_interface/tests/cli/basic.yaml b/tests/integration/targets/vyos_l3_interface/tests/cli/basic.yaml
deleted file mode 100644
index 2ffb1ab..0000000
--- a/tests/integration/targets/vyos_l3_interface/tests/cli/basic.yaml
+++ /dev/null
@@ -1,231 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Remove IP address
- vyos.vyos.vyos_l3_interface:
- name: eth1
- state: absent
-
-- name: Remove IP address
- vyos.vyos.vyos_l3_interface:
- name: eth2
- state: absent
-
-- name: Set IPv4 address
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv4: 192.168.2.10/24
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth1 address 192.168.2.10/24" in result.commands'
-
-- name: Set IPv4 address (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv4: 192.168.2.10/24
-
-- assert:
- that:
- - result.changed == false
-
-- name: Set IPv6 address
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv6: fd5d:12c9:2201:1::1/64
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth1 address fd5d:12c9:2201:1::1/64" in result.commands'
-
-- name: Set IPv6 address (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv6: fd5d:12c9:2201:1::1/64
-
-- assert:
- that:
- - result.changed == false
-
-- name: Remove all IP addresses
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 address" in result.commands'
-
-- name: Remove all IP addresses again (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- state: absent
-
-- assert:
- that:
- - result.changed == false
-
-- name: Set IPv4 and IPv6 address
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv4: 192.168.2.10/24
- ipv6: fd5d:12c9:2201:1::1/64
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth1 address 192.168.2.10/24" in result.commands'
- - '"set interfaces ethernet eth1 address fd5d:12c9:2201:1::1/64" in result.commands'
-
-- name: Set IPv4 and IPv6 address again (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv4: 192.168.2.10/24
- ipv6: fd5d:12c9:2201:1::1/64
-
-- assert:
- that:
- - result.changed == false
-
-- name: Remove IPv4 address
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv4: 192.168.2.10/24
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 address 192.168.2.10/24" in result.commands'
-
-- name: Remove IPv4 address again (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv4: 192.168.2.10/24
- state: absent
-
-- assert:
- that:
- - result.changed == false
-
-- name: Remove IPv6 address
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv6: fd5d:12c9:2201:1::1/64
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 address fd5d:12c9:2201:1::1/64" in result.commands'
-
-- name: Remove IPv6 address again (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- name: eth1
- ipv6: fd5d:12c9:2201:1::1/64
- state: absent
-
-- assert:
- that:
- - result.changed == false
-
-- name: Set IP addresses on aggregate
- register: result
- vyos.vyos.vyos_l3_interface:
- aggregate:
-
- - name: eth1
- ipv4: 192.168.2.10/24
-
- - name: eth2
- ipv4: 192.168.3.10/24
- ipv6: fd5d:12c9:2201:1::1/64
-
- - name: eth2
- ipv4: 192.168.4.10/24
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth1 address 192.168.2.10/24" in result.commands'
- - '"set interfaces ethernet eth2 address 192.168.3.10/24" in result.commands'
- - '"set interfaces ethernet eth2 address fd5d:12c9:2201:1::1/64" in result.commands'
- - '"set interfaces ethernet eth2 address 192.168.4.10/24" in result.commands'
-
-- name: Set IP addresses on aggregate (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- aggregate:
-
- - name: eth1
- ipv4: 192.168.2.10/24
-
- - name: eth2
- ipv4: 192.168.3.10/24
- ipv6: fd5d:12c9:2201:1::1/64
-
- - name: eth2
- ipv4: 192.168.4.10/24
-
-- assert:
- that:
- - result.changed == false
-
-- name: Remove IP addresses on aggregate
- register: result
- vyos.vyos.vyos_l3_interface:
- aggregate:
-
- - name: eth1
- ipv4: 192.168.2.10/24
-
- - name: eth2
- ipv4: 192.168.3.10/24
- ipv6: fd5d:12c9:2201:1::1/64
-
- - name: eth2
- ipv4: 192.168.4.10/24
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 address 192.168.2.10/24" in result.commands'
- - '"delete interfaces ethernet eth2 address 192.168.3.10/24" in result.commands'
- - '"delete interfaces ethernet eth2 address fd5d:12c9:2201:1::1/64" in result.commands'
- - '"delete interfaces ethernet eth2 address 192.168.4.10/24" in result.commands'
-
-- name: Remove IP addresses on aggregate (idempotent)
- register: result
- vyos.vyos.vyos_l3_interface:
- aggregate:
-
- - name: eth1
- ipv4: 192.168.2.10/24
-
- - name: eth2
- ipv4: 192.168.3.10/24
- ipv6: fd5d:12c9:2201:1::1/64
-
- - name: eth2
- ipv4: 192.168.4.10/24
- state: absent
-
-- assert:
- that:
- - result.changed == false
diff --git a/tests/integration/targets/vyos_linkagg/defaults/main.yaml b/tests/integration/targets/vyos_linkagg/defaults/main.yaml
deleted file mode 100644
index a845c24..0000000
--- a/tests/integration/targets/vyos_linkagg/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: '*'
-test_items: []
diff --git a/tests/integration/targets/vyos_linkagg/tasks/cli.yaml b/tests/integration/targets/vyos_linkagg/tasks/cli.yaml
deleted file mode 100644
index b23cb60..0000000
--- a/tests/integration/targets/vyos_linkagg/tasks/cli.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: '{{ role_path }}/tests/cli'
- patterns: '{{ testcase }}.yaml'
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test case (connection=ansible.netcommon.network_cli)
- include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
- with_items: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_linkagg/tasks/main.yaml b/tests/integration/targets/vyos_linkagg/tasks/main.yaml
deleted file mode 100644
index 07b0f2e..0000000
--- a/tests/integration/targets/vyos_linkagg/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- include: cli.yaml
diff --git a/tests/integration/targets/vyos_linkagg/tests/cli/basic.yaml b/tests/integration/targets/vyos_linkagg/tests/cli/basic.yaml
deleted file mode 100644
index ffe0c42..0000000
--- a/tests/integration/targets/vyos_linkagg/tests/cli/basic.yaml
+++ /dev/null
@@ -1,200 +0,0 @@
----
-- debug: msg="cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Remove linkagg
- vyos.vyos.vyos_linkagg:
- name: bond0
- state: absent
-
-- name: Remove linkagg
- vyos.vyos.vyos_linkagg:
- name: bond1
- state: absent
-
-- name: Create linkagg
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- members:
- - eth1
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces bonding bond0 mode 802.3ad" in result.commands'
- - '"set interfaces ethernet eth1 bond-group bond0" in result.commands'
-
-- name: Create linkagg again (idempotent)
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- members:
- - eth1
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: Add linkagg member
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- members:
- - eth2
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces ethernet eth2 bond-group bond0" in result.commands'
-
-- name: Add linkagg member again (idempotent)
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- members:
- - eth2
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: Disable linkagg
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- state: down
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces bonding bond0 disable" in result.commands'
-
-- name: Disable linkagg again (idempotent)
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- state: down
-
-- assert:
- that:
- - result.changed == false
-
-- name: Enable linkagg
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- state: up
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces bonding bond0 disable" in result.commands[0]'
-
-- name: Enable linkagg again (idempotent)
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- state: up
-
-- assert:
- that:
- - result.changed == false
-
-- name: Remove linkagg
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 bond-group" in result.commands'
- - '"delete interfaces ethernet eth2 bond-group" in result.commands'
- - '"delete interfaces bonding bond0" in result.commands'
-
-- name: Remove linkagg again (idempotent)
- register: result
- vyos.vyos.vyos_linkagg:
- name: bond0
- state: absent
-
-- assert:
- that:
- - result.changed == false
-
-- name: Create collection of linkagg definitions
- register: result
- vyos.vyos.vyos_linkagg:
- aggregate:
-
- - name: bond0
- members:
- - eth1
-
- - name: bond1
- members:
- - eth2
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set interfaces bonding bond0 mode 802.3ad" in result.commands'
- - '"set interfaces ethernet eth1 bond-group bond0" in result.commands'
- - '"set interfaces bonding bond1 mode 802.3ad" in result.commands'
- - '"set interfaces ethernet eth2 bond-group bond1" in result.commands'
-
-- name: Create collection of linkagg definitions again (idempotent)
- register: result
- vyos.vyos.vyos_linkagg:
- aggregate:
-
- - name: bond0
- members:
- - eth1
-
- - name: bond1
- members:
- - eth2
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: Remove collection of linkagg definitions
- register: result
- vyos.vyos.vyos_linkagg:
- aggregate:
-
- - name: bond0
-
- - name: bond1
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete interfaces ethernet eth1 bond-group" in result.commands'
- - '"delete interfaces bonding bond0" in result.commands'
- - '"delete interfaces ethernet eth2 bond-group" in result.commands'
- - '"delete interfaces bonding bond1" in result.commands'
-
-- name: Remove collection of linkagg definitions again (idempotent)
- register: result
- vyos.vyos.vyos_linkagg:
- aggregate:
-
- - name: bond0
-
- - name: bond1
- state: absent
-
-- assert:
- that:
- - result.changed == false
diff --git a/tests/integration/targets/vyos_lldp/aliases b/tests/integration/targets/vyos_lldp/aliases
deleted file mode 100644
index 8071e1f..0000000
--- a/tests/integration/targets/vyos_lldp/aliases
+++ /dev/null
@@ -1 +0,0 @@
-shippable/vyos/group1
diff --git a/tests/integration/targets/vyos_lldp/defaults/main.yaml b/tests/integration/targets/vyos_lldp/defaults/main.yaml
deleted file mode 100644
index a845c24..0000000
--- a/tests/integration/targets/vyos_lldp/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: '*'
-test_items: []
diff --git a/tests/integration/targets/vyos_lldp/tasks/cli.yaml b/tests/integration/targets/vyos_lldp/tasks/cli.yaml
deleted file mode 100644
index b23cb60..0000000
--- a/tests/integration/targets/vyos_lldp/tasks/cli.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: '{{ role_path }}/tests/cli'
- patterns: '{{ testcase }}.yaml'
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test case (connection=ansible.netcommon.network_cli)
- include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
- with_items: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_lldp/tasks/main.yaml b/tests/integration/targets/vyos_lldp/tasks/main.yaml
deleted file mode 100644
index 07b0f2e..0000000
--- a/tests/integration/targets/vyos_lldp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- include: cli.yaml
diff --git a/tests/integration/targets/vyos_lldp/tests/cli/basic.yaml b/tests/integration/targets/vyos_lldp/tests/cli/basic.yaml
deleted file mode 100644
index b108bbf..0000000
--- a/tests/integration/targets/vyos_lldp/tests/cli/basic.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Make sure LLDP is not running before tests
- vyos.vyos.vyos_config:
- lines: delete service lldp
-
-- name: Enable LLDP service
- register: result
- vyos.vyos.vyos_lldp:
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set service lldp" in result.commands'
-
-- name: Enable LLDP service again (idempotent)
- register: result
- vyos.vyos.vyos_lldp:
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: Disable LLDP service
- register: result
- vyos.vyos.vyos_lldp:
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete service lldp" in result.commands'
-
-- name:
- register: result
- vyos.vyos.vyos_lldp:
- state: absent
-
-- assert:
- that:
- - result.changed == false
diff --git a/tests/integration/targets/vyos_lldp_interface/aliases b/tests/integration/targets/vyos_lldp_interface/aliases
deleted file mode 100644
index 8071e1f..0000000
--- a/tests/integration/targets/vyos_lldp_interface/aliases
+++ /dev/null
@@ -1 +0,0 @@
-shippable/vyos/group1
diff --git a/tests/integration/targets/vyos_lldp_interface/defaults/main.yaml b/tests/integration/targets/vyos_lldp_interface/defaults/main.yaml
deleted file mode 100644
index a845c24..0000000
--- a/tests/integration/targets/vyos_lldp_interface/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: '*'
-test_items: []
diff --git a/tests/integration/targets/vyos_lldp_interface/tasks/cli.yaml b/tests/integration/targets/vyos_lldp_interface/tasks/cli.yaml
deleted file mode 100644
index b23cb60..0000000
--- a/tests/integration/targets/vyos_lldp_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: '{{ role_path }}/tests/cli'
- patterns: '{{ testcase }}.yaml'
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test case (connection=ansible.netcommon.network_cli)
- include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
- with_items: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_lldp_interface/tasks/main.yaml b/tests/integration/targets/vyos_lldp_interface/tasks/main.yaml
deleted file mode 100644
index 07b0f2e..0000000
--- a/tests/integration/targets/vyos_lldp_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- include: cli.yaml
diff --git a/tests/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml b/tests/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml
deleted file mode 100644
index 2697f48..0000000
--- a/tests/integration/targets/vyos_lldp_interface/tests/cli/basic.yaml
+++ /dev/null
@@ -1,181 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: Make sure LLDP is not running before tests
- vyos.vyos.vyos_config:
- lines: delete service lldp
-
-- name: Create LLDP configuration
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set service lldp interface eth1" in result.commands'
-
-- name: Create LLDP configuration again (idempotent)
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: Disable LLDP configuration
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: disabled
-
-- assert:
- that:
- - result.changed == true
- - '"set service lldp interface eth1 disable" in result.commands'
-
-- name: Disable LLDP configuration again (idempotent)
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: disabled
-
-- assert:
- that:
- - result.changed == false
-
-- name: Enable LLDP configuration
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: enabled
-
-- assert:
- that:
- - result.changed == true
- - '"delete service lldp interface eth1 disable" in result.commands'
-
-- name: Enable LLDP configuration again (idempotent)
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: enabled
-
-- assert:
- that:
- - result.changed == false
-
-- name: Delete LLDP configuration
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete service lldp interface eth1" in result.commands'
-
-- name: Delete LLDP configuration again (idempotent)
- register: result
- vyos.vyos.vyos_lldp_interface:
- name: eth1
- state: absent
-
-- assert:
- that:
- - result.changed == false
-
-- name: Create aggregate of LLDP interface configurations
- register: result
- vyos.vyos.vyos_lldp_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set service lldp interface eth1" in result.commands'
- - '"set service lldp interface eth2" in result.commands'
-
-- name: Create aggregate of LLDP interface configurations again (idempotent)
- register: result
- vyos.vyos.vyos_lldp_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: Override LLDP interface configuration on aggregate
- register: result
- vyos.vyos.vyos_lldp_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: disabled
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set service lldp interface eth2 disable" in result.commands'
-
-- name: Override LLDP interface configuration on aggregate again (idempotent)
- register: result
- vyos.vyos.vyos_lldp_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: disabled
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: Delete aggregate of LLDP interface configurations
- register: result
- vyos.vyos.vyos_lldp_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete service lldp interface eth1" in result.commands'
- - '"delete service lldp interface eth2" in result.commands'
-
-- name: Delete aggregate of LLDP interface configurations (idempotent)
- register: result
- vyos.vyos.vyos_lldp_interface:
- aggregate:
-
- - name: eth1
-
- - name: eth2
- state: absent
-
-- assert:
- that:
- - result.changed == false
diff --git a/tests/integration/targets/vyos_logging/tasks/cli.yaml b/tests/integration/targets/vyos_logging/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_logging/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_logging/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_static_route/aliases b/tests/integration/targets/vyos_static_route/aliases
deleted file mode 100644
index 8071e1f..0000000
--- a/tests/integration/targets/vyos_static_route/aliases
+++ /dev/null
@@ -1 +0,0 @@
-shippable/vyos/group1
diff --git a/tests/integration/targets/vyos_static_route/defaults/main.yaml b/tests/integration/targets/vyos_static_route/defaults/main.yaml
deleted file mode 100644
index a845c24..0000000
--- a/tests/integration/targets/vyos_static_route/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: '*'
-test_items: []
diff --git a/tests/integration/targets/vyos_static_route/tasks/cli.yaml b/tests/integration/targets/vyos_static_route/tasks/cli.yaml
deleted file mode 100644
index b23cb60..0000000
--- a/tests/integration/targets/vyos_static_route/tasks/cli.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: '{{ role_path }}/tests/cli'
- patterns: '{{ testcase }}.yaml'
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test case (connection=ansible.netcommon.network_cli)
- include: '{{ test_case_to_run }} ansible_connection=ansible.netcommon.network_cli'
- with_items: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_static_route/tasks/main.yaml b/tests/integration/targets/vyos_static_route/tasks/main.yaml
deleted file mode 100644
index 07b0f2e..0000000
--- a/tests/integration/targets/vyos_static_route/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- include: cli.yaml
diff --git a/tests/integration/targets/vyos_static_route/tests/cli/basic.yaml b/tests/integration/targets/vyos_static_route/tests/cli/basic.yaml
deleted file mode 100644
index be93e89..0000000
--- a/tests/integration/targets/vyos_static_route/tests/cli/basic.yaml
+++ /dev/null
@@ -1,137 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: create static route
- register: result
- vyos.vyos.vyos_static_route:
- prefix: 172.24.0.0/24
- next_hop: 192.168.42.64
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set protocols static route 172.24.0.0/24 next-hop 192.168.42.64" in result.commands'
-
-- name: create static route again (idempotent)
- register: result
- vyos.vyos.vyos_static_route:
- prefix: 172.24.0.0
- mask: 24
- next_hop: 192.168.42.64
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: modify admin distance of static route
- register: result
- vyos.vyos.vyos_static_route:
- prefix: 172.24.0.0/24
- next_hop: 192.168.42.64
- admin_distance: 1
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set protocols static route 172.24.0.0/24 next-hop 192.168.42.64 distance
- 1" in result.commands'
-
-- name: modify admin distance of static route again (idempotent)
- register: result
- vyos.vyos.vyos_static_route:
- prefix: 172.24.0.0
- mask: 24
- next_hop: 192.168.42.64
- admin_distance: 1
- state: present
-
-- assert:
- that:
- - result.changed == false
-
-- name: delete static route
- register: result
- vyos.vyos.vyos_static_route:
- prefix: 172.24.0.0/24
- next_hop: 192.168.42.64
- admin_distance: 1
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete protocols static route 172.24.0.0/24" in result.commands'
-
-- name: delete static route again (idempotent)
- register: result
- vyos.vyos.vyos_static_route:
- prefix: 172.24.0.0/24
- next_hop: 192.168.42.64
- admin_distance: 1
- state: absent
-
-- assert:
- that:
- - result.changed == false
-
-- name: Add static route collections
- register: result
- vyos.vyos.vyos_static_route:
- aggregate:
-
- - prefix: 172.24.1.0/24
- next_hop: 192.168.42.64
-
- - prefix: 172.24.2.0
- mask: 24
- next_hop: 192.168.42.64
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"set protocols static route 172.24.1.0/24 next-hop 192.168.42.64" in result.commands'
- - '"set protocols static route 172.24.2.0/24 next-hop 192.168.42.64" in result.commands'
-
-- name: Add and remove static route collections with overrides
- register: result
- vyos.vyos.vyos_static_route:
- aggregate:
-
- - prefix: 172.24.1.0/24
- next_hop: 192.168.42.64
-
- - prefix: 172.24.2.0/24
- next_hop: 192.168.42.64
- state: absent
-
- - prefix: 172.24.3.0/24
- next_hop: 192.168.42.64
- state: present
-
-- assert:
- that:
- - result.changed == true
- - '"delete protocols static route 172.24.2.0/24" in result.commands'
- - '"set protocols static route 172.24.3.0/24 next-hop 192.168.42.64" in result.commands'
-
-- name: Remove static route collections
- register: result
- vyos.vyos.vyos_static_route:
- aggregate:
-
- - prefix: 172.24.1.0/24
- next_hop: 192.168.42.64
-
- - prefix: 172.24.3.0/24
- next_hop: 192.168.42.64
- state: absent
-
-- assert:
- that:
- - result.changed == true
- - '"delete protocols static route 172.24.1.0/24" in result.commands'
- - '"delete protocols static route 172.24.3.0/24" in result.commands'
diff --git a/tests/integration/targets/vyos_system/tasks/cli.yaml b/tests/integration/targets/vyos_system/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_system/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_system/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_user/tasks/cli.yaml b/tests/integration/targets/vyos_user/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_user/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_user/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local
diff --git a/tests/integration/targets/vyos_vlan/tasks/cli.yaml b/tests/integration/targets/vyos_vlan/tasks/cli.yaml
index b23cb60..8f7b62f 100644
--- a/tests/integration/targets/vyos_vlan/tasks/cli.yaml
+++ b/tests/integration/targets/vyos_vlan/tasks/cli.yaml
@@ -16,11 +16,3 @@
loop_var: test_case_to_run
tags:
- network_cli
-
-- name: run test case (connection=local)
- include: '{{ test_case_to_run }} ansible_connection=local'
- with_first_found: '{{ test_items }}'
- loop_control:
- loop_var: test_case_to_run
- tags:
- - local