cs_vpc_offering: listVPCOffering API returns any matching names (#37783) (#37832)

(cherry picked from commit 270e799cb6)
This commit is contained in:
René Moser 2018-03-31 09:39:29 +02:00 committed by GitHub
parent 3ac91f7e28
commit 46cf6ed677
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,7 +149,9 @@ class AnsibleCloudStackVPCOffering(AnsibleCloudStack):
vo = self.query_api('listVPCOfferings', **args)
if vo:
self.vpc_offering = vo['vpcoffering'][0]
for vpc_offer in vo['vpcoffering']:
if args['name'] == vpc_offer['name']:
self.vpc_offering = vpc_offer
return self.vpc_offering