You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/11/23 01:45:16 UTC

[1/3] git commit: updated refs/heads/4.3 to 4de858c

Updated Branches:
  refs/heads/4.3 44a81519c -> 4de858c7a


Add a new method on datastoredriver: getCapabilities, which will be called by liststoragepoolcmd. UI can make decision based on the capabilities of the storage.
And also add a new table: snapshotdetails

Conflicts:
	plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java


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

Branch: refs/heads/4.3
Commit: 70fed9f3878011b66488b7e6341fb4a597eb140e
Parents: 44a8151
Author: Edison Su <su...@gmail.com>
Authored: Thu Nov 14 15:51:56 2013 -0800
Committer: Edison Su <su...@gmail.com>
Committed: Fri Nov 22 16:20:41 2013 -0800

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/ApiConstants.java |  1 +
 .../api/response/StoragePoolResponse.java       | 11 +++
 .../api/storage/DataStoreCapabilities.java      | 23 +++++++
 .../subsystem/api/storage/DataStoreDriver.java  |  3 +
 .../cloud/storage/dao/SnapshotDetailsDao.java   | 25 +++++++
 .../storage/dao/SnapshotDetailsDaoImpl.java     | 28 ++++++++
 .../cloud/storage/dao/SnapshotDetailsVO.java    | 72 ++++++++++++++++++++
 .../snapshot/XenserverSnapshotStrategy.java     | 13 ++--
 .../storage/image/BaseImageStoreDriverImpl.java | 14 ++--
 .../driver/CloudStackImageStoreDriverImpl.java  |  8 +--
 .../CloudStackPrimaryDataStoreDriverImpl.java   | 21 +++---
 .../SamplePrimaryDataStoreDriverImpl.java       |  8 +++
 .../driver/SolidfirePrimaryDataStoreDriver.java | 16 ++---
 .../com/cloud/api/query/QueryManagerImpl.java   | 15 ++++
 setup/db/db/schema-421to430.sql                 |  9 +++
 15 files changed, 232 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index c277788..6f919c1 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -222,6 +222,7 @@ public class ApiConstants {
     public static final String STATUS = "status";
     public static final String STORAGE_TYPE = "storagetype";
     public static final String STORAGE_MOTION_ENABLED = "storagemotionenabled";
+    public static final String STORAGE_CAPABILITIES = "storagecapabilities";
     public static final String SYSTEM_VM_TYPE = "systemvmtype";
     public static final String TAGS = "tags";
     public static final String TARGET_IQN = "targetiqn";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
index 7321d98..1c94377 100644
--- a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
@@ -25,6 +25,7 @@ import org.apache.cloudstack.api.BaseResponse;
 import org.apache.cloudstack.api.EntityReference;
 
 import java.util.Date;
+import java.util.Map;
 
 @EntityReference(value=StoragePool.class)
 public class StoragePoolResponse extends BaseResponse {
@@ -93,6 +94,16 @@ public class StoragePoolResponse extends BaseResponse {
             " false otherwise")
     private Boolean suitableForMigration;
 
+    @SerializedName(ApiConstants.STORAGE_CAPABILITIES) @Param(description="the storage pool capabilities")
+    private Map<String, String> caps;
+
+    public Map<String, String> getCaps() {
+        return caps;
+    }
+
+    public void setCaps(Map<String, String> cap) {
+        this.caps = cap;
+    }
     /**
      * @return the scope
      */

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreCapabilities.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreCapabilities.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreCapabilities.java
new file mode 100644
index 0000000..79ce92e
--- /dev/null
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreCapabilities.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cloudstack.engine.subsystem.api.storage;
+
+public enum  DataStoreCapabilities {
+    VOLUME_SNAPSHOT_QUIESCEVM
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
index 127b858..9e7329f 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
@@ -23,7 +23,10 @@ import com.cloud.agent.api.to.DataTO;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.storage.command.CommandResult;
 
+import java.util.Map;
+
 public interface DataStoreDriver {
+    Map<String, String>  getCapabilities();
     DataTO getTO(DataObject data);
     DataStoreTO getStoreTO(DataStore store);
     void createAsync(DataStore store, DataObject data, AsyncCompletionCallback<CreateCmdResult> callback);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDao.java b/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDao.java
new file mode 100644
index 0000000..b216de6
--- /dev/null
+++ b/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDao.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.cloud.storage.dao;
+
+import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.resourcedetail.ResourceDetailsDao;
+
+public interface SnapshotDetailsDao extends GenericDao<SnapshotDetailsVO, Long>, ResourceDetailsDao<SnapshotDetailsVO> {
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDaoImpl.java
new file mode 100644
index 0000000..f8d3813
--- /dev/null
+++ b/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsDaoImpl.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.cloud.storage.dao;
+
+import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase;
+
+public class SnapshotDetailsDaoImpl extends ResourceDetailsDaoBase<SnapshotDetailsVO> implements SnapshotDetailsDao {
+    @Override
+    public void addDetail(long resourceId, String key, String value) {
+        super.addDetail(new SnapshotDetailsVO(resourceId, key, value));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsVO.java b/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsVO.java
new file mode 100644
index 0000000..5406749
--- /dev/null
+++ b/engine/schema/src/com/cloud/storage/dao/SnapshotDetailsVO.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.cloud.storage.dao;
+
+import org.apache.cloudstack.api.ResourceDetail;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "snapshot_details")
+public class SnapshotDetailsVO implements ResourceDetail {
+    @Id
+    @GeneratedValue(strategy= GenerationType.IDENTITY)
+    @Column(name = "id")
+    private long id;
+
+    @Column(name = "snapshot_id")
+    private long resourceId;
+
+    @Column(name = "name")
+    String name;
+
+    @Column(name = "value")
+    String value;
+
+    public SnapshotDetailsVO(Long resourceId, String name, String value) {
+        this.resourceId = resourceId;
+        this.name = name;
+        this.value = value;
+    }
+
+    @Override
+    public long getResourceId() {
+        return resourceId;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getValue() {
+        return value;
+    }
+
+    @Override
+    public boolean isDisplay() {
+        return false;
+    }
+
+    @Override
+    public long getId() {
+        return id;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
index 7eec5ff..69900af 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
@@ -21,6 +21,7 @@ import java.util.List;
 
 import javax.inject.Inject;
 
+import com.cloud.storage.*;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -41,10 +42,6 @@ import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreVO;
 import org.apache.cloudstack.storage.to.SnapshotObjectTO;
 
 import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.storage.DataStoreRole;
-import com.cloud.storage.Snapshot;
-import com.cloud.storage.SnapshotVO;
-import com.cloud.storage.Volume;
 import com.cloud.storage.dao.SnapshotDao;
 import com.cloud.storage.snapshot.SnapshotManager;
 import com.cloud.utils.NumbersUtil;
@@ -260,6 +257,14 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase {
     @Override
     @DB
     public SnapshotInfo takeSnapshot(SnapshotInfo snapshot) {
+        Object payload = snapshot.getPayload();
+        if (payload != null) {
+            CreateSnapshotPayload createSnapshotPayload = (CreateSnapshotPayload)payload;
+            if (createSnapshotPayload.getQuiescevm()) {
+                throw new InvalidParameterValueException("can't handle quiescevm equal true for volume snapshot");
+            }
+        }
+
         SnapshotVO snapshotVO = snapshotDao.acquireInLockTable(snapshot.getId());
         if (snapshotVO == null) {
             throw new CloudRuntimeException("Failed to get lock on snapshot:" + snapshot.getId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
index bd93e73..6a74c45 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
@@ -21,17 +21,14 @@ package org.apache.cloudstack.storage.image;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.inject.Inject;
 
+import org.apache.cloudstack.engine.subsystem.api.storage.*;
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
-import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
-import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcContext;
@@ -87,6 +84,11 @@ public abstract class BaseImageStoreDriverImpl implements ImageStoreDriver {
     }
 
     @Override
+    public Map<String, String> getCapabilities() {
+        return null;
+    }
+
+    @Override
     public DataTO getTO(DataObject data) {
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
index be7c77d..aa60ce6 100644
--- a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
+++ b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
@@ -18,16 +18,15 @@
  */
 package org.apache.cloudstack.storage.datastore.driver;
 
+import java.util.HashMap;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.inject.Inject;
 
+import org.apache.cloudstack.engine.subsystem.api.storage.*;
 import org.apache.log4j.Logger;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
-import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.image.BaseImageStoreDriverImpl;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity;
@@ -49,7 +48,6 @@ public class CloudStackImageStoreDriverImpl extends BaseImageStoreDriverImpl {
     @Inject
     EndPointSelector _epSelector;
 
-
     @Override
     public DataStoreTO getStoreTO(DataStore store) {
         ImageStoreImpl nfsStore = (ImageStoreImpl) store;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
index 9da29d6..c9f9dd1 100644
--- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
+++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java
@@ -18,27 +18,19 @@
  */
 package org.apache.cloudstack.storage.datastore.driver;
 
+import java.util.HashMap;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.inject.Inject;
 
 import com.cloud.storage.*;
 
+import org.apache.cloudstack.engine.subsystem.api.storage.*;
 import org.apache.cloudstack.storage.to.SnapshotObjectTO;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
-import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
-import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
-import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
-import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
-import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
-import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
-import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory;
-import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.storage.command.CommandResult;
@@ -104,7 +96,12 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
     public DataTO getTO(DataObject data) {
         return null;
     }
-
+    @Override
+    public Map<String, String> getCapabilities() {
+        Map<String, String> caps = new HashMap<String, String>();
+        caps.put(DataStoreCapabilities.VOLUME_SNAPSHOT_QUIESCEVM.toString(), "false");
+        return caps;
+    }
     @Override
     public DataStoreTO getStoreTO(DataStore store) {
         return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
index 302cb09..67e0a71 100644
--- a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
+++ b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
@@ -45,6 +45,9 @@ import com.cloud.storage.Volume;
 import com.cloud.storage.dao.StoragePoolHostDao;
 import com.cloud.utils.exception.CloudRuntimeException;
 
+import java.util.HashMap;
+import java.util.Map;
+
 public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver {
     private static final Logger s_logger = Logger.getLogger(SamplePrimaryDataStoreDriverImpl.class);
     @Inject
@@ -59,6 +62,11 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     }
 
     @Override
+    public Map<String, String> getCapabilities() {
+        return null;
+    }
+
+    @Override
     public DataTO getTO(DataObject data) {
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
index 8a98b62..1b1e238 100644
--- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
+++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java
@@ -17,18 +17,13 @@
 package org.apache.cloudstack.storage.datastore.driver;
 
 import java.text.NumberFormat;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
-import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
-import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
-import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
-import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.*;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
@@ -64,6 +59,11 @@ public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
     @Inject private AccountDetailsDao _accountDetailsDao;
 
     @Override
+    public Map<String, String> getCapabilities() {
+        return null;
+    }
+
+    @Override
     public DataTO getTO(DataObject data) {
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/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 e74159c..036b9bb 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -83,6 +83,9 @@ import org.apache.cloudstack.api.response.UserVmResponse;
 import org.apache.cloudstack.api.response.VolumeResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.query.QueryService;
@@ -342,6 +345,8 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
     
     @Inject
     ResourceTagDao _resourceTagDao;
+    @Inject
+    DataStoreManager dataStoreManager;
 
     /*
      * (non-Javadoc)
@@ -1999,6 +2004,16 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
 
         List<StoragePoolResponse> poolResponses = ViewResponseHelper.createStoragePoolResponse(result.first().toArray(
                 new StoragePoolJoinVO[result.first().size()]));
+        for(StoragePoolResponse poolResponse : poolResponses) {
+            DataStore store = dataStoreManager.getPrimaryDataStore(Integer.parseInt(poolResponse.getId()));
+            if (store != null) {
+                DataStoreDriver driver = store.getDriver();
+                if (driver != null && driver.getCapabilities() != null) {
+                    poolResponse.setCaps(driver.getCapabilities());
+                }
+            }
+        }
+
         response.setResponses(poolResponses, result.second());
         return response;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/70fed9f3/setup/db/db/schema-421to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index 77e3641..8be0fb1 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -52,6 +52,15 @@ CREATE TABLE `cloud`.`vm_snapshot_details` (
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
+DROP TABLE IF EXISTS `cloud`.`snapshot_details`;
+CREATE TABLE `cloud`.`snapshot_details` (
+  `id` bigint unsigned UNIQUE NOT NULL,
+  `snapshot_id` bigint unsigned NOT NULL,
+  `name` varchar(255) NOT NULL,
+  `value` varchar(255) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
 CREATE TABLE `cloud`.`vm_work_job` (
   `id` bigint unsigned UNIQUE NOT NULL,
   `step` char(32) NOT NULL COMMENT 'state',


[3/3] git commit: updated refs/heads/4.3 to 4de858c

Posted by ed...@apache.org.
Expose getPrimaryDataStore(String uuid) through the DatastoreManager interface so it can be used clients.


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

Branch: refs/heads/4.3
Commit: 4de858c7a96cba5e406cf43cac2fa7d5a5656443
Parents: c714a9f
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Mon Nov 18 14:11:18 2013 +0100
Committer: Edison Su <su...@gmail.com>
Committed: Fri Nov 22 16:22:38 2013 -0800

----------------------------------------------------------------------
 .../engine/subsystem/api/storage/DataStoreManager.java          | 2 ++
 .../cloudstack/storage/datastore/DataStoreManagerImpl.java      | 5 +++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4de858c7/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java
index 7fbec0a..210d4ae 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java
@@ -27,6 +27,8 @@ public interface DataStoreManager {
 
     DataStore getPrimaryDataStore(long storeId);
 
+    DataStore getPrimaryDataStore(String storeUuid);
+
     DataStore getDataStore(String uuid, DataStoreRole role);
 
     List<DataStore> getImageStoresByScope(ZoneScope scope);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4de858c7/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
index 88061aa..e6b2715 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
@@ -88,6 +88,11 @@ public class DataStoreManagerImpl implements DataStoreManager {
     }
 
     @Override
+    public DataStore getPrimaryDataStore(String storeUuid) {
+        return primaryStoreMgr.getPrimaryDataStore(storeUuid);
+    }
+
+    @Override
     public List<DataStore> getImageCacheStores(Scope scope) {
         return imageDataStoreMgr.listImageCacheStores(scope);
     }


[2/3] git commit: updated refs/heads/4.3 to 4de858c

Posted by ed...@apache.org.
StoragePoolResponse.getId() returns a String with an UUID


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

Branch: refs/heads/4.3
Commit: c714a9f3db7f245f9243e723719e06bd39dd989f
Parents: 70fed9f
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Mon Nov 18 14:26:24 2013 +0100
Committer: Edison Su <su...@gmail.com>
Committed: Fri Nov 22 16:21:18 2013 -0800

----------------------------------------------------------------------
 .../com/cloud/api/query/QueryManagerImpl.java   | 70 +++++++++-----------
 1 file changed, 33 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c714a9f3/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 036b9bb..36fab21 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -26,8 +26,9 @@ import java.util.Set;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import com.cloud.hypervisor.Hypervisor;
-import com.cloud.storage.DiskOfferingVO;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
 import org.apache.cloudstack.acl.ControlledEntity.ACLType;
 import org.apache.cloudstack.affinity.AffinityGroupDomainMapVO;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
@@ -89,8 +90,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.query.QueryService;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
 
 import com.cloud.api.query.dao.AccountJoinDao;
 import com.cloud.api.query.dao.AffinityGroupJoinDao;
@@ -144,6 +143,7 @@ import com.cloud.exception.CloudAuthenticationException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.PermissionDeniedException;
 import com.cloud.ha.HighAvailabilityManager;
+import com.cloud.hypervisor.Hypervisor;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.dao.NetworkDetailsDao;
 import com.cloud.network.security.SecurityGroupVMMapVO;
@@ -164,6 +164,7 @@ import com.cloud.server.TaggedResourceService;
 import com.cloud.service.ServiceOfferingVO;
 import com.cloud.service.dao.ServiceOfferingDao;
 import com.cloud.storage.DataStoreRole;
+import com.cloud.storage.DiskOfferingVO;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.Storage;
 import com.cloud.storage.Storage.ImageFormat;
@@ -177,7 +178,6 @@ import com.cloud.tags.dao.ResourceTagDao;
 import com.cloud.template.VirtualMachineTemplate.TemplateFilter;
 import com.cloud.user.Account;
 import com.cloud.user.AccountManager;
-import com.cloud.user.AccountVO;
 import com.cloud.user.DomainManager;
 import com.cloud.user.dao.AccountDao;
 import com.cloud.utils.DateUtil;
@@ -342,7 +342,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
 
     @Inject
     NetworkDetailsDao _networkDetailsDao;
-    
+
     @Inject
     ResourceTagDao _resourceTagDao;
     @Inject
@@ -359,7 +359,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
     public ListResponse<UserResponse> searchForUsers(ListUsersCmd cmd) throws PermissionDeniedException {
         Pair<List<UserAccountJoinVO>, Integer> result = searchForUsersInternal(cmd);
         ListResponse<UserResponse> response = new ListResponse<UserResponse>();
-        List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(CallContext.current().getCallingAccount().getDomainId(), 
+        List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(CallContext.current().getCallingAccount().getDomainId(),
                 result.first().toArray(new UserAccountJoinVO[result.first().size()]));
         response.setResponses(userResponses, result.second());
         return response;
@@ -1267,7 +1267,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         Long pageSize = cmd.getPageSizeVal();
         boolean listAll = cmd.listAll();
         boolean isRecursive = cmd.isRecursive();
-        Map<String, String> tags = cmd.getTags();
+        cmd.getTags();
 
         Account caller = CallContext.current().getCallingAccount();
         Long accountId = null;
@@ -1499,7 +1499,6 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         sb.and("accountRole", sb.entity().getAccountRole(), Op.EQ);
         sb.and("projectId", sb.entity().getProjectId(), Op.EQ);
 
-        SearchBuilder<AccountVO> accountSearch;
         if (accountName != null) {
             sb.and("accountName", sb.entity().getAccountName(), Op.EQ);
         }
@@ -1758,7 +1757,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         if (podId != null) {
             sc.setParameters("podId", podId);
         }
-        
+
         if (storageId != null) {
             sc.setParameters("storageId", storageId);
         }
@@ -1945,7 +1944,6 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         Filter searchFilter = new Filter(AsyncJobJoinVO.class, "id", true, cmd.getStartIndex(), cmd.getPageSizeVal());
         SearchBuilder<AsyncJobJoinVO> sb = _jobJoinDao.createSearchBuilder();
         sb.and("accountIdIN", sb.entity().getAccountId(), SearchCriteria.Op.IN);
-        SearchBuilder<AccountVO> accountSearch = null;
         boolean accountJoinIsDone = false;
         if (permittedAccounts.isEmpty() && domainId != null) {
             sb.and("domainId", sb.entity().getDomainId(), SearchCriteria.Op.EQ);
@@ -2005,7 +2003,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         List<StoragePoolResponse> poolResponses = ViewResponseHelper.createStoragePoolResponse(result.first().toArray(
                 new StoragePoolJoinVO[result.first().size()]));
         for(StoragePoolResponse poolResponse : poolResponses) {
-            DataStore store = dataStoreManager.getPrimaryDataStore(Integer.parseInt(poolResponse.getId()));
+            DataStore store = dataStoreManager.getPrimaryDataStore(poolResponse.getId());
             if (store != null) {
                 DataStoreDriver driver = store.getDriver();
                 if (driver != null && driver.getCapabilities() != null) {
@@ -2420,7 +2418,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         isAscending = (isAscending == null ? true : isAscending);
         Filter searchFilter = new Filter(ServiceOfferingJoinVO.class, "sortKey", isAscending, cmd.getStartIndex(),
                 cmd.getPageSizeVal());
-        
+
         Account caller = CallContext.current().getCallingAccount();
         Object name = cmd.getServiceOfferingName();
         Object id = cmd.getId();
@@ -2429,7 +2427,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         Long domainId = cmd.getDomainId();
         Boolean isSystem = cmd.getIsSystem();
         String vmTypeStr = cmd.getSystemVmType();
-        
+
         SearchCriteria<ServiceOfferingJoinVO> sc = _srvOfferingJoinDao.createSearchCriteria();
 
         if (caller.getType() != Account.ACCOUNT_TYPE_ADMIN && isSystem) {
@@ -2480,18 +2478,18 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             List<Long> domainIds = new ArrayList<Long>();
             DomainVO domainRecord;
             if (vmId != null) {
-                 UserVmVO vmInstance = _userVmDao.findById(vmId);
-                 domainRecord = _domainDao.findById(vmInstance.getDomainId());
-                 if ( domainRecord == null ){
-                     s_logger.error("Could not find the domainId for vmId:" + vmId);
-                     throw new CloudAuthenticationException("Could not find the domainId for vmId:" + vmId);
-                 }
+                UserVmVO vmInstance = _userVmDao.findById(vmId);
+                domainRecord = _domainDao.findById(vmInstance.getDomainId());
+                if ( domainRecord == null ){
+                    s_logger.error("Could not find the domainId for vmId:" + vmId);
+                    throw new CloudAuthenticationException("Could not find the domainId for vmId:" + vmId);
+                }
             } else {
-                 domainRecord = _domainDao.findById(caller.getDomainId());
-                 if ( domainRecord == null ){
-                     s_logger.error("Could not find the domainId for account:" + caller.getAccountName());
-                     throw new CloudAuthenticationException("Could not find the domainId for account:" + caller.getAccountName());
-                 }
+                domainRecord = _domainDao.findById(caller.getDomainId());
+                if ( domainRecord == null ){
+                    s_logger.error("Could not find the domainId for account:" + caller.getAccountName());
+                    throw new CloudAuthenticationException("Could not find the domainId for account:" + caller.getAccountName());
+                }
             }
             domainIds.add(domainRecord.getId());
             while (domainRecord.getParent() != null) {
@@ -2562,7 +2560,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         String name = cmd.getName();
         String networkType = cmd.getNetworkType();
         Map<String, String> resourceTags = cmd.getTags();
-        
+
         SearchBuilder<DataCenterJoinVO> sb = _dcJoinDao.createSearchBuilder();
         if (resourceTags != null && !resourceTags.isEmpty()) {
             SearchBuilder<ResourceTagVO> tagSearch = _resourceTagDao.createSearchBuilder();
@@ -2575,7 +2573,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             sb.groupBy(sb.entity().getId());
             sb.join("tagSearch", tagSearch, sb.entity().getId(), tagSearch.entity().getResourceId(), JoinBuilder.JoinType.INNER);
         }
-        
+
         Filter searchFilter = new Filter(DataCenterJoinVO.class, null, false, cmd.getStartIndex(), cmd.getPageSizeVal());
         SearchCriteria<DataCenterJoinVO> sc = sb.create();
 
@@ -2726,7 +2724,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                 }
             }
         }
-        
+
         if (resourceTags != null && !resourceTags.isEmpty()) {
             int count = 0;
             sc.setJoinParameters("tagSearch", "resourceType", ResourceObjectType.Zone.toString());
@@ -2923,7 +2921,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                     }
 
                     // get all child domain ID's
-                    if (_accountMgr.isAdmin(account.getType()) 
+                    if (_accountMgr.isAdmin(account.getType())
                             || (templateFilter == TemplateFilter.featured || templateFilter == TemplateFilter.community)) {
                         List<DomainVO> allChildDomains = _domainDao.findAllChildren(accountDomain.getPath(),
                                 accountDomain.getId());
@@ -2980,7 +2978,6 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             // add tags criteria
             if (tags != null && !tags.isEmpty()) {
                 SearchCriteria<TemplateJoinVO> scc = _templateJoinDao.createSearchCriteria();
-                int count = 0;
                 for (String key : tags.keySet()) {
                     SearchCriteria<TemplateJoinVO> scTag = _templateJoinDao.createSearchCriteria();
                     scTag.addAnd("tagKey", SearchCriteria.Op.EQ, key);
@@ -2991,7 +2988,6 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                         scTag.addAnd("tagResourceType", SearchCriteria.Op.EQ, ResourceObjectType.Template);
                     }
                     scc.addOr("tagKey", SearchCriteria.Op.SC, scTag);
-                    count++;
                 }
                 sc.addAnd("tagKey", SearchCriteria.Op.SC, scc);
             }
@@ -3140,7 +3136,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
 
         Account caller = CallContext.current().getCallingAccount();
 
-        Long accountId = caller.getAccountId();
+        caller.getAccountId();
 
         if (vmId != null) {
             UserVmVO userVM = _userVmDao.findById(vmId);
@@ -3164,7 +3160,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         Filter searchFilter = new Filter(AffinityGroupJoinVO.class, "id", true, startIndex, pageSize);
         SearchCriteria<AffinityGroupJoinVO> sc = buildAffinityGroupSearchCriteria(domainId, isRecursive,
                 permittedAccounts, listProjectResourcesCriteria, affinityGroupId, affinityGroupName, affinityGroupType);
-        
+
         Pair<List<AffinityGroupJoinVO>, Integer> uniqueGroupsPair = _affinityGroupJoinDao.searchAndCount(sc,
                 searchFilter);
         // search group details by ids
@@ -3307,7 +3303,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         ResourceTag.ResourceObjectType resourceType = cmd.getResourceType();
         String resourceIdStr = cmd.getResourceId();
         long resourceId = _taggedResourceMgr.getResourceId(resourceIdStr, resourceType);
-        List<? extends ResourceDetail> detailList = new ArrayList<ResourceDetail>();        
+        List<? extends ResourceDetail> detailList = new ArrayList<ResourceDetail>();
         ResourceDetail requestedDetail = null;
 
         if (key == null) {
@@ -3318,7 +3314,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                 requestedDetail = null;
             }
         }
-        
+
         List<ResourceDetailResponse> responseList = new ArrayList<ResourceDetailResponse>();
         if (requestedDetail != null) {
             ResourceDetailResponse detailResponse = createResourceDetailsResponse(requestedDetail, resourceType);
@@ -3329,11 +3325,11 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                 responseList.add(detailResponse);
             }
         }
-        
+
         return responseList;
     }
 
-    
+
     protected ResourceDetailResponse createResourceDetailsResponse(ResourceDetail requestedDetail, ResourceTag.ResourceObjectType resourceType) {
         ResourceDetailResponse resourceDetailResponse = new ResourceDetailResponse();
         resourceDetailResponse.setResourceId(String.valueOf(requestedDetail.getResourceId()));