search for: storage_domains_service

Displaying 20 results from an estimated 30 matches for "storage_domains_service".

2018 Mar 26
1
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
On Mon, Mar 26, 2018 at 09:27:25AM +0000, Daniel Erez wrote: > You can get it from '.storage.type' on the StorageDomain object. > E.g. > sd = connection.system_service().storage_domains_service().list()[0] > sd.storage.type -> nfs/iscsi/etc Is there a defined set of what can be returned, and/or a way to find out if the storage is "block-like" or not? Alternately what happens if we don't specify the sparse flag at all? Will it do the right thing? Rich. -- Richard J...
2018 Aug 07
1
[PATCH] v2v: -o rhv-upload: Properly replace SD_UUID in OVF (RHBZ#1612653).
...v2v/rhv-upload-createvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/rhv-upload-createvm.py b/v2v/rhv-upload-createvm.py index a34627ec8..1d0e8c95d 100644 --- a/v2v/rhv-upload-createvm.py +++ b/v2v/rhv-upload-createvm.py @@ -70,7 +70,7 @@ sds_service = system_service.storage_domains_service() sd = sds_service.list(search=("name=%s" % params['output_storage']))[0] sd_uuid = sd.id -ovf.replace("@SD_UUID@", sd_uuid) +ovf = ovf.replace("@SD_UUID@", sd_uuid) vms_service = system_service.vms_service() vm = vms_service.add( -- 2.18.0
2023 Jan 26
2
[PATCH v2v] -o rhv-upload: Give a nicer error if the storage domain
...V 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 pasting in the literal name after "na...
2019 Sep 16
0
[PATCH 4/8] v2v: -o rhv-upload: tell whether a SD actually exists
...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ā€™ does not exist" % +...
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 = cluster....
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
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): + self._di...
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 Mar 26
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...isk. > > I guess you can check if a storage domain is file based or block basedu > using the SDK, but I'm not familiar with it. > > Daniel, do we expose this info? > You can get it from '.storage.type' on the StorageDomain object. E.g. sd = connection.system_service().storage_domains_service().list()[0] sd.storage.type -> nfs/iscsi/etc > > > [snipped] >> > >> > > +# Can we issue zero, trim or flush requests? >> > > >> > +def get_options(h): >> > > + if h['got_options']: >> > > + return &g...
2018 Mar 25
6
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
On Sun, Mar 25, 2018 at 2:41 PM Richard W.M. Jones <rjones@redhat.com> wrote: > On Sat, Mar 24, 2018 at 10:36:06PM +0000, Nir Soffer wrote: > > On Thu, Mar 22, 2018 at 5:25 PM Richard W.M. Jones <rjones@redhat.com> > > wrote: > > > > > PROBLEMS: > > > - -of qcow2 does not work, with multiple problems > > > * needs to set NBD size to
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(object): &...
2018 Feb 27
0
[PATCH v2 3/3] v2v: Add -o rhv-upload output mode.
...vice() +" (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 + output_alloc sd_id disk_size = + sprintf " +disks_service = system_service.disks_service() +disk = disks_service.add( + disk =...
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 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 Mar 08
6
[PATCH v5 0/4] v2v: Add -o rhv-upload output mode.
Mainly minor fixes and code cleanups over the v4 patch. There are still several problems with this patch, but it is in a reviewable state, especially the Python code. Rich.
2018 Mar 08
0
[PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...me, + password = output_password, + ca_file = params['rhv_cafile'], + log = logging.getLogger(), + insecure = True, # XXX? +) + +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.replace("@SD_UUID@", sd_uuid) + +vms_service = system_service.vms_service() +vm = vms_service.add( + types.Vm( + cluster=types.Cluster(name = "Default")...
2018 Mar 08
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...f this access engine using clear text then yes it is bad :-) Ondra, can you explain the semantics of incsecure=True? > +) > + > +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.replace("@SD_UUID@", sd_uuid) > + > +vms_service = system_service.vms_service() > +vm = vms_service.add( > + types.Vm( > + clus...
2018 Mar 11
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...ca_file = params['rhv_cafile'], > + log = logging.getLogger(), > + insecure = True, # XXX? > +) > + > +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.replace("@SD_UUID@", sd_uuid) > + > +vms_service = system_service.vms_service() > +vm = vms_service.add( > + types.Vm( > + clus...
2018 Mar 09
1
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...https still can be used. Preferred is of course using ca_file to validate certificates. > > +) > + > +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 <http://sd.id> > + > +ovf.replace("@SD_UUID@", sd_uuid) > + > +vms_service = system_service.vms_service() > +vm = vms_se...