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

F #3293 Read driver action on attach_disk using STDIN for vcenter dri… (#3293)

* F #3293 Read driver action on attach_disk using STDIN for vcenter drivers

* Update attach_disk
This commit is contained in:
sergiojvg 2019-04-29 10:53:35 -05:00 committed by Tino Vázquez
parent 776d5629dd
commit 8440eac802

View File

@ -30,13 +30,13 @@ $LOAD_PATH << File.dirname(__FILE__)
require 'vcenter_driver'
vm_ref = ARGV[0]
drv_action_enc = ARGV[4]
drv_action = OpenNebula::XMLElement.new
drv_action.initialize_xml(Base64.decode64(drv_action_enc),
'VMM_DRIVER_ACTION_DATA')
host_id = drv_action['VM/HISTORY_RECORDS/HISTORY/HID']
# Read from STDIN instead of ARGV[4] to avoid broken pipe error
drv_action.initialize_xml(Base64.decode64(STDIN.read), 'VMM_DRIVER_ACTION_DATA')
host_id = drv_action['/VMM_DRIVER_ACTION_DATA/VM/HISTORY_RECORDS/HISTORY/HID']
vc_cluster_name = drv_action['/VMM_DRIVER_ACTION_DATA/HOST']