cs_vpc_offering: listVPCOffering API returns any matching names (#37783)
* fix listVPCOffering API method returns any matching names * fix build_ci no-underscore-variable * clearer variable name * making it simpler
This commit is contained in:
parent
56d0721bd9
commit
270e799cb6
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue