Blame SOURCES/0037-v2v-rhv-plugin-fix-DC-search-string.patch

df3bb2
From c0f9ab66655ec5ca3f065357d6797d0061f04fe0 Mon Sep 17 00:00:00 2001
df3bb2
From: Daniel Erez <derez@redhat.com>
df3bb2
Date: Tue, 24 Jul 2018 19:16:10 +0300
df3bb2
Subject: [PATCH] v2v: rhv plugin - fix DC search string
df3bb2
df3bb2
Search for DC by 'storage.name=' to make it explicit.
df3bb2
I.e. "storage=" uses regex, so similar names can be
df3bb2
found in the search query. For example, searching for
df3bb2
a domain named FCSD, will find FCSD1 as well.
df3bb2
---
df3bb2
 v2v/rhv-upload-plugin.py | 2 +-
df3bb2
 1 file changed, 1 insertion(+), 1 deletion(-)
df3bb2
df3bb2
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
df3bb2
index 931fcfaa2..8274f1ee1 100644
df3bb2
--- a/v2v/rhv-upload-plugin.py
df3bb2
+++ b/v2v/rhv-upload-plugin.py
df3bb2
@@ -72,7 +72,7 @@ def find_host(connection):
df3bb2
     system_service = connection.system_service()
df3bb2
     storage_name = params['output_storage']
df3bb2
     data_centers = system_service.data_centers_service().list(
df3bb2
-        search='storage=%s' % storage_name,
df3bb2
+        search='storage.name=%s' % storage_name,
df3bb2
         case_sensitive=False,
df3bb2
     )
df3bb2
     if len(data_centers) == 0:
df3bb2
-- 
df3bb2
2.21.0
df3bb2