1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #2911: Fix polling for vCenter VMs

This commit is contained in:
Tino Vazquez 2014-09-23 17:03:51 +02:00
parent 745bcb73ae
commit e832d7fd7a
2 changed files with 6 additions and 2 deletions

View File

@ -33,8 +33,11 @@ require 'vcenter_driver'
deploy_id = ARGV[0]
host = ARGV[1]
host_id = VCenterDriver::VCenterVm.translate_hostname(host)
host_id = VCenterDriver::VIClient.translate_hostname(host)
vi_client = VCenterDriver::VIClient.new host_id
vm = connection.find_vm_template(deploy_id)
vm = vi_client.find_vm_template(deploy_id)
vm = VCenterDriver::VCenterVm.new(vi_client, vm)
vm.monitor
puts vm.info

View File

@ -401,6 +401,7 @@ class VCenterVm
############################################################################
# Creates a new VIVm using a RbVmomi::VirtualMachine object
# @param client [VCenterClient] client to connect to vCenter
# @param vm_vi [RbVmomi::VirtualMachine] it will be used if not nil
########################################################################
def initialize(client, vm_vi )