summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_interface
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/targets/vyos_interface')
-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
4 files changed, 0 insertions, 279 deletions
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