Class: Fog::Compute::VcloudDirector::Vms
Instance Method Summary
collapse
#find_by_query
Methods inherited from Collection
#all, #get, #get_by_name, #get_everyone, #index
Instance Method Details
15
16
17
18
19
|
# File 'lib/fog/vcloud_director/models/compute/vms.rb', line 15
def get_by_metadata(key, value)
data = service.get_vms_by_metadata(key, value).body
items = data[:vm_records]
load(items)
end
|
#get_single_vm(vm_id) ⇒ Object
21
22
23
24
25
|
# File 'lib/fog/vcloud_director/models/compute/vms.rb', line 21
def get_single_vm(vm_id)
item = service.get_vm(vm_id).body
return nil unless item
new(item[:vm])
end
|
#query_type ⇒ Object
27
28
29
|
# File 'lib/fog/vcloud_director/models/compute/vms.rb', line 27
def query_type
"vm"
end
|