Class: Fog::Hyperv::VMCollection
Instance Attribute Summary collapse
#cluster, #computer
Class Method Summary
collapse
Instance Method Summary
collapse
requires_computer
Methods inherited from Collection
#all, #create, #get, get_method, requires, requires?
Instance Attribute Details
#vm ⇒ Object
Returns the value of attribute vm.
101
102
103
|
# File 'lib/fog/collection.rb', line 101
def vm
@vm
end
|
Class Method Details
.match_on(attr = nil) ⇒ Object
93
94
95
|
# File 'lib/fog/collection.rb', line 93
def self.match_on(attr = nil)
@match_on ||= attr
end
|
.requires_vm ⇒ Object
97
98
99
|
# File 'lib/fog/collection.rb', line 97
def self.requires_vm
requires << :vm
end
|
Instance Method Details
#inspect ⇒ Object
111
112
113
114
|
# File 'lib/fog/collection.rb', line 111
def inspect
to_s
end
|
#new(attributes = {}) ⇒ Object
103
104
105
106
107
108
109
|
# File 'lib/fog/collection.rb', line 103
def new(attributes = {})
object = super
object.vm_id ||= vm.id if vm && object.respond_to?(:vm_id)
object.vm_name ||= vm.name if vm && object.respond_to?(:vm_name)
object
end
|