Repository: cloudstack
Updated Branches:
  refs/heads/master 41fdc418f -> f9d7a12a5


CLOUDSTACK-7481: Assertion/exception in listVolumes call from UI with assert 
enabled
searchForVolumesInternal() indicated some inconsistency in the use of 
entity().isDisplayVolume() property – used twice as “display” and 
“displayVolume” in search criteria. And then exception/assert happens while 
setting the property.
Correcting the issue.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f9d7a12a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f9d7a12a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f9d7a12a

Branch: refs/heads/master
Commit: f9d7a12a57de26a0bebe4923e8364400c65aabd0
Parents: 41fdc41
Author: Nitin Mehta <nitin.me...@citrix.com>
Authored: Fri Sep 5 11:35:11 2014 -0700
Committer: Nitin Mehta <nitin.me...@citrix.com>
Committed: Fri Sep 5 11:35:11 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/query/QueryManagerImpl.java | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9d7a12a/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java 
b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 77338f3..2156b0f 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1738,9 +1738,6 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
         // display UserVM volumes only
         sb.and().op("type", sb.entity().getVmType(), SearchCriteria.Op.NIN);
         sb.or("nulltype", sb.entity().getVmType(), SearchCriteria.Op.NULL);
-        if (!(cmd instanceof ListVolumesCmdByAdmin)) {
-            sb.and("displayVolume", sb.entity().isDisplayVolume(), 
SearchCriteria.Op.EQ);
-        }
         sb.cp();
 
         // now set the SC criteria...
@@ -1761,7 +1758,7 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
         }
 
         if (display != null) {
-            sc.setParameters("displayVolume", display);
+            sc.setParameters("display", display);
         }
 
         sc.setParameters("systemUse", 1);
@@ -1802,10 +1799,6 @@ public class QueryManagerImpl extends ManagerBase 
implements QueryService {
             sc.setParameters("storageId", storageId);
         }
 
-        if (!(cmd instanceof ListVolumesCmdByAdmin)) {
-            sc.setParameters("displayVolume", 1);
-        }
-
         // Don't return DomR and ConsoleProxy volumes
         sc.setParameters("type", VirtualMachine.Type.ConsoleProxy, 
VirtualMachine.Type.SecondaryStorageVm, VirtualMachine.Type.DomainRouter);
 

Reply via email to