1
0
Fork 0
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:
Sergio Rubio 2013-02-26 17:14:33 +01:00
parent 8476de7f52
commit 596e54fec2

View file

@ -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],