Skip to content

Commit

Permalink
ACL list can be empty, thereby response being empty, not even the "ne…
Browse files Browse the repository at this point in the history
…tworkacl" entry
  • Loading branch information
bheuvel committed Aug 16, 2016
1 parent 7d8202c commit 54b9f07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/vagrant-cloudstack/action/run_instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,9 @@ def create_firewall_rule(rule)
aclid: network.details['aclid']
})
number = 0
resp["listnetworkaclsresponse"]["networkacl"].each{ |ace| number = [number, ace["number"]].max }
if resp["listnetworkaclsresponse"]["count"] > 0
resp["listnetworkaclsresponse"]["networkacl"].each{ |ace| number = [number, ace["number"]].max }
end
number = number+1

command_string = 'createNetworkACL'
Expand Down

0 comments on commit 54b9f07

Please sign in to comment.