search for: find_host

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

2018 Jul 25
1
[PATCH] v2v: rhv plugin - case-sensitive search queries
...(to ensure an exact match). --- v2v/rhv-upload-plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 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: #...
2018 Jul 31
1
[PATCH] v2v: -o rhv-upload: PEP8 fixes for rhv-upload-plugin.py
...instead of \ (backslash) --- v2v/rhv-upload-plugin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index 4fad27fb8..bdc1e104a 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -86,7 +86,8 @@ def find_host(connection): hosts_service = system_service.hosts_service() hosts = hosts_service.list( - search="hw_id=%s and datacenter=%s and status=Up" % (vdsm_id, datacenter.name), + search="hw_id=%s and datacenter=%s and status=Up" + % (vdsm_id, dat...
2018 Jun 29
2
[PATCH] v2v: rhv-upload-plugin: Optimize only direct upload
...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( disk = types.Disk(id = disk.id), -- 2.17.1
2018 Jul 24
3
[PATCH] v2v: rhv plugin - fix DC search string
...FCSD, will find FCSD1 as well. --- 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,...
2018 Jul 05
4
[PATCH] v2v: rhv plugin - find suitable host
...ch query. --- v2v/rhv-upload-plugin.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py 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_servic...
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
2018 Aug 05
3
[PATCH] v2v: rhv-plugin: Use string literal concatenation
...bproject commit 5b78831df03b49408676227604cf16f90dee07ac +Subproject commit 646a44e1b190c4a7f6a9f32c63230c619e38d251 diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index bdc1e104a..2d686c2da 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -95,8 +95,8 @@ def find_host(connection): # - 'hw_id' equals to 'vdsm_id' # - Its status is 'Up' # - Belongs to the storage domain's datacenter - debug("cannot find a running host with hw_id=%r, " + - "that belongs to datacenter '%s...
2018 Jul 05
2
[PATCH v2] v2v: rhv plugin - find suitable host
...--- v2v/rhv-upload-plugin.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) 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( +...
2018 Jun 29
0
[PATCH] v2v: rhv-upload-plugin: Improve error handling
...g the operation. --- v2v/rhv-upload-plugin.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py index f404bd758..8e4052048 100644 --- a/v2v/rhv-upload-plugin.py +++ b/v2v/rhv-upload-plugin.py @@ -63,7 +63,10 @@ def find_host(connection): with builtins.open("/etc/vdsm/vdsm.id") as f: vdsm_id = f.readline().strip() except Exception as e: + # This is most likely not an oVirt host. + debug("cannot read /etc/vdsm/vdsm.id, using any host: %s" % e) return N...
2018 Jun 29
0
Re: [PATCH] v2v: rhv-upload-plugin: Optimize only direct upload
...--- 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( > disk = types.Disk(id = disk.id), &...
2018 Jul 24
1
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=...
2018 Jun 26
2
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...m http.client import HTTPSConnection > +from http.client import HTTPSConnection, HTTPConnection > from urllib.parse import urlparse > > import ovirtsdk4 as sdk > @@ -56,6 +57,28 @@ def debug(s): > print(s, file=sys.stderr) > sys.stderr.flush() > > +def find_host(connection): > + """Return the current host object or None.""" > I think we need a comment for this, something like: # If we are running on a oVirt host, it must have a hardware id # file. > + try: > + with builtin_open("/etc/vdsm/vdsm...
2018 Jun 25
1
Re: [PATCH v2 2/2] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...raise If you don't raise, you should use Exception. Otherwise you will swallow KeyboardInterrupt, SystemExit, and GeneratorExit and any other user defined exceptions inheriting from BaseException. Also it will be easier to 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):...
2018 Jun 26
0
[PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...mport ssl import sys import time -from http.client import HTTPSConnection +from http.client import HTTPSConnection, HTTPConnection from urllib.parse import urlparse import ovirtsdk4 as sdk @@ -56,6 +57,28 @@ def debug(s): print(s, file=sys.stderr) sys.stderr.flush() +def find_host(connection): + """Return the current host object or None.""" + try: + with builtin_open("/etc/vdsm/vdsm.id") as f: + vdsm_id = f.readline().strip() + except Exception as e: + return None + debug("hw_id = %r" % vd...
2018 Jun 27
0
Re: [PATCH v3] v2v: -o rhv-upload: Use Unix domain socket to access imageio (RHBZ#1588088).
...>> +from http.client import HTTPSConnection, HTTPConnection >> from urllib.parse import urlparse >> >> import ovirtsdk4 as sdk >> @@ -56,6 +57,28 @@ def debug(s): >> print(s, file=sys.stderr) >> sys.stderr.flush() >> >> +def find_host(connection): >> + """Return the current host object or None.""" >> > > I think we need a comment for this, something like: > > # If we are running on a oVirt host, it must have a hardware id > # file. > > >> + try: >>...
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
2010 Mar 03
2
Viewing cetificate details
Hi, I don't see any way to view the details of a certificate once it is generated. Having such a capability would be very handy for debugging purposes to check what constraints, principals, and validity interval are associated with a given cert. -- Iain Morgan
2018 Jul 05
0
Re: [PATCH] v2v: rhv plugin - find suitable host
...n.py | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > 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'] &gt...
2018 Jul 05
0
Re: [PATCH] v2v: rhv plugin - find suitable host
...in.py | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py > 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) > I would leave this as is... > + system_service = connection.system_service() > + storage_name = pa...
2018 Jul 05
0
Re: [PATCH v2] v2v: rhv plugin - find suitable host
...++++++++++++++++++++++++---- > 1 file changed, 24 insertions(+), 4 deletions(-) > > 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.dat...