Skip to content

Commit

Permalink
cs_vpc_offering: listVPCOffering API returns any matching names (ansi…
Browse files Browse the repository at this point in the history
…ble#37783)

* fix listVPCOffering API method returns any matching names

* fix build_ci no-underscore-variable

* clearer variable name

* making it simpler
  • Loading branch information
dpassante authored and ansibot committed Mar 23, 2018
1 parent 56d0721 commit 270e799
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ansible/modules/cloud/cloudstack/cs_vpc_offering.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def get_vpc_offering(self):
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

Expand Down

0 comments on commit 270e799

Please sign in to comment.