Class: Fog::Compute::Vsphere::Customfields

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/vsphere/models/compute/customfields.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#vmObject

Returns the value of attribute vm.



12
13
14
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 12

def vm
  @vm
end

Instance Method Details

#all(filters = {}) ⇒ Object



14
15
16
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 14

def all(filters = {})
  load service.list_customfields()
end

#get(key) ⇒ Object



18
19
20
21
22
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 18

def get(key)
  load(service.list_customfields()).find do | cv |
    cv.key == ((key.is_a? String) ? key.to_i : key)
  end
end