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


10
11
12
# File 'lib/fog/vsphere/models/compute/customfields.rb', line 10

def vm
  @vm
end

Instance Method Details

#all(filters = {}) ⇒ Object


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

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

#get(key) ⇒ Object


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

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