mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
openstack: extended list_servers and list_server_detail to allow all_tenants param
This commit is contained in:
parent
1afc40bbe6
commit
86b3746597
2 changed files with 12 additions and 4 deletions
|
@ -3,11 +3,15 @@ module Fog
|
|||
class OpenStack
|
||||
class Real
|
||||
|
||||
def list_servers
|
||||
def list_servers(options = {})
|
||||
params = Hash.new
|
||||
params['all_tenants'] = 'True' if options[:all_tenants]
|
||||
|
||||
request(
|
||||
:expects => [200, 203],
|
||||
:method => 'GET',
|
||||
:path => 'servers.json'
|
||||
:path => 'servers.json',
|
||||
:query => params
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -3,11 +3,15 @@ module Fog
|
|||
class OpenStack
|
||||
class Real
|
||||
|
||||
def list_servers_detail
|
||||
def list_servers_detail(options = {})
|
||||
params = Hash.new
|
||||
params['all_tenants'] = 'True' if options[:all_tenants]
|
||||
|
||||
request(
|
||||
:expects => [200, 203],
|
||||
:method => 'GET',
|
||||
:path => 'servers/detail.json'
|
||||
:path => 'servers/detail.json',
|
||||
:query => params
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue