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:
parent
745bcb73ae
commit
e832d7fd7a
@ -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
|
||||
|
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user