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')
args = {}
args['listall'] = True
args['account'] = self.get_account(key='name')
args['domainid'] = self.get_domain(key='id')
projects = self.cs.listProjects(**args)
if projects:
for p in projects['project']:
if project in [ p['name'], p['id']]:
if project.lower() in [ p['name'].lower(), p['id']]:
self.project = p
break
return self.project

Loading…
Cancel
Save