1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

cloudstack: add get_result() in utils to return common results

This commit is contained in:
Rene Moser 2015-08-11 18:03:50 +02:00
parent 08e791595b
commit e62fbf5fba

View file

@ -366,3 +366,18 @@ class AnsibleCloudStack:
break
time.sleep(2)
return job
def get_result(self, resource):
if resource:
if 'id' in resource:
self.result['id'] = resource['id']
if 'project' in resource:
self.result['project'] = resource['project']
if 'domain' in resource:
self.result['domain'] = resource['domain']
if 'account' in resource:
self.result['account'] = resource['account']
if 'zonename' in resource:
self.result['zone'] = resource['zonename']
return self.result