From ca918def18b38063d7dc5a7c89a9bd7099c9cf10 Mon Sep 17 00:00:00 2001 From: Michael Brennan Date: Wed, 28 Nov 2018 11:13:50 -0600 Subject: [PATCH] fixed parsing issue with openstacksdk and idempotent checking issues (#44928) * fixed parsing issue with openstacksdk and idempotent checking issues * fixed whitespace found in pylint --- lib/ansible/modules/cloud/openstack/os_recordset.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_recordset.py b/lib/ansible/modules/cloud/openstack/os_recordset.py index 9ae24c9b544..60e7a91fc8b 100644 --- a/lib/ansible/modules/cloud/openstack/os_recordset.py +++ b/lib/ansible/modules/cloud/openstack/os_recordset.py @@ -130,11 +130,11 @@ def _system_state_change(state, records, description, ttl, zone, recordset): if state == 'present': if recordset is None: return True - if records is not None and recordset.records != records: + if records is not None and recordset['records'] != records: return True - if description is not None and recordset.description != description: + if description is not None and recordset['description'] != description: return True - if ttl is not None and recordset.ttl != ttl: + if ttl is not None and recordset['ttl'] != ttl: return True if state == 'absent' and recordset: return True @@ -169,7 +169,7 @@ def main(): recordset_type = module.params.get('recordset_type') recordset_filter = {'type': recordset_type} - recordsets = cloud.search_recordsets(zone, name_or_id=name + '.' + zone, filters=recordset_filter) + recordsets = cloud.search_recordsets(zone, name_or_id=name, filters=recordset_filter) if len(recordsets) == 1: recordset = recordsets[0]