search for: image_transfers_service

Displaying 20 results from an estimated 45 matches for "image_transfers_service".

2018 Jun 29
2
[PATCH] v2v: rhv-upload-plugin: Optimize only direct upload
...etions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 8805e3552..1404ed1f5 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -143,8 +143,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(...
2019 Nov 21
1
Re: [PATCH 1/2] rhv-upload: Extract cancel_transfer() function
...fer(connection, transfer): > + """ > + 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 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
2018 Jun 26
2
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
v2 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00109.html v3: - Added/fixed all suggestions from Nir in previous review. Q: I wasn't sure if we still need the "UnsupportedError" class so I left it in. Q: Does the Unix socket always have the same name? What happens if there's more than one transfer happening? I tested this both ways, and it worked both
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
2018 Jun 29
0
Re: [PATCH] v2v: rhv-upload-plugin: Optimize only direct upload
...v-upload-plugin.py b/v2v/rhv-upload-plugin.py > index 8805e3552..1404ed1f5 100644 > --- a/v2v/rhv-upload-plugin.py > +++ b/v2v/rhv-upload-plugin.py > @@ -143,8 +143,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( >...
2019 Nov 19
0
[PATCH 1/2] rhv-upload: Extract cancel_transfer() function
...n transfer +def cancel_transfer(connection, transfer): + """ + 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
2018 Jun 26
2
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...ost.id) > I like this, simple and easy to follow. > + > def open(readonly): > # Parse out the username from the output_conn URL. > parsed = urlparse(params['output_conn']) > @@ -121,9 +144,11 @@ def open(readonly): > transfers_service = system_service.image_transfers_service() > > # Create a new image transfer. > + host = find_host(connection) > transfer = transfers_service.add( > types.ImageTransfer( > disk = types.Disk(id = disk.id), > + host = host, > inactivity_timeout = 3600, >...
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
2019 Nov 26
0
[PATCH v2 3/3] rhv-upload: Support qcow2 disk format
...'disk_size'], provisioned_size = params['disk_size'], # XXX Ignores params['output_sparse']. @@ -489,11 +492,16 @@ def create_transfer(connection, disk, host): system_service = connection.system_service() transfers_service = system_service.image_transfers_service() + extra = {} + if transfer_supports_format(): + extra["format"] = types.DiskFormat.RAW + transfer = transfers_service.add( types.ImageTransfer( disk = types.Disk(id = disk.id), host = host, inactivity_timeout = 3600, +...
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
2018 Jun 21
0
[PATCH 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...0: + host = hosts[0] + debug("host.id = %r" % host.id) + else: + debug("could not retrieve host with hw_id=%s" % vdsm_id) + except: + pass + # Get a reference to the transfer service. transfers_service = system_service.image_transfers_service() @@ -124,6 +144,7 @@ def open(readonly): transfer = transfers_service.add( types.ImageTransfer( disk = types.Disk(id = disk.id), + host = types.Host(id = host.id) if host else None, inactivity_timeout = 3600, ) ) @@ -170,6 +191,7 @...
2018 Jun 26
0
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...+ debug("host.id = %r" % host.id) + + return types.Host(id = host.id) + def open(readonly): # Parse out the username from the output_conn URL. parsed = urlparse(params['output_conn']) @@ -121,9 +144,11 @@ def open(readonly): transfers_service = system_service.image_transfers_service() # Create a new image transfer. + host = find_host(connection) transfer = transfers_service.add( types.ImageTransfer( disk = types.Disk(id = disk.id), + host = host, inactivity_timeout = 3600, ) ) @@ -170,6 +195,7 @@ def op...
2018 Jun 22
0
[PATCH v2 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...0: + host = hosts[0] + debug("host.id = %r" % host.id) + else: + debug("could not retrieve host with hw_id=%s" % vdsm_id) + except: + pass + # Get a reference to the transfer service. transfers_service = system_service.image_transfers_service() @@ -124,6 +144,7 @@ def open(readonly): transfer = transfers_service.add( types.ImageTransfer( disk = types.Disk(id = disk.id), + host = types.Host(id = host.id) if host is not None else None, inactivity_timeout = 3600, ) ) @@ -17...
2018 Jun 22
4
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-June/msg00099.html v2: - Just fixes the two problems noted in the review of the previous version. Rich.
2018 Jun 21
6
v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
These two patches add support for using a Unix domain socket to directly access imageio in the case where imageio is running on the conversion host (usually that means virt-v2v is running on the RHV node and something else -- eg. CFME scripts -- arranges that the RHV node is the same one running imageio). Conversions in the normal case are not affected - they happen over TCP as usual. This was
2018 Jun 27
0
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...e and easy to follow. > > >> + >> def open(readonly): >> # Parse out the username from the output_conn URL. >> parsed = urlparse(params['output_conn']) >> @@ -121,9 +144,11 @@ def open(readonly): >> transfers_service = system_service.image_transfers_service() >> >> # Create a new image transfer. >> + host = find_host(connection) >> transfer = transfers_service.add( >> types.ImageTransfer( >> disk = types.Disk(id = disk.id), >> + host = host, >> i...
2019 Nov 20
2
[PATCH] rhv-upload: Support qcow2 disks
...'disk_size'], provisioned_size = params['disk_size'], # XXX Ignores params['output_sparse']. @@ -497,11 +500,16 @@ def create_transfer(connection, disk, host): system_service = connection.system_service() transfers_service = system_service.image_transfers_service() + extra = {} + if transfer_supports_format(): + extra["format"] = types.DiskFormat.RAW + transfer = transfers_service.add( types.ImageTransfer( disk = types.Disk(id = disk.id), host = host, inactivity_timeout = 3600, +...
2018 Jun 25
1
Re: [PATCH v2 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...o maintain this if this will be in a separate function like: def find_host(): read hardware id or return None... get hosts from engine or return None... return types.Host(host.id) > + > # Get a reference to the transfer service. > transfers_service = system_service.image_transfers_service() > > @@ -124,6 +144,7 @@ def open(readonly): > transfer = transfers_service.add( > types.ImageTransfer( > disk = types.Disk(id = disk.id), > + host = types.Host(id = host.id) if host is not None else > None, > We could use here: h...
2018 Sep 20
0
[PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
..., + insecure = False, + ): + pass + + def system_service(self): + return SystemService() + +class SystemService(object): + def data_centers_service(self): + return DataCentersService() + + def disks_service(self): + return DisksService() + + def image_transfers_service(self): + return ImageTransfersService() + + def storage_domains_service(self): + return StorageDomainsService() + + def vms_service(self): + return VmsService() + +class DataCentersService(object): + def list(self, search=None, case_sensitive=False): + return []...