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