lib/rancher/api/models/machine.rb in rancher-api-0.3.5 vs lib/rancher/api/models/machine.rb in rancher-api-0.3.6
- old
+ new
@@ -2,10 +2,11 @@
module Rancher
module Api
class Machine
DIGITAL_OCEAN = 'digitalocean'
+ VMWARE_VSPHERE = 'vmwarevsphere'
include Her::Model
attributes :name, :state, :amazonec2Config, :azureConfig, :description,
:digitaloceanConfig, :driver, :exoscaleConfig, :externalId,
@@ -15,18 +16,18 @@
has_many :hosts
def driver_config
case driver
- when DIGITAL_OCEAN
- DriverConfig.new(attributes["#{DIGITAL_OCEAN}Config"])
+ when DIGITAL_OCEAN, VMWARE_VSPHERE
+ DriverConfig.new(attributes["#{driver}Config"])
end
end
def driver_config=(dc)
case driver
- when DIGITAL_OCEAN
- attributes["#{DIGITAL_OCEAN}Config"] = dc.attributes
+ when DIGITAL_OCEAN, VMWARE_VSPHERE
+ attributes["#{driver}Config"] = dc.attributes
end
end
end
end
end