Juan Hernandez has uploaded a new change for review.

Change subject: core: Add support to search Template by id
......................................................................

core: Add support to search Template by id

Althought this support already existed it was using a private "_vmt_id"
name for the identifier, because it was used only interlally by the
frontend. This patch changes the name to "id", like in all the other
entities that support (or will support) search by id.

Change-Id: I7441e313474bffbcd42e984a22f3f7cf08ec645c
Related-To: https://bugzilla.redhat.com/1082090
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
---
M 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmTemplateConditionFieldAutoCompleter.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/ImportTemplateModel.java
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/37417/1

diff --git 
a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmTemplateConditionFieldAutoCompleter.java
 
b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmTemplateConditionFieldAutoCompleter.java
index 8cf9aa8..47d98ac 100644
--- 
a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmTemplateConditionFieldAutoCompleter.java
+++ 
b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmTemplateConditionFieldAutoCompleter.java
@@ -22,7 +22,7 @@
     public static final String DATACENTER = "DATACENTER";
     public static final String QUOTA = "QUOTA";
     public static final String ARCHITECTURE = "ARCHITECTURE";
-    public static final String VMT_ID = "_VMT_ID";
+    public static final String ID = "ID";
     public static final String VERSION_NAME_AND_NUMBER = 
"VERSION_NAME_AND_NUMBER";
 
     public VmTemplateConditionFieldAutoCompleter() {
@@ -41,7 +41,7 @@
         mVerbs.add(VERSION_NAME_AND_NUMBER);
 
         buildCompletions();
-        mVerbs.add(VMT_ID);
+        mVerbs.add(ID);
         // Building the types dict
         getTypeDictionary().put(NAME, String.class);
         getTypeDictionary().put(COMMENT, String.class);
@@ -54,7 +54,7 @@
         getTypeDictionary().put(CLUSTER, String.class);
         getTypeDictionary().put(DATACENTER, String.class);
         getTypeDictionary().put(QUOTA, String.class);
-        getTypeDictionary().put(VMT_ID, UUID.class);
+        getTypeDictionary().put(ID, UUID.class);
         getTypeDictionary().put(DESCRIPTION, String.class);
         getTypeDictionary().put(ARCHITECTURE, ArchitectureType.class);
         getTypeDictionary().put(VERSION_NAME_AND_NUMBER, String.class);
@@ -71,7 +71,7 @@
         columnNameDict.put(CLUSTER, "vds_group_name");
         columnNameDict.put(DATACENTER, "storage_pool_name");
         columnNameDict.put(QUOTA, "quota_name");
-        columnNameDict.put(VMT_ID, "vmt_guid");
+        columnNameDict.put(ID, "vmt_guid");
         columnNameDict.put(DESCRIPTION, "description");
         columnNameDict.put(ARCHITECTURE, "architecture");
         columnNameDict.put(VERSION_NAME_AND_NUMBER, "template_version_name, 
template_version_number");
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/ImportTemplateModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/ImportTemplateModel.java
index eb01fe1..611008a 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/ImportTemplateModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/ImportTemplateModel.java
@@ -58,7 +58,7 @@
     @Override
     public void setItems(final Collection value, final Guid storageDomainId)
     {
-        String vmt_guidKey = "_VMT_ID ="; //$NON-NLS-1$
+        String vmt_guidKey = "ID ="; //$NON-NLS-1$
         String orKey = " or "; //$NON-NLS-1$
         StringBuilder searchPattern = new StringBuilder();
         searchPattern.append("Template: "); //$NON-NLS-1$


-- 
To view, visit http://gerrit.ovirt.org/37417
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7441e313474bffbcd42e984a22f3f7cf08ec645c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to