Nios integration and unit tests for all remaining nios new modules (#43399)

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* test/integration/targets/nios_naptr_record/tasks/nios_naptr_record_idempotence.yml

new nios module integration test support

* fix pep8 error

* fix pep8 error

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end
This commit is contained in:
Sumit Jaiswal
2018-08-01 08:54:01 +05:30
committed by GitHub
parent 7314aa7298
commit e96f90b440
45 changed files with 1414 additions and 8 deletions

View File

@@ -0,0 +1,3 @@
shippable/cloud/group1
cloud/nios
destructive

View File

@@ -0,0 +1,3 @@
---
testcase: "*"
test_items: []

View File

@@ -0,0 +1,2 @@
dependencies:
- prepare_nios_tests

View File

@@ -0,0 +1 @@
- include: nios_a_record_idempotence.yml

View File

@@ -0,0 +1,77 @@
- name: cleanup the parent object
nios_zone:
name: ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create the parent object
nios_zone:
name: ansible.com
state: present
provider: "{{ nios_provider }}"
- name: cleanup a_record
nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: absent
provider: "{{ nios_provider }}"
- name: create an a_record
nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: present
provider: "{{ nios_provider }}"
register: a_record_create1
- name: recreate an a_record
nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: present
provider: "{{ nios_provider }}"
register: a_record_create2
- name: add a comment to an existing a_record
nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: a_record_update1
- name: add a comment to an existing a_record
nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: a_record_update2
- name: remove a a_record from the system
nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: absent
provider: "{{ nios_provider }}"
register: a_record_delete1
- name: remove a a_record from the system
nios_a_record:
name: a.ansible.com
ipv4: 192.168.10.1
state: absent
provider: "{{ nios_provider }}"
register: a_record_delete2
- assert:
that:
- "a_record_create1.changed"
- "not a_record_create2.changed"
- "a_record_update1.changed"
- "not a_record_update2.changed"
- "a_record_delete1.changed"
- "not a_record_delete2.changed"

View File

@@ -0,0 +1,3 @@
shippable/cloud/group1
cloud/nios
destructive

View File

@@ -0,0 +1,3 @@
---
testcase: "*"
test_items: []

View File

@@ -0,0 +1,2 @@
dependencies:
- prepare_nios_tests

View File

@@ -0,0 +1 @@
- include: nios_aaaa_record_idempotence.yml

View File

@@ -0,0 +1,77 @@
- name: cleanup the parent object
nios_zone:
name: ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create the parent object
nios_zone:
name: ansible.com
state: present
provider: "{{ nios_provider }}"
- name: cleanup aaaa record
nios_aaaa_record:
name: aaaa.ansible.com
ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
state: absent
provider: "{{ nios_provider }}"
- name: create an aaaa record
nios_aaaa_record:
name: aaaa.ansible.com
ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
state: present
provider: "{{ nios_provider }}"
register: aaaa_record_create1
- name: recreate an aaaa record
nios_aaaa_record:
name: aaaa.ansible.com
ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
state: present
provider: "{{ nios_provider }}"
register: aaaa_record_create2
- name: add a comment to an existing aaaa record
nios_aaaa_record:
name: aaaa.ansible.com
ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: aaaa_record_update1
- name: add a comment to an existing aaaa record
nios_aaaa_record:
name: aaaa.ansible.com
ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: aaaa_record_update2
- name: remove a aaaa record from the system
nios_aaaa_record:
name: aaaa.ansible.com
ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
state: absent
provider: "{{ nios_provider }}"
register: aaaa_record_delete1
- name: remove a aaaa record from the system
nios_aaaa_record:
name: aaaa.ansible.com
ipv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
state: absent
provider: "{{ nios_provider }}"
register: aaaa_record_delete2
- assert:
that:
- "aaaa_record_create1.changed"
- "not aaaa_record_create2.changed"
- "aaaa_record_update1.changed"
- "not aaaa_record_update2.changed"
- "aaaa_record_delete1.changed"
- "not aaaa_record_delete2.changed"

View File

@@ -0,0 +1,3 @@
shippable/cloud/group1
cloud/nios
destructive

View File

@@ -0,0 +1,3 @@
---
testcase: "*"
test_items: []

View File

@@ -0,0 +1,2 @@
dependencies:
- prepare_nios_tests

View File

@@ -0,0 +1 @@
- include: nios_cname_record_idempotence.yml

View File

@@ -0,0 +1,77 @@
- name: cleanup the parent object
nios_zone:
name: ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create the parent object
nios_zone:
name: ansible.com
state: present
provider: "{{ nios_provider }}"
- name: cleanup cname record
nios_cname_record:
name: cname.ansible.com
canonical: realhost.ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create an cname record
nios_cname_record:
name: cname.ansible.com
canonical: realhost.ansible.com
state: present
provider: "{{ nios_provider }}"
register: cname_record_create1
- name: recreate an cname record
nios_cname_record:
name: cname.ansible.com
canonical: realhost.ansible.com
state: present
provider: "{{ nios_provider }}"
register: cname_record_create2
- name: add a comment to an existing cname record
nios_cname_record:
name: cname.ansible.com
canonical: realhost.ansible.com
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: cname_record_update1
- name: add a comment to an existing cname record
nios_cname_record:
name: cname.ansible.com
canonical: realhost.ansible.com
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: cname_record_update2
- name: remove a cname record from the system
nios_cname_record:
name: cname.ansible.com
canonical: realhost.ansible.com
state: absent
provider: "{{ nios_provider }}"
register: cname_record_delete1
- name: remove a cname record from the system
nios_cname_record:
name: cname.ansible.com
canonical: realhost.ansible.com
state: absent
provider: "{{ nios_provider }}"
register: cname_record_delete2
- assert:
that:
- "cname_record_create1.changed"
- "not cname_record_create2.changed"
- "cname_record_update1.changed"
- "not cname_record_update2.changed"
- "cname_record_delete1.changed"
- "not cname_record_delete2.changed"

View File

@@ -0,0 +1,3 @@
shippable/cloud/group1
cloud/nios
destructive

View File

@@ -0,0 +1,3 @@
---
testcase: "*"
test_items: []

View File

@@ -0,0 +1,2 @@
dependencies:
- prepare_nios_tests

View File

@@ -0,0 +1 @@
- include: nios_mx_record_idempotence.yml

View File

@@ -0,0 +1,84 @@
- name: cleanup the parent object
nios_zone:
name: ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create the parent object
nios_zone:
name: ansible.com
state: present
provider: "{{ nios_provider }}"
- name: cleanup mx record
nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
state: absent
provider: "{{ nios_provider }}"
- name: create an mx record
nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
state: present
provider: "{{ nios_provider }}"
register: mx_record_create1
- name: recreate an mx record
nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
state: present
provider: "{{ nios_provider }}"
register: mx_record_create2
- name: add a comment to an existing mx record
nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: mx_record_update1
- name: add a comment to an existing mx record
nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: mx_record_update2
- name: remove a mx record from the system
nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
state: absent
provider: "{{ nios_provider }}"
register: mx_record_delete1
- name: remove a mx record from the system
nios_mx_record:
name: ansible.com
mx: mailhost.ansible.com
preference: 0
state: absent
provider: "{{ nios_provider }}"
register: mx_record_delete2
- assert:
that:
- "mx_record_create1.changed"
- "not mx_record_create2.changed"
- "mx_record_update1.changed"
- "not mx_record_update2.changed"
- "mx_record_delete1.changed"
- "not mx_record_delete2.changed"

View File

@@ -0,0 +1,3 @@
shippable/cloud/group1
cloud/nios
destructive

View File

@@ -0,0 +1,3 @@
---
testcase: "*"
test_items: []

View File

@@ -0,0 +1,2 @@
dependencies:
- prepare_nios_tests

View File

@@ -0,0 +1 @@
- include: nios_naptr_record_idempotence.yml

View File

@@ -0,0 +1,91 @@
- name: cleanup the parent object
nios_zone:
name: ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create the parent object
nios_zone:
name: ansible.com
state: present
provider: "{{ nios_provider }}"
- name: cleanup naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: absent
provider: "{{ nios_provider }}"
- name: create an naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: present
provider: "{{ nios_provider }}"
register: naptr_record_create1
- name: recreate an naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: present
provider: "{{ nios_provider }}"
register: naptr_record_create2
- name: add a comment to an existing naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: naptr_record_update1
- name: add a comment to an existing naptr record
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: naptr_record_update2
- name: remove a naptr record from the system
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: absent
provider: "{{ nios_provider }}"
register: naptr_record_delete1
- name: remove a naptr record from the system
nios_naptr_record:
name: '*.subscriber-100.ansiblezone.com'
order: 1000
preference: 10
replacement: replacement1.network.ansiblezone.com
state: absent
provider: "{{ nios_provider }}"
register: naptr_record_delete2
- assert:
that:
- "naptr_record_create1.changed"
- "not naptr_record_create2.changed"
- "naptr_record_update1.changed"
- "not naptr_record_update2.changed"
- "naptr_record_delete1.changed"
- "not naptr_record_delete2.changed"

View File

@@ -1,3 +1,3 @@
---
testcase: "*"
test_items: []
test_items: []

View File

@@ -1,2 +1,2 @@
dependencies:
- prepare_nios_tests
- prepare_nios_tests

View File

@@ -0,0 +1,3 @@
shippable/cloud/group1
cloud/nios
destructive

View File

@@ -0,0 +1,3 @@
---
testcase: "*"
test_items: []

View File

@@ -0,0 +1,2 @@
dependencies:
- prepare_nios_tests

View File

@@ -0,0 +1 @@
- include: nios_srv_record_idempotence.yml

View File

@@ -0,0 +1,98 @@
- name: cleanup the parent object
nios_zone:
name: ansible.com
state: absent
provider: "{{ nios_provider }}"
- name: create the parent object
nios_zone:
name: ansible.com
state: present
provider: "{{ nios_provider }}"
- name: cleanup srv record
nios_srv_record:
name: ansible.com
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
state: absent
provider: "{{ nios_provider }}"
- name: create an srv record
nios_srv_record:
name: ansible.com
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
state: present
provider: "{{ nios_provider }}"
register: srv_record_create1
- name: recreate an srv record
nios_srv_record:
name: ansible.com
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
state: present
provider: "{{ nios_provider }}"
register: srv_record_create2
- name: add a comment to an existing srv record
nios_srv_record:
name: ansible.com
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: srv_record_update1
- name: add a comment to an existing srv record
nios_srv_record:
name: ansible.com
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: srv_record_update2
- name: remove a srv record from the system
nios_srv_record:
name: ansible.com
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
state: absent
provider: "{{ nios_provider }}"
register: srv_record_delete1
- name: remove a srv record from the system
nios_srv_record:
name: ansible.com
port: 5080
priority: 10
target: service1.ansible.com
weight: 10
state: absent
provider: "{{ nios_provider }}"
register: srv_record_delete2
- assert:
that:
- "srv_record_create1.changed"
- "not srv_record_create2.changed"
- "srv_record_update1.changed"
- "not srv_record_update2.changed"
- "srv_record_delete1.changed"
- "not srv_record_delete2.changed"