Displaying 20 results from an estimated 35 matches for "image_transfer_service".
Did you mean:
image_transfers_service
2019 Nov 19
5
[PATCH 0/2] rhv-upload: Complete refactoring
Fix NameError introduced by inocomplete change to extract create_transfer() by
extracting cancel_transfer() function.
Finally extract finallize_transfer() function, dealing with the poorly
documented and over complicated oVirt SDK.
Tested with:
libguestfs-1.40.2-4.fc30.x86_64
nbdkit-1.12.8-1.fc30.x86_64
Tested flows:
- Successful import
- Error in close() - by injecting long sleep in vdsm
2019 Nov 21
1
Re: [PATCH 1/2] rhv-upload: Extract cancel_transfer() function
...+ Cancel a transfer, removing the transfer disk.
> + """
> + debug("canceling transfer %s" % transfer.id)
> + transfer_service = (connection.system_service()
> + .image_transfers_service()
> + .image_transfer_service(transfer.id))
> + transfer_service.cancel()
> +
> # oVirt imageio operations
>
> def parse_transfer_url(transfer):
> --
> 2.21.0
>
2020 Jan 10
7
[v2v PATCH 0/6] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python scripts, and
fix the existing test-v2v-python-syntax.sh to use pycodestyle to
actually perform style checks.
Pino Toscano (6):
PEP 8: adapt whitespaces in lines
PEP 8: move imports at the top
PEP 8: adapt empty lines
tests: find all the Python scripts for syntax checks
-o rhv-upload: remove unused Python imports
Revamp check
2019 Nov 28
3
[PATCH] rhv-upload: Fix waiting for transfer
...oad-plugin.py b/v2v/rhv-upload-plugin.py
index 75e4f404..3942ec72 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -513,21 +513,43 @@ def create_transfer(connection, disk, host):
# Get a reference to the created transfer service.
transfer_service = transfers_service.image_transfer_service(transfer.id)
- # After adding a new transfer for the disk, the transfer's status
- # will be INITIALIZING. Wait until the init phase is over. The
- # actual transfer can start when its status is "Transferring".
+ # Wait until transfer's phase change from INITIALIZIN...
2019 Nov 19
0
[PATCH 1/2] rhv-upload: Extract cancel_transfer() function
...+ """
+ Cancel a transfer, removing the transfer disk.
+ """
+ debug("canceling transfer %s" % transfer.id)
+ transfer_service = (connection.system_service()
+ .image_transfers_service()
+ .image_transfer_service(transfer.id))
+ transfer_service.cancel()
+
# oVirt imageio operations
def parse_transfer_url(transfer):
--
2.21.0
2019 Nov 28
0
Re: [PATCH] rhv-upload: Fix waiting for transfer
...-plugin.py
> index 75e4f404..3942ec72 100644
> --- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -513,21 +513,43 @@ def create_transfer(connection, disk, host):
> # Get a reference to the created transfer service.
> transfer_service = transfers_service.image_transfer_service(transfer.id)
>
> - # After adding a new transfer for the disk, the transfer's status
> - # will be INITIALIZING. Wait until the init phase is over. The
> - # actual transfer can start when its status is "Transferring".
> + # Wait until transfer's phas...
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: adapt phony ovirtsdk4 module to recent changes
...-89,6 +98,9 @@ class ImageTransferService(object):
def __init__(self):
self._finalized = False
+ def cancel(self):
+ pass
+
def get(self):
if self._finalized:
raise NotFoundError
@@ -105,11 +117,8 @@ class ImageTransfersService(object):
def image_transfer_service(self, id):
return ImageTransferService()
-class StorageDomain(object):
- id = "ba87af68-b630-4211-a73a-694c1a689405"
-
class StorageDomainsService(object):
- def list(self, search=None):
+ def list(self, search=None, case_sensitive=False):
return [ StorageDom...
2019 Nov 28
2
Re: [PATCH] rhv-upload: Fix waiting for transfer
...4f404..3942ec72 100644
> > --- a/v2v/rhv-upload-plugin.py
> > +++ b/v2v/rhv-upload-plugin.py
> > @@ -513,21 +513,43 @@ def create_transfer(connection, disk, host):
> > # Get a reference to the created transfer service.
> > transfer_service = transfers_service.image_transfer_service(transfer.id)
> >
> > - # After adding a new transfer for the disk, the transfer's status
> > - # will be INITIALIZING. Wait until the init phase is over. The
> > - # actual transfer can start when its status is "Transferring".
> > + # Wait un...
2019 Nov 18
15
[PATCH v2 00/11] rvh-upload: Various fixes and cleanups
This series extract oVirt SDK and imageio code to make it eaiser to follow the
code and improve error handing in open() and close().
Tested with virt-v2v master.
Changes since v1:
- Rebase on merged patches from v1
- Fix regression introduced by "rhv-upload: Fix cleanup after errors"
- Remove "rhv-upload: Try to remove disk on timeout" since it cannot
succeed
- Add more
2019 Nov 17
23
[PATCH 00/18] rvh-upload: Various fixes and cleanups
This series extract oVirt SDK and imageio code to make it eaiser to follow the
code and improve error handing in open() and close().
The first small patches can be consider as fixes for downstream.
Tested based on libguestfs v1.41.5, since I had trouble building virt-v2v and
libguestfs from master.
Nir Soffer (18):
rhv-upload: Remove unused exception class
rhv-upload: Check status more
2018 Sep 20
0
[PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...def get(self):
+ if self._finalized:
+ raise NotFoundError
+ else:
+ return types.ImageTransfer()
+
+ def finalize(self):
+ self._finalized = True
+
+class ImageTransfersService(object):
+ def add(self, transfer):
+ return transfer
+
+ def image_transfer_service(self, id):
+ return ImageTransferService()
+
+class StorageDomain(object):
+ id = "ba87af68-b630-4211-a73a-694c1a689405"
+
+class StorageDomainsService(object):
+ def list(self, search=None):
+ return [ StorageDomain() ]
+
+class VmsService(object):
+ def add(self,...
2018 Sep 20
7
[PATCH v2 0/3] v2v: -o rhv-upload: Add a test.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00121.html
v2:
- Rewrote patch 2 from scratch so it incorporates Nir's suggestions.
- Add fake module to EXTRA_DIST.
- Retested.
Unfortunately I am no longer able to test the ordinary conversion path
because ovirtsdk4 is incompatible with Fedora 29 / Python 3.7:
2018 Feb 22
0
[PATCH 5/5] v2v: Add -o rhv-upload output mode.
...function. *)
+let python_upload_one_disk disk_id disk_size filename =
+ sprintf "
+transfers_service = system_service.image_transfers_service()
+
+transfer = transfers_service.add(
+ types.ImageTransfer(
+ image = types.Image (id=%s)
+ )
+)
+
+transfer_service = transfers_service.image_transfer_service(transfer.id)
+
+# After adding a new transfer for the disk, the transfer's status will
+# be INITIALIZING. Wait until the init phase is over.
+while transfer.phase == types.ImageTransferPhase.INITIALIZING:
+ time.sleep(1)
+ transfer = transfer_service.get()
+
+if %s:
+ if transfer.tra...
2018 Sep 19
4
[PATCH 0/3] v2v: -o rhv-upload: Add a test.
This adds a test of -o rhv-upload.
Obviously for an upstream test we cannot require a working oVirt
server. This test works by faking the ovirtsdk4 Python module,
setting PYTHONPATH so that the fake module is picked up instead of the
real module (if installed).
However it's more complex than that because the nbdkit plugin also
expects to talk to a working imageio HTTPS server. Therefore
2018 Oct 09
2
Re: [PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...raise NotFoundError
> + else:
> + return types.ImageTransfer()
> +
> + def finalize(self):
> + self._finalized = True
> +
> +class ImageTransfersService(object):
> + def add(self, transfer):
> + return transfer
> +
> + def image_transfer_service(self, id):
> + return ImageTransferService()
> +
> +class StorageDomain(object):
> + id = "ba87af68-b630-4211-a73a-694c1a689405"
> +
> +class StorageDomainsService(object):
> + def list(self, search=None):
> + return [ StorageDomain() ]
> +
&...
2018 Feb 27
0
[PATCH v2 3/3] v2v: Add -o rhv-upload output mode.
...on_upload_one_disk disk_id disk_size filename rhv_cafile rhv_direct =
+ sprintf "
+transfers_service = system_service.image_transfers_service()
+
+transfer = transfers_service.add(
+ types.ImageTransfer(
+ image = types.Image (id=%s)
+ )
+)
+
+transfer_service = transfers_service.image_transfer_service(transfer.id)
+
+# After adding a new transfer for the disk, the transfer's status will
+# be INITIALIZING. Wait until the init phase is over.
+timeout = time.time() + %d
+while True:
+ time.sleep(5)
+ transfer = transfer_service.get()
+ if transfer.phase != types.ImageTransferPhase.IN...
2018 Feb 27
5
[PATCH v2 0/3] v2v: Add -o rhv-upload output mode.
This patch set is still for discussion only. See 3/3 for the current
list of problems.
However this will upload an image to an oVirt or RHV server, although
you must have absolutely the latest snapshot version of 4.2 for it to
work.
Rich.
2018 Feb 22
2
Re: [PATCH 5/5] v2v: Add -o rhv-upload output mode.
...isk_size filename =
> + sprintf "
> +transfers_service = system_service.image_transfers_service()
> +
> +transfer = transfers_service.add(
> + types.ImageTransfer(
> + image = types.Image (id=%s)
> + )
> +)
> +
> +transfer_service = transfers_service.image_transfer_service(transfer.id)
> +
> +# After adding a new transfer for the disk, the transfer's status will
> +# be INITIALIZING. Wait until the init phase is over.
> +while transfer.phase == types.ImageTransferPhase.INITIALIZING:
> + time.sleep(1)
> + transfer = transfer_service.get()...
2018 Feb 22
11
[PATCH 0/5] v2v: Add -o rhv-upload output mode.
The first four patches are straightforward.
The final patch adds the -o rhv-upload output mode. It is
still spooling into a temporary file because I've had some
trouble getting streaming conversions working. There are
other problems as outlined in the commit message, so this
patch is not ready for upstream but is good for discussion.
Also I hit this, which I'm assuming for now will be
2018 Mar 01
7
[PATCH v3 0/6] v2v: Add -o rhv-upload output mode.
v2 -> v3:
- Lots of code cleanups.
- Documentation.
However this is still spooling the file into a temporary before the
upload. It turns out that fixing this is going to require a small
change to qemu.
Rich.