Class: Bosh::Deployer::InstanceManager::Vsphere

Inherits:
Bosh::Deployer::InstanceManager show all
Defined in:
lib/deployer/instance_manager/vsphere.rb

Constant Summary

Constants included from Helpers

Helpers::DEPLOYMENTS_FILE

Instance Attribute Summary

Attributes inherited from Bosh::Deployer::InstanceManager

#renderer, #state

Instance Method Summary collapse

Methods inherited from Bosh::Deployer::InstanceManager

#agent, #apply, #attach_disk, #attach_missing_disk, #check_dependencies, #check_persistent_disk, #cloud, #create, create, #create_deployment, #create_disk, #create_stemcell, #create_vm, #delete_deployment, #delete_disk, #destroy, #detach_disk, #discover_bosh_ip, #disk_info, #disk_size, #exists?, #initialize, #instance_model, #logger, #migrate_disk, #mount_disk, #persistent_disk_changed?, #service_ip, #start, #step, #stop, #unmount_disk, #update, #update_deployment, #update_persistent_disk, #with_lifecycle

Methods included from Helpers

#cloud_plugin, #dig_hash, #is_tgz?

Constructor Details

This class inherits a constructor from Bosh::Deployer::InstanceManager

Instance Method Details

#disk_modelObject



8
9
10
11
12
13
14
# File 'lib/deployer/instance_manager/vsphere.rb', line 8

def disk_model
  if @disk_model.nil?
    require "cloud/vsphere"
    @disk_model = VSphereCloud::Models::Disk
  end
  @disk_model
end

#update_spec(spec) ⇒ Object

TODO extract



17
18
19
20
21
22
23
24
25
# File 'lib/deployer/instance_manager/vsphere.rb', line 17

def update_spec(spec)
  properties = spec.properties

  properties["vcenter"] =
    Config.spec_properties["vcenter"] ||
    Config.cloud_options["properties"]["vcenters"].first.dup

  properties["vcenter"]["address"] ||= properties["vcenter"]["host"]
end