mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-26 21:43:02 +00:00
fix test failures on recordset
Since long time we knew that it is necessary to explicitly invoke `to_dict` for openstacksdk resources before passing them to Ansible. Here it was missed and in addition to that records are only returned when the recordset becomes active. Change-Id: I49238d2f7add9412bb9100b69f1b84b512f8c34b
This commit is contained in:
committed by
Sagi Shnaidman
parent
41cf92df99
commit
08d8cd8c25
@@ -239,7 +239,11 @@ class DnsRecordsetModule(OpenStackModule):
|
||||
elif self._needs_update(kwargs, recordset):
|
||||
recordset = self.conn.dns.update_recordset(recordset, **kwargs)
|
||||
changed = True
|
||||
self.exit_json(changed=changed, recordset=recordset)
|
||||
# NOTE(gtema): this is a workaround to temporarily bring the
|
||||
# zone_id param back which may not me populated by SDK
|
||||
rs = recordset.to_dict(computed=False)
|
||||
rs["zone_id"] = zone.id
|
||||
self.exit_json(changed=changed, recordset=rs)
|
||||
elif state == 'absent' and recordset is not None:
|
||||
self.conn.dns.delete_recordset(recordset)
|
||||
changed = True
|
||||
|
||||
Reference in New Issue
Block a user