1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

fixed vcenter driver absolute paths

This commit is contained in:
sergio semedi 2018-07-23 10:57:25 +02:00 committed by Tino Vázquez
parent 974f2e4494
commit cc71ae1245
4 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ drv_action_enc = ARGV[4]
drv_action = OpenNebula::XMLElement.new
drv_action.initialize_xml(Base64.decode64(drv_action_enc), 'VMM_DRIVER_ACTION_DATA')
vc_cluster_name = drv_action['VMM_DRIVER_ACTION_DATA/HOST']
vc_cluster_name = drv_action['/VMM_DRIVER_ACTION_DATA/HOST']
host = VCenterDriver::VIHelper.find_by_name(OpenNebula::HostPool, vc_cluster_name)
host_id = host['ID']

View File

@ -55,7 +55,7 @@ begin
# required vcenter objects
vc_vm = VCenterDriver::VirtualMachine.new_without_id(vi_client, vm['/VM/DEPLOY_ID'])
ccr_ref = dst_host['/HOST/TEMPLATE/VCENTER_CCR_REF']
esx_host = dst_host['HOST/TEMPLATE/HOST/HOSTNAME']
esx_host = dst_host['/HOST/TEMPLATE/HOST/HOSTNAME']
vc_host = VCenterDriver::ClusterComputeResource.new_from_ref(ccr_ref, vi_client).item
config = { :cluster => vc_host }
@ -70,4 +70,4 @@ rescue StandardError => e
exit(-1)
ensure
vi_client.close_connection if vi_client
end
end

View File

@ -40,7 +40,7 @@ drv_action = OpenNebula::XMLElement.new
drv_action.initialize_xml(Base64.decode64(drv_action_enc),
'VMM_DRIVER_ACTION_DATA')
lcm_state = drv_action['VMM_DRIVER_ACTION_DATA/VM/LCM_STATE']
lcm_state = drv_action['/VMM_DRIVER_ACTION_DATA/VM/LCM_STATE']
check_valid(lcm_state, 'lcm_state')
lcm_state_str = OpenNebula::VirtualMachine::LCM_STATE[lcm_state.to_i]

View File

@ -41,7 +41,7 @@ drv_action = OpenNebula::XMLElement.new
drv_action.initialize_xml(Base64.decode64(drv_action_enc),
'VMM_DRIVER_ACTION_DATA')
lcm_state = drv_action['VMM_DRIVER_ACTION_DATA/VM/LCM_STATE']
lcm_state = drv_action['/VMM_DRIVER_ACTION_DATA/VM/LCM_STATE']
check_valid(lcm_state, 'lcm_state')
lcm_state_str = OpenNebula::VirtualMachine::LCM_STATE[lcm_state.to_i]