Skip to content

Commit

Permalink
Merge cab7ed8 into cf3ca9e
Browse files Browse the repository at this point in the history
  • Loading branch information
BraunTom committed Apr 26, 2019
2 parents cf3ca9e + cab7ed8 commit 69fbb4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/api/v_sphere/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ def initialize_settings
end

def connect
initialize_settings
return unless configured?
create_connection if @vim.nil?
end

def create_connection
@vim = RbVmomi::VIM.connect(host: @server_ip, user: @server_user, password: @server_password, insecure: true)
@dc = @vim.serviceInstance.find_datacenter('Datacenter') || raise('datacenter not found')
@vm_folder = VSphere::Folder.new(@dc.vmFolder)
Expand Down

0 comments on commit 69fbb4d

Please sign in to comment.