Merge pull request #592 from resmo/for_ansible
cloudstack: fix CloudStackException in cs_project
This commit is contained in:
commit
27b223130c
1 changed files with 1 additions and 2 deletions
|
@ -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…
Reference in a new issue