Commit e62fbf5f by Rene Moser

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

parent 08e79159
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment