module Rancher::Api::Helpers::Machine

Constants

DIGITAL_OCEAN
VMWARE_VSPHERE

Public Class Methods

included(base) click to toggle source
# File lib/rancher/api/helpers/machine.rb, line 12
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

driver_config() click to toggle source
# File lib/rancher/api/helpers/machine.rb, line 26
def driver_config
  case driver
  when DIGITAL_OCEAN, VMWARE_VSPHERE
    DriverConfig.new(attributes["#{driver}Config"])
  end
end
driver_config=(dc) click to toggle source
# File lib/rancher/api/helpers/machine.rb, line 33
def driver_config=(dc)
  case driver
  when DIGITAL_OCEAN, VMWARE_VSPHERE
    attributes["#{driver}Config"] = dc.attributes
  end
end