mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #2649 from tenforward/openstack_nics_symbol
[openstack|compute] Allow to use Symbol when specifying the hash of NICs
This commit is contained in:
commit
a16a86aa5d
1 changed files with 3 additions and 3 deletions
|
@ -47,9 +47,9 @@ module Fog
|
|||
if options['nics']
|
||||
data['server']['networks'] =
|
||||
Array(options['nics']).map do |nic|
|
||||
neti = { 'uuid' => nic['net_id'] }
|
||||
neti['fixed_ip'] = nic['v4_fixed_ip'] unless nic['v4_fixed_ip'].nil?
|
||||
neti['port'] = nic['port_id'] unless nic['port_id'].nil?
|
||||
neti = { 'uuid' => (nic['net_id'] || nic[:net_id]) }
|
||||
neti['fixed_ip'] = (nic['v4_fixed_ip'] || nic[:v4_fixed_ip]) unless (nic['v4_fixed_ip'] || nic[:v4_fixed_ip]).nil?
|
||||
neti['port'] = (nic['port_id'] || nic[:port_id]) unless (nic['port_id'] || nic[:port_id]).nil?
|
||||
neti
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue