mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
cleaned up logic for multiple security groups for vpc instances with manually specified network interfaces
This commit is contained in:
parent
e4d4b0e685
commit
6a911f41e6
1 changed files with 1 additions and 3 deletions
|
@ -178,11 +178,9 @@ module Fog
|
||||||
options['NetworkInterface.0.AssociatePublicIpAddress'] = associate_public_ip
|
options['NetworkInterface.0.AssociatePublicIpAddress'] = associate_public_ip
|
||||||
options['NetworkInterface.0.SubnetId'] = options['SubnetId']
|
options['NetworkInterface.0.SubnetId'] = options['SubnetId']
|
||||||
options.delete('SubnetId')
|
options.delete('SubnetId')
|
||||||
grp_num = 0
|
|
||||||
if options['SecurityGroupId'].kind_of?(Array)
|
if options['SecurityGroupId'].kind_of?(Array)
|
||||||
options['SecurityGroupId'].each {|id|
|
options['SecurityGroupId'].each {|id|
|
||||||
options["NetworkInterface.0.SecurityGroupId.#{grp_num}"] = id
|
options["NetworkInterface.0.SecurityGroupId.#{options['SecurityGroupId'].index(id)}"] = id
|
||||||
grp_num += 1
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
options["NetworkInterface.0.SecurityGroupId.0"] = options['SecurityGroupId']
|
options["NetworkInterface.0.SecurityGroupId.0"] = options['SecurityGroupId']
|
||||||
|
|
Loading…
Reference in a new issue