Class: Rancher::Api::Machine
- Inherits:
-
Object
- Object
- Rancher::Api::Machine
show all
- Includes:
- Her::Model, Helpers::Model
- Defined in:
- lib/rancher/api/models/machine.rb,
lib/rancher/api/models/machine/driver_config.rb
Defined Under Namespace
Classes: DriverConfig
Constant Summary
collapse
- DIGITAL_OCEAN =
'digitalocean'.freeze
- VMWARE_VSPHERE =
'vmwarevsphere'.freeze
Helpers::Model::TIMEOUT_LIMIT
Class Method Summary
collapse
Instance Method Summary
collapse
#handle_response, #reload, #run, #self_url, #wait_for_state
Class Method Details
.active ⇒ Object
25
26
27
|
# File 'lib/rancher/api/models/machine.rb', line 25
def active
where(state: 'active')
end
|
.transitioning ⇒ Object
21
22
23
|
# File 'lib/rancher/api/models/machine.rb', line 21
def transitioning
all.select { |m| m.transitioning.eql?('yes') }
end
|
Instance Method Details
#driver_config=(dc) ⇒ Object
37
38
39
40
41
42
|
# File 'lib/rancher/api/models/machine.rb', line 37
def driver_config=(dc)
case driver
when DIGITAL_OCEAN, VMWARE_VSPHERE
attributes["#{driver}Config"] = dc.attributes
end
end
|