cloudstack: fix cs_instance can not find iso and disk offering if domain is set.

This does only affect root admins.
reviewable/pr18780/r1
Rene Moser 10 years ago
parent 552c4ef53a
commit b031e818b1

@ -388,6 +388,7 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
args['domainid'] = self.get_domain('id')
args['projectid'] = self.get_project('id')
args['zoneid'] = self.get_zone('id')
args['isrecursive'] = True
if template:
if self.template:
@ -421,10 +422,7 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
if not disk_offering:
return None
args = {}
args['domainid'] = self.get_domain('id')
disk_offerings = self.cs.listDiskOfferings(**args)
disk_offerings = self.cs.listDiskOfferings()
if disk_offerings:
for d in disk_offerings['diskoffering']:
if disk_offering in [ d['displaytext'], d['name'], d['id'] ]:

Loading…
Cancel
Save