Add the NIOS RECORD PTR Module (#41900)

* Add the NIOS RECORD PTR Module

* FIX E241,E231, E105

* FIX module should not be executable

* FIX module RWX

* Remove change in nios_srv_record

* Remove change in nios_srv_record

* FIX test_nios_ptr_record_update_comment

* ADD: Integration and target tests for the NIOS PTR RECORD module.

* FIX module name in integrations tests

* Update integration

* Refactor nios_ptr_record module

* Refactor the nios_ptr_record_idempotence

* FIX name

* Smoketests for the NIOS modules does not take care of the PTR:RECORD object

* REM the default for view

* Add finals test, after adding the PR (https://github.com/ansible/nios-test-container/pull/1) in order to handle PTR:RECORD

* add the define nios specific constant for PTR:RECORD

* fix: documentation style

* add create an ipv6 ptr record

* rename class name, add ipv6 unittest
This commit is contained in:
Clement Trebuchet 2018-07-11 20:25:28 +02:00 committed by Sumit Jaiswal
parent 8b61dd6efc
commit c7981c4cc8
8 changed files with 423 additions and 0 deletions

View file

@ -0,0 +1,3 @@
posix/ci/cloud/group4/nios
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_ptr_record_idempotence.yml

View file

@ -0,0 +1,78 @@
---
- name: create an ipv4 ptr record
nios_ptr_record:
name: ptr.ansible.com
ptrdname: ptr.ansible.com
ipv4: 192.168.10.1
state: present
provider: "{{ nios_provider }}"
view: default
register: ipv4_ptr_create1
- name: create the same ipv4 ptr record
nios_ptr_record:
name: ptr.ansible.com
ptrdname: ptr.ansible.com
ipv4: 192.168.10.1
state: present
view: default
provider: "{{ nios_provider }}"
register: ipv4_ptr_create2
- name: add a comment to an existing ipv4 ptr record
nios_ptr_record:
name: ptr.ansible.com
ptrdname: ptr.ansible.com
ipv4: 192.168.10.1
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: ipv4_ptr_update1
- name: add the same comment to the same ipv4 ptr host record
nios_ptr_record:
name: ptr.ansible.com
ptrdname: ptr.ansible.com
ipv4: 192.168.10.1
comment: this is a test comment
state: present
provider: "{{ nios_provider }}"
register: ipv4_ptr_update2
- name: remove a ptr record from the system
nios_ptr_record:
name: ptr.ansible.com
ptrdname: ptr.ansible.com
ipv4: 192.168.10.1
state: absent
provider: "{{ nios_provider }}"
register: ipv4_ptr_delete1
- name: remove the same ptr record from the system
nios_ptr_record:
ptrdname: ptr.ansible.com
name: ptr.ansible.com
ipv4: 192.168.10.1
state: absent
provider: "{{ nios_provider }}"
register: ipv4_ptr_delete2
- name: create an ipv6 ptr record
nios_ptr_record:
ptrdname: ptr6.ansible.com
name: ptr6.ansible.com
ipv6: "2002:8ac3:802d:1242:20d:60ff:fe38:6d16"
state: present
provider: "{{ nios_provider }}"
register: ipv6_ptr_create1
- assert:
that:
- "ipv4_ptr_create1.changed"
- "not ipv4_ptr_create2.changed"
- "ipv4_ptr_update1.changed"
- "not ipv4_ptr_update2.changed"
- "ipv4_ptr_delete1.changed"
- "not ipv4_ptr_delete2.changed"
- "ipv6_ptr_create1.changed"