mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0038-v2v-rhv-plugin-case-sensitive-search-queries.patch

df3bb2
From bc2ba2f47ba8a1f88ea6f3c14addd60e84423adf Mon Sep 17 00:00:00 2001
df3bb2
From: Daniel Erez <derez@redhat.com>
df3bb2
Date: Wed, 25 Jul 2018 11:24:33 +0300
df3bb2
Subject: [PATCH] v2v: rhv plugin - case-sensitive search queries
df3bb2
df3bb2
Changed both search queries to case-sensitive (to ensure an exact match).
df3bb2
---
df3bb2
 v2v/rhv-upload-plugin.py | 4 ++--
df3bb2
 1 file changed, 2 insertions(+), 2 deletions(-)
df3bb2
df3bb2
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
df3bb2
index 8274f1ee1..4fad27fb8 100644
df3bb2
--- a/v2v/rhv-upload-plugin.py
df3bb2
+++ b/v2v/rhv-upload-plugin.py
df3bb2
@@ -73,7 +73,7 @@ def find_host(connection):
df3bb2
     storage_name = params['output_storage']
df3bb2
     data_centers = system_service.data_centers_service().list(
df3bb2
         search='storage.name=%s' % storage_name,
df3bb2
-        case_sensitive=False,
df3bb2
+        case_sensitive=True,
df3bb2
     )
df3bb2
     if len(data_centers) == 0:
df3bb2
         # The storage domain is not attached to a datacenter
df3bb2
@@ -87,7 +87,7 @@ def find_host(connection):
df3bb2
     hosts_service = system_service.hosts_service()
df3bb2
     hosts = hosts_service.list(
df3bb2
         search="hw_id=%s and datacenter=%s and status=Up" % (vdsm_id, datacenter.name),
df3bb2
-        case_sensitive=False,
df3bb2
+        case_sensitive=True,
df3bb2
     )
df3bb2
     if len(hosts) == 0:
df3bb2
         # Couldn't find a host that's fulfilling the following criteria:
df3bb2
-- 
df3bb2
2.21.0
df3bb2