mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #949 from bvox/openstack_attributes
Openstack attributes
This commit is contained in:
commit
5fd4f95ab1
3 changed files with 20 additions and 5 deletions
|
@ -28,7 +28,14 @@ module Fog
|
|||
attribute :tenant_id
|
||||
attribute :user_id
|
||||
attribute :key_name
|
||||
|
||||
attribute :fault
|
||||
attribute :os_dcf_disk_config, :aliases => 'OS-DCF:diskConfig'
|
||||
attribute :os_ext_srv_attr_host, :aliases => 'OS-EXT-SRV-ATTR:host'
|
||||
attribute :os_ext_srv_attr_hypervisor_hostname, :aliases => 'OS-EXT-SRV-ATTR:hypervisor_hostname'
|
||||
attribute :os_ext_srv_attr_instance_name, :aliases => 'OS-EXT-SRV-ATTR:instance_name'
|
||||
attribute :os_ext_sts_power_state, :aliases => 'OS-EXT-STS:power_state'
|
||||
attribute :os_ext_sts_task_state, :aliases => 'OS-EXT-STS:task_state'
|
||||
attribute :os_ext_sts_vm_state, :aliases => 'OS-EXT-STS:vm_state'
|
||||
|
||||
attr_reader :password
|
||||
attr_writer :private_key, :private_key_path, :public_key, :public_key_path, :username, :image_ref, :flavor_ref
|
||||
|
|
|
@ -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…
Add table
Reference in a new issue