Class: Dopv::Infrastructure::Vsphere
- Extended by:
- Forwardable
- Defined in:
- lib/dopv/infrastructure/providers/vsphere.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(node_config, data_disks_db, wait_params = {}) ⇒ Vsphere
constructor
A new instance of Vsphere.
Methods inherited from Base
bootstrap_node, #bootstrap_node, destroy_node, #destroy_node, refresh_node, #refresh_node
Constructor Details
#initialize(node_config, data_disks_db, wait_params = {}) ⇒ Vsphere
Returns a new instance of Vsphere.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/dopv/infrastructure/providers/vsphere.rb', line 14 def initialize(node_config, data_disks_db, wait_params={}) super(node_config, data_disks_db) @compute_connection_opts = { :provider => 'vsphere', :vsphere_username => provider_username, :vsphere_password => provider_password, :vsphere_server => provider_host, :vsphere_port => provider_port, :vsphere_expected_pubkey_hash => provider_pubkey_hash } @node_creation_opts = { 'name' => nodename, 'datacenter' => datacenter.name, 'template_path' => image, 'dest_folder' => dest_folder || '', 'numCPUs' => cores, 'memoryMB' => memory.mebibytes.to_i } if infrastructure_properties.cluster @node_creation_opts = { 'resource_pool' => [infrastructure_properties.cluster, ''] }.merge(@node_creation_opts) end @wait_params = { :maxtime => 300, :delay => 10 }.merge(wait_params) end |