mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

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

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