Sandro Bonazzola has uploaded a new change for review.

Change subject: vdsm: use downloadImage instead of uploadVolume
......................................................................

vdsm: use downloadImage instead of uploadVolume

uploadVolume has been removed from VDSM API.
Using downloadImage with http method, actually
passing a file:// URL.

Change-Id: Ieb645d2a6d5bab6e6012baa8ece0b8e52ba54a4c
Bug-Url: https://bugzilla.redhat.com/1034777
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
1 file changed, 13 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup 
refs/changes/23/21923/1

diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py 
b/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
index 3cad02f..1a3a2d6 100644
--- a/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
+++ b/src/plugins/ovirt-hosted-engine-setup/vm/boot_disk.py
@@ -98,20 +98,21 @@
             )
         )
         serv = self._parent.environment[ohostedcons.VDSMEnv.VDS_CLI]
-        status, message = serv.uploadVolume([
-            self._parent.environment[ohostedcons.StorageEnv.SD_UUID],
+        image = serv.s.uploadImage(
+            {
+                'method': 'http',
+                'url': 'file://{path}'.format(
+                    path=self._dst,
+                ),
+            },
             self._parent.environment[ohostedcons.StorageEnv.SP_UUID],
+            self._parent.environment[ohostedcons.StorageEnv.SD_UUID],
             self._parent.environment[ohostedcons.StorageEnv.IMG_UUID],
-            self._parent.environment[ohostedcons.StorageEnv.VOL_UUID],
-            self._dst,
-            str(
-                self._parent.environment[
-                    ohostedcons.StorageEnv.IMAGE_SIZE_GB
-                ]
-            ),
-        ])
-        if status != 0:
-            raise RuntimeError(message)
+            self._parent.environment[ohostedcons.StorageEnv.VOL_UUID]
+        )
+        self.logger.debug(image)
+        if image['status']['code'] != 0:
+            raise RuntimeError(image['status']['message'])
         self._parent.logger.info(_('Image successfully imported from OVF'))
 
 


-- 
To view, visit http://gerrit.ovirt.org/21923
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb645d2a6d5bab6e6012baa8ece0b8e52ba54a4c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to