mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

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