summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/storage
diff options
context:
space:
mode:
authorChris Archibald <carchi8py@gmail.com>2019-08-28 08:45:15 -0700
committerJake Jackson <jljacks93@gmail.com>2019-08-28 11:45:15 -0400
commit49cff3d4a616874649d2b08a556040a41ec4367c (patch)
tree8ee657c565b3356b586b7bc177866a281e3c4356 /lib/ansible/modules/storage
parentc6710ebf6b0d2bd530421e244475dc4aa7583f65 (diff)
downloadansible-49cff3d4a616874649d2b08a556040a41ec4367c.tar.gz
New options to Interface (#60499)
* update to interface * force ansibot to run again * fixes
Diffstat (limited to 'lib/ansible/modules/storage')
-rw-r--r--lib/ansible/modules/storage/netapp/na_ontap_interface.py46
1 files changed, 43 insertions, 3 deletions
diff --git a/lib/ansible/modules/storage/netapp/na_ontap_interface.py b/lib/ansible/modules/storage/netapp/na_ontap_interface.py
index e25745e09b..0b1abea6b3 100644
--- a/lib/ansible/modules/storage/netapp/na_ontap_interface.py
+++ b/lib/ansible/modules/storage/netapp/na_ontap_interface.py
@@ -76,9 +76,9 @@ options:
- Specifies the firewall policy for the LIF.
failover_policy:
+ choices: ['disabled', 'system-defined', 'local-only', 'sfo-partner-only', 'broadcast-domain-wide']
description:
- Specifies the failover policy for the LIF.
- - Possible values are 'disabled', 'system-defined', 'local-only', 'sfo-partner-only', and 'broadcast-domain-wide'
subnet_name:
description:
@@ -111,6 +111,24 @@ options:
- Protocol values of none, iscsi, fc-nvme or fcp can't be combined with any other data protocol(s).
- address, netmask and firewall_policy parameters are not supported for 'fc-nvme' option.
+ dns_domain_name:
+ description:
+ - Specifies the unique, fully qualified domain name of the DNS zone of this LIF.
+ type: str
+ version_added: '2.9'
+
+ listen_for_dns_query:
+ description:
+ - If True, this IP address will listen for DNS queries for the dnszone specified.
+ type: bool
+ version_added: '2.9'
+
+ is_dns_update_enabled:
+ description:
+ - Specifies if DNS update is enabled for this LIF. Dynamic updates will be sent for this LIF if updates are enabled at Vserver level.
+ type: bool
+ version_added: '2.9'
+
'''
EXAMPLES = '''
@@ -129,6 +147,9 @@ EXAMPLES = '''
address: 10.10.10.10
netmask: 255.255.255.0
force_subnet_association: false
+ dns_domain_name: test.com
+ listen_for_dns_query: true
+ is_dns_update_enabled: true
vserver: svm1
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
@@ -174,12 +195,17 @@ class NetAppOntapInterface(object):
netmask=dict(required=False, type='str'),
vserver=dict(required=True, type='str'),
firewall_policy=dict(required=False, type='str', default=None),
- failover_policy=dict(required=False, type='str', default=None),
+ failover_policy=dict(required=False, type='str', default=None,
+ choices=['disabled', 'system-defined',
+ 'local-only', 'sfo-partner-only', 'broadcast-domain-wide']),
admin_status=dict(required=False, choices=['up', 'down']),
subnet_name=dict(required=False, type='str'),
is_auto_revert=dict(required=False, type='bool', default=None),
protocols=dict(required=False, type='list'),
- force_subnet_association=dict(required=False, type='bool', default=None)
+ force_subnet_association=dict(required=False, type='bool', default=None),
+ dns_domain_name=dict(required=False, type='str'),
+ listen_for_dns_query=dict(required=False, type='bool'),
+ is_dns_update_enabled=dict(required=False, type='bool')
))
self.module = AnsibleModule(
@@ -237,6 +263,14 @@ class NetAppOntapInterface(object):
return_value['netmask'] = interface_attributes['netmask']
if interface_attributes.get_child_by_name('firewall-policy'):
return_value['firewall_policy'] = interface_attributes['firewall-policy']
+ if interface_attributes.get_child_by_name('dns-domain-name') != 'none':
+ return_value['dns_domain_name'] = interface_attributes['dns-domain-name']
+ else:
+ return_value['dns_domain_name'] = None
+ if interface_attributes.get_child_by_name('listen-for-dns-query'):
+ return_value['listen_for_dns_query'] = self.na_helper.get_value_for_bool(True, interface_attributes['listen-for-dns-query'])
+ if interface_attributes.get_child_by_name('is-dns-update-enabled'):
+ return_value['is_dns_update_enabled'] = self.na_helper.get_value_for_bool(True, interface_attributes['is-dns-update-enabled'])
return return_value
@staticmethod
@@ -260,6 +294,12 @@ class NetAppOntapInterface(object):
options['administrative-status'] = parameters['admin_status']
if parameters.get('force_subnet_association') is not None:
options['force-subnet-association'] = 'true' if parameters['force_subnet_association'] else 'false'
+ if parameters.get('dns_domain_name') is not None:
+ options['dns-domain-name'] = parameters['dns_domain_name']
+ if parameters.get('listen_for_dns_query') is not None:
+ options['listen-for-dns-query'] = str(parameters['listen_for_dns_query'])
+ if parameters.get('is_dns_update_enabled') is not None:
+ options['is-dns-update-enabled'] = str(parameters['is_dns_update_enabled'])
def set_protocol_option(self, required_keys):
""" set protocols for create """