Displaying 20 results from an estimated 79 matches for "system_service".
2018 Jul 05
4
[PATCH] v2v: rhv plugin - find suitable host
...y
index da309e288..c72f5e181 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -67,11 +67,23 @@ def find_host(connection):
debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e)
return None
- debug("hw_id = %r" % vdsm_id)
+ system_service = connection.system_service()
+ storage_name = params['output_storage']
+ data_centers = system_service.data_centers_service().list(
+ search='storage=%s' % storage_name,
+ case_sensitive=False,
+ )
+ if len(data_centers) == 0:
+ # The storage domain...
2018 Jul 05
2
[PATCH v2] v2v: rhv plugin - find suitable host
...etions(-)
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index da309e288..931fcfaa2 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -69,14 +69,34 @@ def find_host(connection):
debug("hw_id = %r" % vdsm_id)
- hosts_service = connection.system_service().hosts_service()
+ system_service = connection.system_service()
+ storage_name = params['output_storage']
+ data_centers = system_service.data_centers_service().list(
+ search='storage=%s' % storage_name,
+ case_sensitive=False,
+ )
+ if len(data_center...
2018 Jul 24
3
[PATCH] v2v: rhv plugin - fix DC search string
...ll.
---
v2v/rhv-upload-plugin.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index c72f5e181..c6ba1962f 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -70,7 +70,7 @@ def find_host(connection):
system_service = connection.system_service()
storage_name = params['output_storage']
data_centers = system_service.data_centers_service().list(
- search='storage=%s' % storage_name,
+ search='storage.name=%s' % storage_name,
case_sensitive=False,
)...
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
...if Python_script.run_command createvm_script json_params [ovf_file] <> 0
diff --git a/v2v/rhv-upload-createvm.py b/v2v/rhv-upload-createvm.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@...
2020 Feb 24
2
Re: [PATCH v2v v2 2/2] rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
....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.EEXI...
2018 Jul 24
1
Re: [PATCH] v2v: rhv plugin - fix DC search string
...(+), 1 deletion(-)
> >
> > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> > index c72f5e181..c6ba1962f 100644
> > --- a/v2v/rhv-upload-plugin.py
> > +++ b/v2v/rhv-upload-plugin.py
> > @@ -70,7 +70,7 @@ def find_host(connection):
> > system_service = connection.system_service()
> > storage_name = params['output_storage']
> > data_centers = system_service.data_centers_service().list(
> > - search='storage=%s' % storage_name,
> > + search='storage.name=%s' % storage_name,
&...
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
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 Jul 05
0
Re: [PATCH] v2v: rhv plugin - find suitable host
...--- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -67,11 +67,23 @@ def find_host(connection):
> debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e)
> return None
>
> - debug("hw_id = %r" % vdsm_id)
> + system_service = connection.system_service()
> + storage_name = params['output_storage']
> + data_centers = system_service.data_centers_service().list(
> + search='storage=%s' % storage_name,
> + case_sensitive=False,
> + )
> + if len(data_centers) == 0:...
2018 Jul 05
0
Re: [PATCH] v2v: rhv plugin - find suitable host
...t; +++ b/v2v/rhv-upload-plugin.py
> @@ -67,11 +67,23 @@ def find_host(connection):
> debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e)
> return None
>
> - debug("hw_id = %r" % vdsm_id)
>
I would leave this as is...
> + system_service = connection.system_service()
> + storage_name = params['output_storage']
> + data_centers = system_service.data_centers_service().list(
> + search='storage=%s' % storage_name,
> + case_sensitive=False,
> + )
> + if len(data_centers) == 0:...
2018 Jul 05
0
Re: [PATCH v2] v2v: rhv plugin - find suitable host
...ad-plugin.py b/v2v/rhv-upload-plugin.py
> index da309e288..931fcfaa2 100644
> --- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -69,14 +69,34 @@ def find_host(connection):
>
> debug("hw_id = %r" % vdsm_id)
>
> - hosts_service = connection.system_service().hosts_service()
> + system_service = connection.system_service()
> + storage_name = params['output_storage']
> + data_centers = system_service.data_centers_service().list(
> + search='storage=%s' % storage_name,
> + case_sensitive=False,
>...
2019 Sep 16
0
[PATCH 1/8] v2v: -o rhv-upload: split vmcheck out of precheck
...nklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+val code : string
diff --git a/v2v/rhv-upload-precheck.py b/v2v/rhv-upload-precheck.py
index b79f91b4a..6253c26ac 100644
--- a/v2v/rhv-upload-precheck.py
+++ b/v2v/rhv-upload-precheck.py
@@ -60,16 +60,6 @@ connection = sdk.Connection(
system_service = connection.system_service()
-# Find if a virtual machine already exists with that name.
-vms_service = system_service.vms_service()
-vms = vms_service.list(
- search = ("name=%s" % params['output_name']),
-)
-if len(vms) > 0:
- vm = vms[0]
- raise RuntimeError(&quo...
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 Jul 25
1
[PATCH] v2v: rhv plugin - case-sensitive search queries
...(+), 2 deletions(-)
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
index c6ba1962f..d787c9598 100644
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-plugin.py
@@ -71,7 +71,7 @@ def find_host(connection):
storage_name = params['output_storage']
data_centers = system_service.data_centers_service().list(
search='storage.name=%s' % storage_name,
- case_sensitive=False,
+ case_sensitive=True,
)
if len(data_centers) == 0:
# The storage domain is not attached to a datacenter
@@ -84,7 +84,7 @@ def find_host(connection):...
2018 Aug 07
1
[PATCH] v2v: -o rhv-upload: Properly replace SD_UUID in OVF (RHBZ#1612653).
...aniel Erez.
---
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...
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 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 Jul 24
0
Re: [PATCH] v2v: rhv plugin - fix DC search string
...> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> index c72f5e181..c6ba1962f 100644
> --- a/v2v/rhv-upload-plugin.py
> +++ b/v2v/rhv-upload-plugin.py
> @@ -70,7 +70,7 @@ def find_host(connection):
> system_service = connection.system_service()
> storage_name = params['output_storage']
> data_centers = system_service.data_centers_service().list(
> - search='storage=%s' % storage_name,
> + search='storage.name=%s' % storage_name,
> case_se...
2020 Jan 23
0
[v2v PATCH 2/2] rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
...4
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-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(&...
2020 Jan 29
0
[PATCH v2v v2 2/2] rhv-upload: Check that rhv-disk-uuid is not already taken (RHBZ#1789279)
...4
--- a/v2v/rhv-upload-plugin.py
+++ b/v2v/rhv-upload-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(&...