mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[openstack|network] create_router request updates
- Filter out invalid options
This commit is contained in:
parent
8476de7f52
commit
596e54fec2
1 changed files with 13 additions and 0 deletions
|
@ -10,6 +10,19 @@ module Fog
|
|||
}
|
||||
}
|
||||
|
||||
vanilla_options = [
|
||||
:admin_state_up,
|
||||
:tenant_id,
|
||||
:network_id,
|
||||
:external_gateway_info,
|
||||
:status,
|
||||
:subnet_id
|
||||
]
|
||||
|
||||
vanilla_options.reject{ |o| options[o].nil? }.each do |key|
|
||||
data['router'][key] = options[key]
|
||||
end
|
||||
|
||||
request(
|
||||
:body => Fog::JSON.encode(data),
|
||||
:expects => [201],
|
||||
|
|
Loading…
Add table
Reference in a new issue