summaryrefslogtreecommitdiff
path: root/test/integration/targets/vyos_vlan
diff options
context:
space:
mode:
authorCaptTrews <capttrews@gmail.com>2019-08-29 14:21:30 +0000
committerCaptTrews <capttrews@gmail.com>2019-08-29 14:21:30 +0000
commitae8514ce0289ee2096a3a9f54be6a4654153c880 (patch)
tree2d9a958c135c5ec4cad86650e8f7d7ef173d33c2 /test/integration/targets/vyos_vlan
parent59af486ab07108815ad1774205959fa8287d6e53 (diff)
downloadvyos.vyos-ae8514ce0289ee2096a3a9f54be6a4654153c880.tar.gz
vyos.vyos-ae8514ce0289ee2096a3a9f54be6a4654153c880.zip
Updated from network content collector
Signed-off-by: CaptTrews <capttrews@gmail.com>
Diffstat (limited to 'test/integration/targets/vyos_vlan')
-rw-r--r--test/integration/targets/vyos_vlan/aliases0
-rw-r--r--test/integration/targets/vyos_vlan/defaults/main.yaml3
-rw-r--r--test/integration/targets/vyos_vlan/tasks/cli.yaml22
-rw-r--r--test/integration/targets/vyos_vlan/tasks/main.yaml2
-rw-r--r--test/integration/targets/vyos_vlan/tests/cli/basic.yaml101
-rw-r--r--test/integration/targets/vyos_vlan/tests/cli/intent.yaml59
-rw-r--r--test/integration/targets/vyos_vlan/tests/cli/multiple.yaml60
7 files changed, 0 insertions, 247 deletions
diff --git a/test/integration/targets/vyos_vlan/aliases b/test/integration/targets/vyos_vlan/aliases
deleted file mode 100644
index e69de29..0000000
--- a/test/integration/targets/vyos_vlan/aliases
+++ /dev/null
diff --git a/test/integration/targets/vyos_vlan/defaults/main.yaml b/test/integration/targets/vyos_vlan/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5..0000000
--- a/test/integration/targets/vyos_vlan/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/vyos_vlan/tasks/cli.yaml b/test/integration/targets/vyos_vlan/tasks/cli.yaml
deleted file mode 100644
index 890d3ac..0000000
--- a/test/integration/targets/vyos_vlan/tasks/cli.yaml
+++ /dev/null
@@ -1,22 +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=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- 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
diff --git a/test/integration/targets/vyos_vlan/tasks/main.yaml b/test/integration/targets/vyos_vlan/tasks/main.yaml
deleted file mode 100644
index 415c99d..0000000
--- a/test/integration/targets/vyos_vlan/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/vyos_vlan/tests/cli/basic.yaml b/test/integration/targets/vyos_vlan/tests/cli/basic.yaml
deleted file mode 100644
index 6e4417e..0000000
--- a/test/integration/targets/vyos_vlan/tests/cli/basic.yaml
+++ /dev/null
@@ -1,101 +0,0 @@
----
-- debug: msg="START cli/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove vlan used in test
- vyos.vyos.vyos_config:
- lines:
- - delete interfaces ethernet eth1 vif 100
- - delete interfaces ethernet eth0 vif 5
- - delete interfaces ethernet eth0 vif 100
- - delete interfaces ethernet eth0 vif 101
- - delete interfaces ethernet eth1 vif 201
-
-- name: set vlan with name
- vyos.vyos.vyos_vlan: &name
- vlan_id: 100
- name: vlan-100
- interfaces: eth1
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set interfaces ethernet eth1 vif 100 description vlan-100' in result.commands"
-
-- name: set vlan with name(idempotence)
- vyos.vyos.vyos_vlan: *name
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: set vlan with address
- vyos.vyos.vyos_vlan: &address
- vlan_id: 5
- address: 192.168.5.12/24
- interfaces: eth0
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set interfaces ethernet eth0 vif 5 address 192.168.5.12/24' in result.commands"
-
-- name: set vlan with address(idempotence)
- vyos.vyos.vyos_vlan: *address
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: delete
- vyos.vyos.vyos_vlan: &delete
- vlan_id: 100
- interfaces: eth1
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'delete interfaces ethernet eth1 vif 100' in result.commands"
-
-- name: delete(idempotence)
- vyos.vyos.vyos_vlan: *delete
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Create VLANs using aggregate
- vyos.vyos.vyos_vlan: &agg_vlan
- aggregate:
- - { vlan_id: 101, name: voice, interfaces: "eth0" }
- - { vlan_id: 201, name: mgm, interfaces: "eth1" }
- state: present
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set interfaces ethernet eth0 vif 101 description voice' in result.commands"
- - "'set interfaces ethernet eth1 vif 201 description mgm' in result.commands"
-
-- name: Create VLANs using aggregate (idempotent)
- vyos.vyos.vyos_vlan: *agg_vlan
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- vyos.vyos.vyos_config:
- lines:
- - delete interfaces ethernet eth1 vif 100
- - delete interfaces ethernet eth0 vif 5
- - delete interfaces ethernet eth0 vif 101
- - delete interfaces ethernet eth1 vif 201
diff --git a/test/integration/targets/vyos_vlan/tests/cli/intent.yaml b/test/integration/targets/vyos_vlan/tests/cli/intent.yaml
deleted file mode 100644
index 7c78937..0000000
--- a/test/integration/targets/vyos_vlan/tests/cli/intent.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-- debug: msg="START cli/intent.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove vlan used in test
- vyos.vyos.vyos_config: &delete
- lines:
- - delete interfaces ethernet eth1 vif 100
- - delete interfaces ethernet eth0 vif 100
-
-- name: set vlan with name
- vyos.vyos.vyos_vlan:
- vlan_id: 100
- name: vlan-100
- interfaces: eth1
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set interfaces ethernet eth1 vif 100 description vlan-100' in result.commands"
-
-- name: check vlan interface intent
- vyos.vyos.vyos_vlan:
- vlan_id: 100
- name: vlan-100
- associated_interfaces: eth1
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: vlan interface config + intent
- vyos.vyos.vyos_vlan:
- vlan_id: 100
- interfaces: eth0
- associated_interfaces:
- - eth0
- - eth1
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: vlan intent fail
- vyos.vyos.vyos_vlan:
- vlan_id: 100
- associated_interfaces:
- - eth3
- - eth4
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == True"
-
-- debug: msg="End cli/intent.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/vyos_vlan/tests/cli/multiple.yaml b/test/integration/targets/vyos_vlan/tests/cli/multiple.yaml
deleted file mode 100644
index 53e93fd..0000000
--- a/test/integration/targets/vyos_vlan/tests/cli/multiple.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-- debug: msg="START cli/multiple.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove vlan used in test
- vyos.vyos.vyos_config:
- lines:
- - delete interfaces ethernet eth0 vif 5
- - delete interfaces ethernet eth0 vif 100
- - delete interfaces ethernet eth1 vif 100
-
-- name: Add multiple interfaces to vlan
- vyos.vyos.vyos_vlan: &multiple
- vlan_id: 100
- interfaces:
- - eth0
- - eth1
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'set interfaces ethernet eth0 vif 100' in result.commands"
- - "'set interfaces ethernet eth1 vif 100' in result.commands"
-
-- name: Add multiple interfaces to vlan(idempotence)
- vyos.vyos.vyos_vlan: *multiple
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: delete vlan with multiple interfaces
- vyos.vyos.vyos_vlan: &delete_multiple
- vlan_id: 100
- interfaces:
- - eth0
- - eth1
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'delete interfaces ethernet eth0 vif 100' in result.commands"
- - "'delete interfaces ethernet eth1 vif 100' in result.commands"
-
-- name: delete vlan with multiple interfaces(idempotence)
- vyos.vyos.vyos_vlan: *delete_multiple
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- vyos.vyos.vyos_config:
- lines:
- - delete interfaces ethernet eth0 vif 100
- - delete interfaces ethernet eth1 vif 100