Skip to content

Commit

Permalink
F #3293 Read driver action on attach_disk using STDIN for vcenter dri… (
Browse files Browse the repository at this point in the history
#3293)

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

* Update attach_disk

(cherry picked from commit 8440eac)
  • Loading branch information
sergiojvg authored and tinova committed Apr 29, 2019
1 parent b5722c9 commit b1b1501
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vmm_mad/remotes/vcenter/attach_disk
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down

0 comments on commit b1b1501

Please sign in to comment.