Skip to content

Commit

Permalink
Added required fields (#99)
Browse files Browse the repository at this point in the history
Configured the environment variable in ansible-test.yaml
  • Loading branch information
anagha-infoblox authored Dec 10, 2021
1 parent 64eabce commit 1d8f461
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ jobs:
run: ansible-galaxy collection install .cache/collection-tarball/*.tar.gz

- name: Setup Integration test Pre-requisites
run: pip install -r /home/runner/.ansible/collections/ansible_collections/infoblox/nios_modules/tests/requirements.txt
run: pip install -r /home/runner/.ansible/collections/ansible_collections/infoblox/nios_modules/tests/requirements.txt

- name: Set environment variable
run: echo $ANSIBLE_NIOSSIM_CONTAINER
env:
ANSIBLE_NIOSSIM_CONTAINER: quay.io/ansible/nios-test-container:1.4.0

# Run the integration tests
- name: Run integration test
Expand Down
5 changes: 2 additions & 3 deletions plugins/modules/nios_a_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
I(nios_next_ip) and I(CIDR network range). See example.
aliases:
- ipv4
required: true
type: str
ttl:
description:
Expand Down Expand Up @@ -135,8 +136,6 @@

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six import iteritems
# from ansible_collections.saileshgiri.test_col.plugins.module_utils.api import WapiModule
# from ansible_collections.saileshgiri.test_col.plugins.module_utils.api import NIOS_A_RECORD
from ..module_utils.api import WapiModule
from ..module_utils.api import NIOS_A_RECORD
from ..module_utils.api import normalize_ib_spec
Expand All @@ -150,7 +149,7 @@ def main():
name=dict(required=True, ib_req=True),
view=dict(default='default', aliases=['dns_view'], ib_req=True),

ipv4addr=dict(aliases=['ipv4'], ib_req=True),
ipv4addr=dict(required=True, aliases=['ipv4'], ib_req=True),

ttl=dict(type='int'),

Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/nios_aaaa_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- Configures the IPv6 address for this AAAA record.
aliases:
- ipv6
required: true
type: str
ttl:
description:
Expand Down Expand Up @@ -136,7 +137,7 @@ def main():
name=dict(required=True, ib_req=True),
view=dict(default='default', aliases=['dns_view'], ib_req=True),

ipv6addr=dict(aliases=['ipv6'], ib_req=True),
ipv6addr=dict(required=True, aliases=['ipv6'], ib_req=True),

ttl=dict(type='int'),

Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/nios_cname_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- Configures the canonical name for this CNAME record.
aliases:
- cname
required: true
type: str
ttl:
description:
Expand Down Expand Up @@ -124,7 +125,7 @@ def main():
name=dict(required=True, ib_req=True),
view=dict(default='default', aliases=['dns_view'], ib_req=True),

canonical=dict(aliases=['cname'], ib_req=True),
canonical=dict(required=True, aliases=['cname'], ib_req=True),

ttl=dict(type='int'),

Expand Down
6 changes: 4 additions & 2 deletions plugins/modules/nios_mx_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@
description:
- Configures the mail exchanger FQDN for this MX record.
type: str
required: true
aliases:
- mx
preference:
description:
- Configures the preference (0-65535) for this MX record.
type: int
required: true
ttl:
description:
- Configures the TTL to be associated with this host record.
Expand Down Expand Up @@ -131,8 +133,8 @@ def main():
name=dict(required=True, ib_req=True),
view=dict(default='default', aliases=['dns_view'], ib_req=True),

mail_exchanger=dict(aliases=['mx'], ib_req=True),
preference=dict(type='int', ib_req=True),
mail_exchanger=dict(required=True, aliases=['mx'], ib_req=True),
preference=dict(required=True, type='int', ib_req=True),

ttl=dict(type='int'),

Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/nios_ptr_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
ptrdname:
description:
- The domain name of the DNS PTR record in FQDN format.
required: true
type: str
ttl:
description:
Expand Down Expand Up @@ -122,7 +123,7 @@ def main():
view=dict(default='default', aliases=['dns_view']),
ipv4addr=dict(aliases=['ipv4'], ib_req=True),
ipv6addr=dict(aliases=['ipv6'], ib_req=True),
ptrdname=dict(ib_req=True),
ptrdname=dict(required=True, ib_req=True),

ttl=dict(type='int'),

Expand Down

0 comments on commit 1d8f461

Please sign in to comment.