1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

azure_rm_dnsrecordset: fix broken import and minor updates (#34983)

* fix broken import

Error was:
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py:223:0: NameError: name 'ARecord' is not defined

* doc: use formatting functions

* remove unused dict
This commit is contained in:
Pilou 2018-01-25 18:39:49 +01:00 committed by Matt Clay
parent 417accf88d
commit 0ce8d389a4
2 changed files with 4 additions and 8 deletions

View file

@ -58,8 +58,8 @@ options:
- purge - purge
state: state:
description: description:
- Assert the state of the record set. Use 'present' to create or update and - Assert the state of the record set. Use C(present) to create or update and
'absent' to delete. C(absent) to delete.
default: present default: present
choices: choices:
- absent - absent
@ -174,7 +174,7 @@ import sys
from ansible.module_utils.basic import _load_params from ansible.module_utils.basic import _load_params
from ansible.module_utils.six import iteritems from ansible.module_utils.six import iteritems
from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils.azure_rm_common import AzureRMModuleBase, HAS_AZURE
try: try:
from msrestazure.azure_exceptions import CloudError from msrestazure.azure_exceptions import CloudError
@ -183,9 +183,6 @@ except ImportError:
# This is handled in azure_rm_common # This is handled in azure_rm_common
pass pass
base_record = dict(
entry=dict(type='str', required=True)
)
RECORD_ARGSPECS = dict( RECORD_ARGSPECS = dict(
A=dict( A=dict(
@ -229,7 +226,7 @@ RECORDSET_VALUE_MAP = dict(
SRV=dict(attrname='srv_records', classobj=SrvRecord, is_list=True), SRV=dict(attrname='srv_records', classobj=SrvRecord, is_list=True),
TXT=dict(attrname='txt_records', classobj=TxtRecord, is_list=True), TXT=dict(attrname='txt_records', classobj=TxtRecord, is_list=True),
# FUTURE: add missing record types from https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt-dns/azure/mgmt/dns/models/record_set.py # FUTURE: add missing record types from https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt-dns/azure/mgmt/dns/models/record_set.py
) ) if HAS_AZURE else {}
class AzureRMRecordSet(AzureRMModuleBase): class AzureRMRecordSet(AzureRMModuleBase):

View file

@ -1,4 +1,3 @@
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py
lib/ansible/modules/cloud/webfaction/webfaction_app.py lib/ansible/modules/cloud/webfaction/webfaction_app.py
lib/ansible/modules/cloud/webfaction/webfaction_db.py lib/ansible/modules/cloud/webfaction/webfaction_db.py