mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-06 13:23:06 +00:00
Move dns zone info to use proxy layer
Make it compatible with new SDK. Although this one was already using self.con.dns.zones to retrieve the zones, it wasn't using the to_dict(computed=False) and was still removing the location (which is obsolate when you use to_dict. Change-Id: Ie2a5b772acc0c8c8338f6f1da877564a077e3b7a
This commit is contained in:
@@ -161,12 +161,8 @@ class DnsZoneInfoModule(OpenStackModule):
|
||||
if ttl:
|
||||
kwargs['ttl'] = ttl
|
||||
|
||||
data = []
|
||||
|
||||
for raw in self.conn.dns.zones(**kwargs):
|
||||
dt = raw.to_dict()
|
||||
dt.pop('location')
|
||||
data.append(dt)
|
||||
data = [zone.to_dict(computed=False) for zone in
|
||||
self.conn.dns.zones(**kwargs)]
|
||||
|
||||
self.exit_json(zones=data, changed=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user