Blame SOURCES/0067-v2v-rhv-upload-plugin-Optimize-only-direct-upload.patch

97ae69
From f1e11ab12c7e51f648a5efe056cf4ba9be4d9afa Mon Sep 17 00:00:00 2001
97ae69
From: Nir Soffer <nirsof@gmail.com>
97ae69
Date: Sat, 30 Jun 2018 01:39:03 +0300
97ae69
Subject: [PATCH] v2v: rhv-upload-plugin: Optimize only direct upload
97ae69
97ae69
The optimization to start the transfer on the local host makes sense
97ae69
only when using the rhv-direct=true option. When using a proxy, let the
97ae69
engine choose a host.
97ae69
97ae69
(cherry picked from commit 891b5a0ec0f320acec0f06b64159eaf3dfbbfeaf)
97ae69
---
97ae69
 v2v/rhv-upload-plugin.py | 4 ++--
97ae69
 1 file changed, 2 insertions(+), 2 deletions(-)
97ae69
97ae69
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
97ae69
index 8e4052048..da309e288 100644
97ae69
--- a/v2v/rhv-upload-plugin.py
97ae69
+++ b/v2v/rhv-upload-plugin.py
97ae69
@@ -148,8 +148,8 @@ def open(readonly):
97ae69
     # Get a reference to the transfer service.
97ae69
     transfers_service = system_service.image_transfers_service()
97ae69
 
97ae69
-    # Create a new image transfer.
97ae69
-    host = find_host(connection)
97ae69
+    # Create a new image transfer, using the local host is possible.
97ae69
+    host = find_host(connection) if params['rhv_direct'] else None
97ae69
     transfer = transfers_service.add(
97ae69
         types.ImageTransfer(
97ae69
             disk = types.Disk(id = disk.id),
97ae69
-- 
c71420
2.20.1
97ae69