Class: Fog::Compute::VcloudDirector::Vms
- Inherits:
-
Collection
- Object
- Fog::Collection
- Collection
- Fog::Compute::VcloudDirector::Vms
show all
- Defined in:
- lib/fog/vcloud_director/models/compute/vms.rb
Instance Method Summary
collapse
Methods inherited from Collection
#all, #get, #get_by_name, #get_everyone, #index
Instance Method Details
12
13
14
15
16
|
# File 'lib/fog/vcloud_director/models/compute/vms.rb', line 12
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
18
19
20
21
22
|
# File 'lib/fog/vcloud_director/models/compute/vms.rb', line 18
def get_single_vm(vm_id)
item = service.get_vm(vm_id).body
return nil unless item
new(item[:vm])
end
|