search for: storage_domain

Displaying 20 results from an estimated 39 matches for "storage_domain".

Did you mean: storage_domains
2023 Jan 27
1
[PATCH v2v] -o rhv-upload: Give a nicer error if the storage domain does not exist
...> diff --git a/output/rhv-upload-precheck.py b/output/rhv-upload-precheck.py > index 1dc1b8498a..35ea021032 100644 > --- a/output/rhv-upload-precheck.py > +++ b/output/rhv-upload-precheck.py > @@ -81,7 +81,12 @@ datacenter = data_centers[0] > > # Get the storage domain. > storage_domains = connection.follow_link(datacenter.storage_domains) > -storage_domain = [sd for sd in storage_domains if sd.name == params['output_storage']][0] > +try: > + storage_domain = [sd for sd in storage_domains \ > + if sd.name == params['output_storage...
2023 Jan 26
2
[PATCH v2v] -o rhv-upload: Give a nicer error if the storage domain
...outputs for virt-v2v since the RHV product will be discontinued soon. I did want to point out some things: - The preceeding code is probably wrong. https://github.com/libguestfs/virt-v2v/blob/master/output/rhv-upload-transfer.py#L70 It attempts to search for the output storage using: storage_domains = system_service.storage_domains_service().list( search='name=%s' % params['output_storage'], case_sensitive=True, ) I couldn't find any documentation about what can go into that search string, but it's clearly a lot more complicated than just...
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
....py index 1d0e8c95d..ed57a9b20 100644 --- a/v2v/rhv-upload-createvm.py +++ b/v2v/rhv-upload-createvm.py @@ -65,17 +65,14 @@ connection = sdk.Connection( system_service = connection.system_service() -# Get the storage domain UUID and substitute it into the OVF doc. -sds_service = system_service.storage_domains_service() -sd = sds_service.list(search=("name=%s" % params['output_storage']))[0] -sd_uuid = sd.id - -ovf = ovf.replace("@SD_UUID@", sd_uuid) +# Get the cluster. +cluster = system_service.clusters_service().cluster_service(params['rhv_cluster_uuid']) +cluster =...
2019 Sep 16
0
[PATCH 4/8] v2v: -o rhv-upload: tell whether a SD actually exists
...t a/v2v/rhv-upload-precheck.py b/v2v/rhv-upload-precheck.py index 9ccfd1fdf..0b8087adb 100644 --- a/v2v/rhv-upload-precheck.py +++ b/v2v/rhv-upload-precheck.py @@ -66,6 +66,15 @@ data_centers = system_service.data_centers_service().list( case_sensitive=True, ) if len(data_centers) == 0: + storage_domains = system_service.storage_domains_service().list( + search='name=%s' % params['output_storage'], + case_sensitive=True, + ) + if len(storage_domains) == 0: + # The storage domain does not even exist. + raise RuntimeError("The storage domain ā€˜%s...
2019 Sep 16
16
[PATCH 0/8] v2v: various fixed for -o rhv-upload
This patch series fixes various issues in the rhv-upload output mode: - properly find and use RHV resources - cleanup orphan disks, and possibly the current disk transfer on failure In reality, the first 4 patches deal with resources, and the other 4 with cleanups. The latter block can be theoretically sent alone -- I just happened to start working on it as part of my "let's fix
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 Sep 19
2
[PATCH] v2v: -o rhv-upload: adapt phony ovirtsdk4 module to recent changes
...2dcd" + name = "Default" class Configuration(object): def __init__(self, type=None, data=None): pass + class ConfigurationType(Enum): OVA = 'ova' OVF = 'ovf' @@ -71,9 +72,8 @@ class Disk(object): sparse = False, storage_domains = None ): - pass + self.id = id - id = "123" status = DiskStatus.OK class ImageTransferPhase(Enum): @@ -104,7 +104,7 @@ class ImageTransfer(object): ): pass - id = "456" + id = "e26ac8ab-7090-4d5e-95ad-e707b511a359&quot...
2018 Mar 25
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...name=os.path.basename(image_path), > description='Uploaded disk', > format=disk_format, > initial_size=image_size, > provisioned_size=image_info["virtual-size"], > sparse=disk_format == types.DiskFormat.COW, > storage_domains=[ > types.StorageDomain( > name='mydata' > ) > ] > ) > ) > > Internally we do allocated 10% more then the requested initial_size > to leave room for qcow2 metadata. > But best do not depend on this, I would...
2020 Jan 28
0
[v2v PATCH 2/2] -o rhv-upload: check guest arch with cluster
...itecture == types.Architecture.UNDEFINED: + raise RuntimeError("The cluster ā€˜%sā€™ has an unknown architecture" % + (params['rhv_cluster'])) # Otherwise everything is OK, print a JSON with the results. results = { "rhv_storagedomain_uuid": storage_domain.id, "rhv_cluster_uuid": cluster.id, + "rhv_cluster_cpu_architecture": cpu.architecture.value, } json.dump(results, sys.stdout) -- 2.24.1
2020 Jan 28
2
[v2v PATCH 1/2] Add back guestcaps as parameter of output#prepare_targets
...7 +151,7 @@ object * 'os' is the output storage (-os nfs:/export). 'targets' describes * the destination files. We modify and return this list. *) - method prepare_targets _ overlays = + method prepare_targets _ overlays _ = let mp, uuid = mount_and_check_storage_domain (s_"Export Storage Domain") os in esd_mp <- mp; diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml index 14153db3..01b1ce4a 100644 --- a/v2v/output_rhv_upload.ml +++ b/v2v/output_rhv_upload.ml @@ -290,7 +290,7 @@ object (* rhev-apt.exe will be installed (if availa...
2018 Mar 24
4
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...e.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"], sparse=disk_format == types.DiskFormat.COW, storage_domains=[ types.StorageDomain( name='mydata' ) ] ) ) Internally we do allocated 10% more then the requested initial_size to leave room for qcow2 metadata. See: https://github.com/oVirt/vdsm/blob/3de6f326d7e338b064b11d2a2269500a3857098b/lib/vds...
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).
...Can you describe exactly what these two sizes mean? Remember that virt-v2v works by streaming. At the point where we are calling this API virt-v2v only knows the virtual size. We never know the size of the final qcow2 file. > sparse=disk_format == types.DiskFormat.COW, > storage_domains=[ > types.StorageDomain( > name='mydata' > ) > ] > ) > ) > > Internally we do allocated 10% more then the requested initial_size > to leave room for qcow2 metadata. 10% more than what? > See: > > ht...
2018 Sep 20
0
[PATCH v2 3/3] v2v: -o rhv-upload: Add a test.
...elf): + 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 [] + +class DiskService(object): + def __init__(self, disk_id): +...
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.
...k_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. The transfer cannot start if the +# disk is locked. +disk_service = disks_service.disk_service(disk_id) +while True: + time.sleep(5) + disk = disk_service.get() + if disk.status == types.DiskSt...
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.
...temService(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 [] > + > +class DiskService(o...
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 Feb 27
0
[PATCH v2 3/3] v2v: Add -o rhv-upload output mode.
...name = %s, + password = password, + debug = %s, + log = logging.getLogger(), + insecure = True, +) +system_service = connection.system_service() +" (py_quote output_password) + (py_quote conn.conn_url) + (py_quote conn.conn_username) + (py_bool conn.conn_debug) + +let python_get_storage_domain_id output_storage = + let search_term = sprintf "name=%s" output_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 +...