search for: disks_service

Displaying 20 results from an estimated 44 matches for "disks_service".

Did you mean: disk_service
2020 Feb 24
2
Re: [PATCH v2v v2 2/2] rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
...> import time > > +import nbdkit > +import errno > + > from http.client import HTTPSConnection, HTTPConnection > from urllib.parse import urlparse > > @@ -461,6 +464,15 @@ def create_disk(connection): > system_service = connection.system_service() > disks_service = system_service.disks_service() > > + uuid = params.get('rhv_disk_uuid') > + if uuid is not None: > + try: > + disks_service.disk_service(uuid).get() > + nbdkit.set_error(errno.EEXIST) > + raise ValueError("Disk with...
2018 Mar 25
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...ttps://github.com/oVirt/ovirt-engine-sdk/blob/aba2a83ec94ecac1594adfff62d3cfcfdbdef416/sdk/examples/upload_disk.py#L113 > > > if image_info["format"] == "qcow2": > disk_format = types.DiskFormat.COW > else: > disk_format = types.DiskFormat.RAW > > disks_service = connection.system_service().disks_service() > disk = disks_service.add( > disk=types.Disk( > name=os.path.basename(image_path), > description='Uploaded disk', > format=disk_format, > initial_size=image_size, > provisioned_si...
2020 Jan 23
5
[v2v PATCH 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279 It took me quite some time to go through the whole rfc 4122 just to realize we do not need to do anything with the versions. Martin Kletzander (2): rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279) rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
2018 Mar 24
4
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...d "initial_size": From: https://github.com/oVirt/ovirt-engine-sdk/blob/aba2a83ec94ecac1594adfff62d3cfcfdbdef416/sdk/examples/upload_disk.py#L113 if image_info["format"] == "qcow2": disk_format = types.DiskFormat.COW else: disk_format = types.DiskFormat.RAW disks_service = connection.system_service().disks_service() disk = disks_service.add( disk=types.Disk( name=os.path.basename(image_path), description='Uploaded disk', format=disk_format, initial_size=image_size, provisioned_size=image_info["virtual-size&qu...
2020 Jan 29
4
[PATCH v2v v2 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab v2 at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279 It took me quite some time to go through the whole rfc 4122 just to realize we do not need to do anything with the versions. v2: - Use EEXIST instead of EINVAL - Put the colliding UUID into the error - Do not evaluate the PCRE needlessly multiple times v1:
2020 Jan 23
0
[v2v PATCH 2/2] rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
...oad-plugin.py @@ -26,6 +26,9 @@ import ssl import sys import time +import nbdkit +import errno + from http.client import HTTPSConnection, HTTPConnection from urllib.parse import urlparse @@ -461,6 +464,15 @@ def create_disk(connection): system_service = connection.system_service() disks_service = system_service.disks_service() + uuid = params.get('rhv_disk_uuid') + if uuid is not None: + try: + disks_service.disk_service(uuid).get() + nbdkit.set_error(errno.EINVAL) + raise ValueError("Disk with the specified UUID already exists&...
2020 Jan 29
0
[PATCH v2v v2 2/2] rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
...oad-plugin.py @@ -26,6 +26,9 @@ import ssl import sys import time +import nbdkit +import errno + from http.client import HTTPSConnection, HTTPConnection from urllib.parse import urlparse @@ -461,6 +464,15 @@ def create_disk(connection): system_service = connection.system_service() disks_service = system_service.disks_service() + uuid = params.get('rhv_disk_uuid') + if uuid is not None: + try: + disks_service.disk_service(uuid).get() + nbdkit.set_error(errno.EEXIST) + raise ValueError("Disk with the UUID '%s' already exis...
2020 Feb 24
0
Re: [PATCH v2v v2 2/2] rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
...+import nbdkit >> +import errno >> + >> from http.client import HTTPSConnection, HTTPConnection >> from urllib.parse import urlparse >> >> @@ -461,6 +464,15 @@ def create_disk(connection): >> system_service = connection.system_service() >> disks_service = system_service.disks_service() >> >> + uuid = params.get('rhv_disk_uuid') >> + if uuid is not None: >> + try: >> + disks_service.disk_service(uuid).get() >> + nbdkit.set_error(errno.EEXIST) >> + raise...
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 Sep 16
0
[PATCH 7/8] v2v: -o rhv-upload: remove uploaded disks on failure
...nection = sdk.Connection( + url = params['output_conn'], + username = username, + password = output_password, + ca_file = params['rhv_cafile'], + log = logging.getLogger(), + insecure = params['insecure'], +) + +system_service = connection.system_service() +disks_service = system_service.disks_service() + +for uuid in params['disk_uuids']: + # Try to get and remove the disk, however do not fail + # if it does not exist (maybe removed in the meanwhile). + try: + disk_service = disks_service.disk_service(uuid) + disk_service.remove() +...
2020 Mar 11
4
[PATCH v2v v3 0/2] rhv-upload: Validate UUIDs and check they don't exist already
My stab v3 at fixing this: https://bugzilla.redhat.com/show_bug.cgi?id=1789279 It took me quite some time to go through the whole rfc 4122 just to realize we do not need to do anything with the versions. v3: - Do the check in precheck - Fix for Lazy evaluation of regexp UUID v2: - https://www.redhat.com/archives/libguestfs/2020-January/msg00221.html - Use EEXIST instead of EINVAL - Put the
2018 Mar 25
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...ased > on Ondra review from earlier version. Is this really true? My reading of the code is that the insecure flag verifies the server to the client, whereas the certificate bundle is for verifying the client to the server. > [snipped] > > > + # Create the disk. > > + disks_service = system_service.disks_service() > > + if params['disk_format'] == "raw": > > + disk_format = types.DiskFormat.RAW > > + else: > > + disk_format = types.DiskFormat.COW > > + disk = disks_service.add( > > + disk = ty...
2018 Feb 22
0
[PATCH 5/5] v2v: Add -o rhv-upload output mode.
...rvice = connection.system_service() +" (py_quote output_password) + (py_quote conn.conn_url) + (py_quote conn.conn_username) + (py_bool conn.conn_debug) + +let python_create_one_disk disk_name disk_format + output_alloc output_storage disk_size = + sprintf " +disks_service = system_service.disks_service() +disk = disks_service.add( + disk = types.Disk( + name = %s, + format = %s, + sparse = %s, + provisioned_size = %Ld, + storage_domains = [types.StorageDomain(name = %s)], + ) +) +disk_id = disk.id + +# Wait til the disk is up...
2018 Mar 26
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...ficate bundle is >> for verifying the client to the server. >> > > Maybe, I'm not familiar with the SDK. > > What is the motivation for disabling this flag? > > >> > [snipped] >> > >> > > + # Create the disk. >> > > + disks_service = system_service.disks_service() >> > > + if params['disk_format'] == "raw": >> > > + disk_format = types.DiskFormat.RAW >> > > + else: >> > > + disk_format = types.DiskFormat.COW >> > > + disk = di...
2018 Feb 27
0
[PATCH v2 3/3] v2v: Add -o rhv-upload output mode.
...ut_storage in + sprintf " +sds_service = system_service.storage_domains_service() +sd = sds_service.list(search=%s)[0] +print(sd.id) +" (py_quote search_term) + +let python_create_one_disk disk_name disk_format + output_alloc sd_id disk_size = + sprintf " +disks_service = system_service.disks_service() +disk = disks_service.add( + disk = types.Disk( + name = %s, + format = %s, + sparse = %s, + provisioned_size = %Ld, + storage_domains = [types.StorageDomain(id = %s)], + ) +) +disk_id = disk.id + +# Wait til the disk is up....
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.
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 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.
...ot; (py_quote output_password) > + (py_quote conn.conn_url) > + (py_quote conn.conn_username) > + (py_bool conn.conn_debug) > + > +let python_create_one_disk disk_name disk_format > + output_alloc output_storage disk_size = > + sprintf " > +disks_service = system_service.disks_service() > +disk = disks_service.add( > + disk = types.Disk( > + name = %s, > + format = %s, > + sparse = %s, > + provisioned_size = %Ld, > + storage_domains = [types.StorageDomain(name = %s)], > + ) > +) &g...
2018 Mar 25
6
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...rifies the server to the client, whereas the certificate bundle is > for verifying the client to the server. > Maybe, I'm not familiar with the SDK. What is the motivation for disabling this flag? > > [snipped] > > > > > + # Create the disk. > > > + disks_service = system_service.disks_service() > > > + if params['disk_format'] == "raw": > > > + disk_format = types.DiskFormat.RAW > > > + else: > > > + disk_format = types.DiskFormat.COW > > > + disk = disks_service.add( &gt...