v2v: rhv-upload-plugin: Optimize only direct upload

The optimization to start the transfer on the local host makes sense
only when using the rhv-direct=true option. When using a proxy, let the
engine choose a host.
This commit is contained in:
Nir Soffer
2018-06-30 01:39:03 +03:00
committed by Richard W.M. Jones
parent f5442d2f04
commit 891b5a0ec0

View File

@@ -148,8 +148,8 @@ def open(readonly):
# Get a reference to the transfer service.
transfers_service = system_service.image_transfers_service()
# Create a new image transfer.
host = find_host(connection)
# Create a new image transfer, using the local host is possible.
host = find_host(connection) if params['rhv_direct'] else None
transfer = transfers_service.add(
types.ImageTransfer(
disk = types.Disk(id = disk.id),