Class: Bosh::Deployer::InstanceManager::Vcloud

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

Constant Summary

Constants inherited from Bosh::Deployer::InstanceManager

CONNECTION_EXCEPTIONS

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_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_model, #exists?, #initialize, #instance_model, #logger, #migrate_disk, #mount_disk, #service_ip, #start, #step, #stop, #unmount_disk, #update, #update_deployment, #update_persistent_disk, #update_vm_metadata, #with_lifecycle

Methods included from Helpers

#close_ssh_sessions, #cloud_plugin, #dig_hash, #is_tgz?, #process_exists?, #socket_readable?, #strip_relative_path

Constructor Details

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

Instance Method Details

#check_dependenciesObject



30
31
32
33
34
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 30

def check_dependencies
  if Bosh::Common.which(%w[genisoimage mkisofs]).nil?
    err("either of 'genisoimage' or 'mkisofs' commands must be present")
  end
end

#disk_size(cid) ⇒ Integer

Returns size in MiB.

Returns:

  • size in MiB



22
23
24
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 22

def disk_size(cid)
  cloud.get_disk_size_mb(cid)
end

#persistent_disk_changed?Boolean

Returns:



26
27
28
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 26

def persistent_disk_changed?
  Config.resources['persistent_disk'] != disk_size(state.disk_cid)
end

#remote_tunnel(port) ⇒ Object



6
7
8
9
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 6

def remote_tunnel(port)
  # VCloud / vsphere does not use bosh-registry so no remote_tunnel
  # to bosh-registry is required
end

#update_spec(spec) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 11

def update_spec(spec)
  properties = spec.properties

  properties['vcd'] =
    Config.spec_properties['vcd'] ||
    Config.cloud_options['properties']['vcds'].first.dup

  properties['vcd']['address'] ||= properties['vcd']['url']
end