Class: Fog::Compute::HuaweiCloud::Hosts
Instance Attribute Summary
#response
Instance Method Summary
collapse
#destroy, #find_by_id, #load_response, #summary
Instance Method Details
#all(options = {}) ⇒ Object
10
11
12
13
|
# File 'lib/fog/compute/huaweicloud/models/hosts.rb', line 10
def all(options = {})
data = service.list_hosts(options)
load_response(data, 'hosts')
end
|
#get(host_name) ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/fog/compute/huaweicloud/models/hosts.rb', line 15
def get(host_name)
if host = service.get_host_details(host_name).body['host']
new('host_name' => host_name,
'details' => host)
end
rescue Fog::Compute::HuaweiCloud::NotFound
nil
end
|