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:
parent
5a43bdb873
commit
0c6e8bed69
@ -34,6 +34,14 @@
|
|||||||
- zone is not changed
|
- zone is not changed
|
||||||
- zone.zones | length == 1
|
- zone.zones | length == 1
|
||||||
|
|
||||||
|
- name: Assert keys exist
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- '["action", "attributes", "created_at", "description", "email",
|
||||||
|
"links", "masters", "name", "pool_id", "project_id", "serial",
|
||||||
|
"status", "ttl", "type", "updated_at", "id"] |
|
||||||
|
difference(zone.zones.0.keys()) | length == 0'
|
||||||
|
|
||||||
- name: Drop created dns zone
|
- name: Drop created dns zone
|
||||||
openstack.cloud.dns_zone:
|
openstack.cloud.dns_zone:
|
||||||
cloud: "{{ cloud }}"
|
cloud: "{{ cloud }}"
|
||||||
|
@ -161,12 +161,8 @@ class DnsZoneInfoModule(OpenStackModule):
|
|||||||
if ttl:
|
if ttl:
|
||||||
kwargs['ttl'] = ttl
|
kwargs['ttl'] = ttl
|
||||||
|
|
||||||
data = []
|
data = [zone.to_dict(computed=False) for zone in
|
||||||
|
self.conn.dns.zones(**kwargs)]
|
||||||
for raw in self.conn.dns.zones(**kwargs):
|
|
||||||
dt = raw.to_dict()
|
|
||||||
dt.pop('location')
|
|
||||||
data.append(dt)
|
|
||||||
|
|
||||||
self.exit_json(zones=data, changed=False)
|
self.exit_json(zones=data, changed=False)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user