Eli Mesika has uploaded a new change for review.

Change subject: core[Search]:Add search support to external_status
......................................................................

core[Search]:Add search support to external_status

This patch adds ability to search in the storage domain view by the new
external_status field

Change-Id: Ie0cf461939344b86ad3567c950dba3dc3585929e
Signed-off-by: emesika <emes...@redhat.com>
---
M 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/StorageDomainFieldAutoCompleter.java
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/36/42136/1

diff --git 
a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/StorageDomainFieldAutoCompleter.java
 
b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/StorageDomainFieldAutoCompleter.java
index 585ab80..8d033fd 100644
--- 
a/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/StorageDomainFieldAutoCompleter.java
+++ 
b/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/StorageDomainFieldAutoCompleter.java
@@ -1,5 +1,6 @@
 package org.ovirt.engine.core.searchbackend;
 
+import org.ovirt.engine.core.common.businessentities.ExternalStatus;
 import org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus;
 import org.ovirt.engine.core.common.businessentities.StorageDomainStatus;
 import org.ovirt.engine.core.common.businessentities.storage.StorageType;
@@ -7,6 +8,7 @@
 public class StorageDomainFieldAutoCompleter extends 
BaseConditionFieldAutoCompleter {
     public static final String NAME = "NAME";
     public static final String STATUS = "STATUS";
+    public static final String EXTERNAL_STATUS = "EXTERNAL_STATUS";
     public static final String DATACENTER = "DATACENTER";
     public static final String TYPE = "TYPE";
     public static final String SIZE = "SIZE";
@@ -22,6 +24,7 @@
         // Building the basic vervs Dict
         mVerbs.add(NAME);
         mVerbs.add(STATUS);
+        mVerbs.add(EXTERNAL_STATUS);
         mVerbs.add(DATACENTER);
         mVerbs.add(TYPE);
         mVerbs.add(SIZE);
@@ -38,6 +41,7 @@
         // Building the types dict
         getTypeDictionary().put(NAME, String.class);
         getTypeDictionary().put(STATUS, StorageDomainStatus.class);
+        getTypeDictionary().put(EXTERNAL_STATUS, ExternalStatus.class);
         getTypeDictionary().put(DATACENTER, String.class);
         getTypeDictionary().put(TYPE, StorageType.class);
         getTypeDictionary().put(SIZE, Integer.class);
@@ -52,6 +56,7 @@
         // building the ColumnName Dict
         columnNameDict.put(NAME, "storage_name");
         columnNameDict.put(STATUS, "storage_domain_shared_status");
+        columnNameDict.put(EXTERNAL_STATUS, "external_status");
         columnNameDict.put(DATACENTER, "storage_pool_name::text");
         columnNameDict.put(TYPE, "storage_type");
         columnNameDict.put(SIZE, "available_disk_size");
@@ -86,6 +91,9 @@
         else if (STATUS.equals(fieldName)) {
             retval = new 
EnumValueAutoCompleter(StorageDomainSharedStatus.class);
         }
+        else if (EXTERNAL_STATUS.equals(fieldName)) {
+            retval = new EnumValueAutoCompleter(ExternalStatus.class);
+        }
         else if (WIPE_AFTER_DELETE.equals(fieldName)) {
             retval = new BitValueAutoCompleter();
         }


-- 
To view, visit https://gerrit.ovirt.org/42136
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0cf461939344b86ad3567c950dba3dc3585929e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to