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:
parent
3753b5f1a1
commit
1911883f82
1 changed files with 19 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue