summaryrefslogtreecommitdiff
path: root/test/integration/targets/cs_traffic_type/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/cs_traffic_type/tasks/main.yml')
-rw-r--r--test/integration/targets/cs_traffic_type/tasks/main.yml173
1 files changed, 0 insertions, 173 deletions
diff --git a/test/integration/targets/cs_traffic_type/tasks/main.yml b/test/integration/targets/cs_traffic_type/tasks/main.yml
deleted file mode 100644
index cc2d52b1c4..0000000000
--- a/test/integration/targets/cs_traffic_type/tasks/main.yml
+++ /dev/null
@@ -1,173 +0,0 @@
----
-# Create a new zone - the default one is enabled
-- name: assure zone for tests
- cs_zone:
- name: cs-test-zone
- state: present
- dns1: 8.8.8.8
- network_type: Advanced
- register: cszone
-
-- name: ensure the zone is disabled
- cs_zone:
- name: "{{ cszone.name }}"
- state: disabled
- register: cszone
-
-- name: setup a network
- cs_physical_network:
- name: net01
- zone: "{{ cszone.name }}"
- isolation_method: VLAN
- broadcast_domain_range: ZONE
- ignore_errors: true
- register: pn
-
-
-- name: fail on missing params
- cs_traffic_type:
- ignore_errors: true
- register: tt
-- name: validate fail on missing params
- assert:
- that:
- - tt is failed
- - 'tt.msg == "missing required arguments: physical_network, traffic_type"'
-
-- name: add a traffic type in check mode
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Guest
- zone: "{{ pn.zone }}"
- register: tt
- check_mode: yes
-- name: validate add a traffic type in check mode
- assert:
- that:
- - tt is changed
- - tt.zone == pn.zone
-
-- name: add a traffic type
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Guest
- zone: "{{ pn.zone }}"
- register: tt
-- name: validate add a traffic type
- assert:
- that:
- - tt is changed
- - tt.physical_network == pn.id
- - tt.traffic_type == 'Guest'
- - tt.zone == pn.zone
-
-- name: add a traffic type idempotence
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Guest
- zone: "{{ pn.zone }}"
- register: tt
-- name: validate add a traffic type idempotence
- assert:
- that:
- - tt is not changed
- - tt.physical_network == pn.id
- - tt.traffic_type == 'Guest'
- - tt.zone == pn.zone
-
-- name: update traffic type
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Guest
- kvm_networklabel: cloudbr0
- zone: "{{ pn.zone }}"
- register: tt
-- name: validate update traffic type
- assert:
- that:
- - tt is changed
- - tt.physical_network == pn.id
- - tt.traffic_type == 'Guest'
- - tt.zone == pn.zone
- - tt.kvm_networklabel == 'cloudbr0'
-
-- name: update traffic type idempotence
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Guest
- kvm_networklabel: cloudbr0
- zone: "{{ pn.zone }}"
- register: tt
-- name: validate update traffic type idempotence
- assert:
- that:
- - tt is not changed
- - tt.physical_network == pn.id
- - tt.traffic_type == 'Guest'
- - tt.zone == pn.zone
- - tt.kvm_networklabel == 'cloudbr0'
-
-- name: add a removable traffic type
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Public
- kvm_networklabel: cloudbr1
- zone: "{{ pn.zone }}"
- register: tt
-- name: validate add a removable traffic type
- assert:
- that:
- - tt is changed
- - tt.physical_network == pn.id
- - tt.traffic_type == 'Public'
- - tt.zone == pn.zone
- - tt.kvm_networklabel == 'cloudbr1'
-
-- name: remove traffic type in check mode
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Public
- state: absent
- zone: "{{ pn.zone }}"
- check_mode: yes
- register: tt
-- name: validate remove traffic type in check mode
- assert:
- that:
- - tt is changed
-
-- name: remove traffic type
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Public
- state: absent
- zone: "{{ pn.zone }}"
- register: tt
-- name: validate remove traffic type
- assert:
- that:
- - tt is changed
- - tt.zone == pn.zone
-
-- name: remove traffic type idempotence
- cs_traffic_type:
- physical_network: "{{ pn.name }}"
- traffic_type: Public
- state: absent
- zone: "{{ pn.zone }}"
- register: tt
-- name: validate
- assert:
- that:
- - tt is not changed
- - tt.zone == pn.zone
-
-- name: cleanup
- block:
- - cs_physical_network:
- name: "{{ pn.name }}"
- zone: "{{ cszone.name }}"
- state: absent
- - cs_zone:
- name: "{{ cszone.name }}"
- state: absent \ No newline at end of file