<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jul 24, 2018 at 7:16 PM Daniel Erez <<a href="mailto:derez@redhat.com">derez@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Search for DC by '<a href="http://storage.name" rel="noreferrer" target="_blank">storage.name</a>=' to make it explicit.<br>
I.e. "storage=" uses regex, so similar names can be<br>
found in the search query. For example, searching for<br>
a domain named FCSD, will find FCSD1 as well.<br>
---<br>
 v2v/rhv-upload-plugin.py | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py<br>
index c72f5e181..c6ba1962f 100644<br>
--- a/v2v/rhv-upload-plugin.py<br>
+++ b/v2v/rhv-upload-plugin.py<br>
@@ -70,7 +70,7 @@ def find_host(connection):<br>
     system_service = connection.system_service()<br>
     storage_name = params['output_storage']<br>
     data_centers = system_service.data_centers_service().list(<br>
-        search='storage=%s' % storage_name,<br>
+        search='<a href="http://storage.name" rel="noreferrer" target="_blank">storage.name</a>=%s' % storage_name,<br></blockquote><div><br></div><div>Looks good, but</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
         case_sensitive=False,<br>
     )<br>
     if len(data_centers) == 0:<br></blockquote><div><br></div><div>We need to be more defensive here.</div><div><br></div><div>We expect exactly one result.</div><div>len == 0 means there there is no dc with this name (impossible?)</div><div>len > 1 means we have a bug - we need to log a detailed error message and return None.</div><div><br></div><div>Nir</div></div></div>