1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

change to OS type request on failure

This commit is contained in:
Mike Hagedorn 2014-08-11 16:07:49 -04:00
parent 3753b5f1a1
commit 1911883f82

View file

@ -21,12 +21,25 @@ module Fog
# * 'admin_state_up'<~Boolean>: - true or false
# * 'shared'<~Boolean>: - true or false
def list_networks(options = {})
request(
:expects => 200,
:method => 'GET',
:path => 'networks',
:query => options
)
begin
request(
:expects => 200,
:method => 'GET',
:path => 'networks',
:query => options
)
rescue Fog::HP::Network::NotFound
begin
request(
:expects => 200,
:method => 'GET',
:path => 'os-networks',
:query => options
)
rescue Exception => e
throw e
end
end
end
end