Allow munch results in server_info module
Certain branches of the openstacksdk are explicitly converting `Resource` objects to munch objects to add additional virtual properties. This means that the module may receive `Resource` or a `Munch` object. Add a small check. Change-Id: I413877128d1e2b68d7f39420d19e2560d3d9a99e
This commit is contained in:
parent
69801f268f
commit
23290a568b
@ -377,7 +377,9 @@ class ServerInfoModule(OpenStackModule):
|
||||
kwargs['name_or_id'] = self.params['name']
|
||||
|
||||
self.exit(changed=False,
|
||||
servers=[server.to_dict(computed=False) for server in
|
||||
servers=[server.to_dict(computed=False)
|
||||
if hasattr(server, "to_dict") else server
|
||||
for server in
|
||||
self.conn.search_servers(**kwargs)])
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user