mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-27 05:53:02 +00:00
Correctly build params dict in recordset
Change If8fda40780050d271c9d869d8959ef569644fd88 unintentionally broke our integration tests. This patch fixes the code and tests to make everything pass again. Change-Id: Ief8d1f9e1eec13a2d435e96a0d70e31a2b4431f2
This commit is contained in:
@@ -184,6 +184,10 @@ class DnsRecordsetModule(OpenStackModule):
|
||||
|
||||
def _needs_update(self, params, recordset):
|
||||
for k in ('description', 'records', 'ttl', 'type'):
|
||||
if k not in params:
|
||||
continue
|
||||
if k not in recordset:
|
||||
return True
|
||||
if params[k] is not None and params[k] != recordset[k]:
|
||||
return True
|
||||
return False
|
||||
@@ -204,10 +208,10 @@ class DnsRecordsetModule(OpenStackModule):
|
||||
description = self.params['description']
|
||||
ttl = self.params['ttl']
|
||||
params = {
|
||||
description: description,
|
||||
records: records,
|
||||
type: recordset_type.upper(),
|
||||
ttl: ttl,
|
||||
'description': description,
|
||||
'records': records,
|
||||
'type': recordset_type.upper(),
|
||||
'ttl': ttl,
|
||||
}
|
||||
return {k: v for k, v in params.items() if v is not None}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user