Merge pull request #592 from resmo/for_ansible

cloudstack: fix CloudStackException in cs_project
reviewable/pr18780/r1
Brian Coca 10 years ago
commit 27b223130c

@ -160,14 +160,13 @@ class AnsibleCloudStackProject(AnsibleCloudStack):
project = self.module.params.get('name') project = self.module.params.get('name')
args = {} args = {}
args['listall'] = True
args['account'] = self.get_account(key='name') args['account'] = self.get_account(key='name')
args['domainid'] = self.get_domain(key='id') args['domainid'] = self.get_domain(key='id')
projects = self.cs.listProjects(**args) projects = self.cs.listProjects(**args)
if projects: if projects:
for p in projects['project']: for p in projects['project']:
if project in [ p['name'], p['id']]: if project.lower() in [ p['name'].lower(), p['id']]:
self.project = p self.project = p
break break
return self.project return self.project

Loading…
Cancel
Save