Class: Bosh::Deployer::InstanceManager::Vcloud
- Inherits:
-
Object
- Object
- Bosh::Deployer::InstanceManager::Vcloud
- Defined in:
- lib/bosh/deployer/instance_manager/vcloud.rb
Defined Under Namespace
Classes: FakeRegistry
Instance Method Summary collapse
- #check_dependencies ⇒ Object
- #discover_bosh_ip ⇒ Object
- #disk_model ⇒ Object
-
#disk_size(cid) ⇒ Integer
Size in MiB.
-
#initialize(instance_manager, logger) ⇒ Vcloud
constructor
A new instance of Vcloud.
- #persistent_disk_changed? ⇒ Boolean
- #remote_tunnel ⇒ Object
- #service_ip ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #update_spec(spec) ⇒ Object
Constructor Details
#initialize(instance_manager, logger) ⇒ Vcloud
Returns a new instance of Vcloud.
6 7 8 9 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 6 def initialize(instance_manager, logger) @instance_manager = instance_manager @logger = logger end |
Instance Method Details
#check_dependencies ⇒ Object
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 |
#discover_bosh_ip ⇒ Object
42 43 44 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 42 def discover_bosh_ip instance_manager.bosh_ip end |
#disk_model ⇒ Object
16 17 18 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 16 def disk_model nil end |
#disk_size(cid) ⇒ Integer
Returns size in MiB.
51 52 53 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 51 def disk_size(cid) instance_manager.cloud.get_disk_size_mb(cid) end |
#persistent_disk_changed? ⇒ Boolean
55 56 57 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 55 def persistent_disk_changed? Config.resources['persistent_disk'] != disk_size(instance_manager.state.disk_cid) end |
#remote_tunnel ⇒ Object
11 12 13 14 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 11 def remote_tunnel # VCloud / vsphere does not use bosh-registry so no remote_tunnel # to bosh-registry is required end |
#service_ip ⇒ Object
46 47 48 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 46 def service_ip instance_manager.bosh_ip end |
#start ⇒ Object
36 37 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 36 def start end |
#stop ⇒ Object
39 40 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 39 def stop end |
#update_spec(spec) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/bosh/deployer/instance_manager/vcloud.rb', line 20 def update_spec(spec) properties = spec.properties properties['vcd'] = Config.spec_properties['vcd'] || Config.['properties']['vcds'].first.dup properties['vcd']['address'] ||= properties['vcd']['url'] end |