lib/vmesh/vsphere.rb in vmesh-0.1.3 vs lib/vmesh/vsphere.rb in vmesh-0.1.4

- old
+ new

@@ -4,12 +4,20 @@ # VM Manager Class to hand all things VSphere module Vmesh class VSphere attr_accessor :vim, :options def initialize(connection_options) - Vmesh::logger.debug "Opening connection to #{connection_options['host']}" - @vim = RbVmomi::VIM.connect connection_options - @options = connection_options + Vmesh::logger.debug "Opening connection to #{connection_options['host']} #{connection_options.inspect}" + opts = { + :host => connection_options[:host], + :user => connection_options[:user], + :password => connection_options[:password], + :datacenter => connection_options[:datacenter], + :host => connection_options[:host], + :insecure => connection_options[:insecure], + } + @vim = RbVmomi::VIM.connect opts + @options = opts end # Can we search through the datacenters for a machine? # Should we get the machine from the datacenters? def get_machine(machine_name, datacenter)