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
1 changed files with 19 additions and 6 deletions

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