[Libguestfs] [PATCH] v2v: rhv plugin - case-sensitive search queries

Richard W.M. Jones rjones at redhat.com
Wed Jul 25 08:40:14 UTC 2018


On Wed, Jul 25, 2018 at 11:24:33AM +0300, Daniel Erez wrote:
> Changed both search queries to case-sensitive (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:
>          # The storage domain is not attached to a datacenter
> @@ -84,7 +84,7 @@ 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),
> -        case_sensitive=False,
> +        case_sensitive=True,
>      )
>      if len(hosts) == 0:
>          # This oVirt host is not registered with engine.

Thanks, I've pushed this and added another comment to
https://bugzilla.redhat.com/show_bug.cgi?id=1557273

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list