cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [2/3] git commit: updated refs/heads/object_store to 1b8e7ab
Date Tue, 07 May 2013 01:37:52 GMT
volume related operation works


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

Branch: refs/heads/object_store
Commit: 2d544e7127a195c07fd10b5b9482df33c15fa77d
Parents: fdee284
Author: Edison Su <sudison@gmail.com>
Authored: Mon May 6 13:52:55 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Mon May 6 18:27:15 2013 -0700

----------------------------------------------------------------------
 .../CopyTemplateToPrimaryStorageAnswer.java        |   17 +++
 .../subsystem/api/storage/CommandResult.java       |   52 --------
 .../subsystem/api/storage/CopyCommandResult.java   |    2 +
 .../subsystem/api/storage/CreateCmdResult.java     |    3 +
 .../subsystem/api/storage/DataStoreDriver.java     |    1 +
 .../api/storage/PrimaryDataStoreDriver.java        |    1 +
 .../subsystem/api/storage/SnapshotResult.java      |    2 +
 .../subsystem/api/storage/TemplateService.java     |    1 +
 .../subsystem/api/storage/VolumeService.java       |    1 +
 .../storage/command/AttachPrimaryDataStoreCmd.java |    1 +
 .../cloudstack/storage/command/CommandResult.java  |   52 ++++++++
 .../cloudstack/storage/command/CopyCmdAnswer.java  |    1 +
 .../CopyTemplateToPrimaryStorageAnswer.java        |   16 ---
 .../storage/command/CreatePrimaryDataStoreCmd.java |    1 +
 .../cloudstack/storage/command/DeleteCommand.java  |   12 +-
 .../cloudstack/storage/to/VolumeObjectTO.java      |   11 ++-
 .../cache/manager/StorageCacheManagerImpl.java     |    2 +-
 .../storage/image/TemplateServiceImpl.java         |    6 +-
 .../storage/test/CloudStackTestNGBase.java         |   14 ++-
 .../cloudstack/storage/test/SnapshotTest.java      |   23 ++++
 .../cloudstack/storage/test/TemplateTest.java      |    5 +
 .../apache/cloudstack/storage/test/VolumeTest.java |   92 ++++++++++++++-
 .../cloudstack/storage/test/volumeServiceTest.java |    2 +-
 .../storage/snapshot/SnapshotServiceImpl.java      |    2 +-
 .../storage/datastore/DataObjectManager.java       |    2 +-
 .../storage/datastore/DataObjectManagerImpl.java   |    2 +-
 .../storage/image/motion/ImageMotionService.java   |    2 +-
 .../cloudstack/storage/volume/VolumeObject.java    |    8 ++
 .../storage/volume/VolumeServiceImpl.java          |    4 +-
 .../xen/resource/CitrixResourceBase.java           |    3 +-
 .../xen/resource/XenServerStorageResource.java     |   29 +++--
 .../driver/CloudStackImageStoreDriverImpl.java     |    2 +-
 .../datastore/driver/S3ImageStoreDriverImpl.java   |    2 +-
 .../driver/SampleImageStoreDriverImpl.java         |    2 +-
 .../driver/SwiftImageStoreDriverImpl.java          |    2 +-
 .../CloudStackPrimaryDataStoreDriverImpl.java      |   27 ++---
 .../driver/SamplePrimaryDataStoreDriverImpl.java   |    2 +-
 .../driver/SolidfirePrimaryDataStoreDriver.java    |    2 +-
 server/src/com/cloud/storage/TemplateProfile.java  |    1 +
 .../cloud/template/HypervisorTemplateAdapter.java  |    2 +-
 .../com/cloud/template/TemplateManagerImpl.java    |    2 +-
 41 files changed, 286 insertions(+), 128 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/api/src/com/cloud/agent/api/storage/CopyTemplateToPrimaryStorageAnswer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/storage/CopyTemplateToPrimaryStorageAnswer.java b/api/src/com/cloud/agent/api/storage/CopyTemplateToPrimaryStorageAnswer.java
new file mode 100644
index 0000000..ecc8e57
--- /dev/null
+++ b/api/src/com/cloud/agent/api/storage/CopyTemplateToPrimaryStorageAnswer.java
@@ -0,0 +1,17 @@
+package com.cloud.agent.api.storage;
+// 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.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java
deleted file mode 100644
index 6b6139b..0000000
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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 class CommandResult {
-    private boolean success;
-    private String result;
-    public CommandResult() {
-        this.success = true;
-        this.result = "";
-    }
-   
-    public boolean isSuccess() {
-        return this.success;
-    }
-    
-    public boolean isFailed() {
-        return !this.success;
-    }
-    
-    public void setSucess(boolean success) {
-        this.success = success;
-    }
-    
-    public String getResult() {
-        return this.result;
-    }
-    
-    public void setResult(String result) {
-        this.result = result;
-        if (result != null) {
-            this.success = false;
-        }
-    }
-}
- 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java
index 571a77c..e9d7b11 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java
@@ -18,6 +18,8 @@
  */
 package org.apache.cloudstack.engine.subsystem.api.storage;
 
+import org.apache.cloudstack.storage.command.CommandResult;
+
 import com.cloud.agent.api.Answer;
 
 public class CopyCommandResult extends CommandResult {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java
index 4b78e54..2ecd97d 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java
@@ -18,6 +18,8 @@
  */
 package org.apache.cloudstack.engine.subsystem.api.storage;
 
+import org.apache.cloudstack.storage.command.CommandResult;
+
 import com.cloud.agent.api.Answer;
 
 public class CreateCmdResult extends CommandResult {
@@ -26,6 +28,7 @@ public class CreateCmdResult extends CommandResult {
     public CreateCmdResult(String path, Answer answer) {
         super();
         this.path = path;
+        this.answer = answer;
     }
     
     public String getPath() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/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 e4986d6..cd2dc86 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
@@ -21,6 +21,7 @@ package org.apache.cloudstack.engine.subsystem.api.storage;
 import java.util.Set;
 
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 
 import com.cloud.agent.api.to.DataStoreTO;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
index 78a1014..4f0f99d 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
@@ -19,6 +19,7 @@
 package org.apache.cloudstack.engine.subsystem.api.storage;
 
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 
 public interface PrimaryDataStoreDriver extends DataStoreDriver {
     public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCmdResult> callback);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotResult.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotResult.java
index 29d094f..21c0ea0 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotResult.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotResult.java
@@ -1,6 +1,8 @@
 package org.apache.cloudstack.engine.subsystem.api.storage;
 
 
+import org.apache.cloudstack.storage.command.CommandResult;
+
 import com.cloud.agent.api.Answer;
 
 public class SnapshotResult extends CommandResult {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java
index b0f9f37..5e0c9f2 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java
@@ -20,6 +20,7 @@ package org.apache.cloudstack.engine.subsystem.api.storage;
 
 import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
index 8bca479..0f6caa3 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
@@ -20,6 +20,7 @@ package org.apache.cloudstack.engine.subsystem.api.storage;
 
 import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity;
 import org.apache.cloudstack.framework.async.AsyncCallFuture;
+import org.apache.cloudstack.storage.command.CommandResult;
 
 import com.cloud.exception.ConcurrentOperationException;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java b/engine/api/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java
index 8aaca94..15573a0 100644
--- a/engine/api/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java
+++ b/engine/api/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java
@@ -18,6 +18,7 @@
  */
 package org.apache.cloudstack.storage.command;
 
+
 import com.cloud.agent.api.Command;
 
 public class AttachPrimaryDataStoreCmd extends Command implements StorageSubSystemCommand {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/storage/command/CommandResult.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/CommandResult.java b/engine/api/src/org/apache/cloudstack/storage/command/CommandResult.java
new file mode 100644
index 0000000..c1a97ad
--- /dev/null
+++ b/engine/api/src/org/apache/cloudstack/storage/command/CommandResult.java
@@ -0,0 +1,52 @@
+/*
+ * 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.storage.command;
+
+public class CommandResult {
+    private boolean success;
+    private String result;
+    public CommandResult() {
+        this.success = true;
+        this.result = "";
+    }
+   
+    public boolean isSuccess() {
+        return this.success;
+    }
+    
+    public boolean isFailed() {
+        return !this.success;
+    }
+    
+    public void setSucess(boolean success) {
+        this.success = success;
+    }
+    
+    public String getResult() {
+        return this.result;
+    }
+    
+    public void setResult(String result) {
+        this.result = result;
+        if (result != null) {
+            this.success = false;
+        }
+    }
+}
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java b/engine/api/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java
index 4105d62..3612cf9 100644
--- a/engine/api/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java
+++ b/engine/api/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java
@@ -16,6 +16,7 @@
 // under the License.
 package org.apache.cloudstack.storage.command;
 
+
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 
 import com.cloud.agent.api.Answer;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/storage/command/CopyTemplateToPrimaryStorageAnswer.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/CopyTemplateToPrimaryStorageAnswer.java b/engine/api/src/org/apache/cloudstack/storage/command/CopyTemplateToPrimaryStorageAnswer.java
deleted file mode 100644
index b248758..0000000
--- a/engine/api/src/org/apache/cloudstack/storage/command/CopyTemplateToPrimaryStorageAnswer.java
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java b/engine/api/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java
index 0e50950..59ed0a8 100644
--- a/engine/api/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java
+++ b/engine/api/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java
@@ -16,6 +16,7 @@
 // under the License.
 package org.apache.cloudstack.storage.command;
 
+
 import com.cloud.agent.api.Command;
 
 public class CreatePrimaryDataStoreCmd extends Command implements StorageSubSystemCommand {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/storage/command/DeleteCommand.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/DeleteCommand.java b/engine/api/src/org/apache/cloudstack/storage/command/DeleteCommand.java
index 3f62100..3335848 100644
--- a/engine/api/src/org/apache/cloudstack/storage/command/DeleteCommand.java
+++ b/engine/api/src/org/apache/cloudstack/storage/command/DeleteCommand.java
@@ -18,14 +18,14 @@
  */
 package org.apache.cloudstack.storage.command;
 
-import org.apache.cloudstack.storage.to.VolumeObjectTO;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 
 import com.cloud.agent.api.Command;
 
 public class DeleteCommand extends Command implements StorageSubSystemCommand {
-    private String uri;
-    public DeleteCommand(String uri) {
-        this.uri = uri;
+    private  DataTO data;
+    public DeleteCommand(DataTO data) {
+        this.data = data;
     }
     
     protected DeleteCommand() {
@@ -37,8 +37,8 @@ public class DeleteCommand extends Command implements StorageSubSystemCommand {
         return false;
     }
     
-    public String getUri() {
-        return this.uri;
+    public DataTO getData() {
+        return this.data;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/api/src/org/apache/cloudstack/storage/to/VolumeObjectTO.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/to/VolumeObjectTO.java b/engine/api/src/org/apache/cloudstack/storage/to/VolumeObjectTO.java
index 5e6ca2b..3f7a8f1 100644
--- a/engine/api/src/org/apache/cloudstack/storage/to/VolumeObjectTO.java
+++ b/engine/api/src/org/apache/cloudstack/storage/to/VolumeObjectTO.java
@@ -33,6 +33,7 @@ public class VolumeObjectTO implements DataTO {
     private long size;
     private String path;
     private Long volumeId;
+    private String vmName;
     private long accountId;
 
     public VolumeObjectTO() {
@@ -48,7 +49,7 @@ public class VolumeObjectTO implements DataTO {
         } else {
             this.dataStore = null;
         }
-        //this.name = volume.getName();
+        this.vmName = volume.getAttachedVmName();
         this.size = volume.getSize();
         this.setVolumeId(volume.getId());
     }
@@ -121,5 +122,13 @@ public class VolumeObjectTO implements DataTO {
         this.accountId = accountId;
     }
 
+    public String getVmName() {
+        return vmName;
+    }
+
+    public void setVmName(String vmName) {
+        this.vmName = vmName;
+    }
+
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
index 3a445d4..1452e17 100644
--- a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
+++ b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/manager/StorageCacheManagerImpl.java
@@ -25,7 +25,6 @@ import java.util.concurrent.ExecutionException;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataMotionService;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
@@ -38,6 +37,7 @@ import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
 import org.apache.cloudstack.storage.cache.allocator.StorageCacheAllocator;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.CopyCmdAnswer;
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 30c7183..8e3f892 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -29,7 +29,6 @@ import java.util.Set;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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.DataMotionService;
@@ -51,6 +50,7 @@ import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.DataObjectManager;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
@@ -377,7 +377,7 @@ public class TemplateServiceImpl implements TemplateService {
             }
         }
 
-        for (String uniqueName : templateInfos.keySet()) {
+       /* for (String uniqueName : templateInfos.keySet()) {
             TemplateProp tInfo = templateInfos.get(uniqueName);
             List<UserVmVO> userVmUsingIso = _userVmDao.listByIsoId(tInfo.getId());
             //check if there is any Vm using this ISO.
@@ -396,7 +396,7 @@ public class TemplateServiceImpl implements TemplateService {
                 }
 
             }
-        }
+        }*/
 
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java
index 4ea3d3f..4d60078 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java
@@ -43,6 +43,7 @@ public class CloudStackTestNGBase extends AbstractTestNGSpringContextTests {
     private String s3SecretKey;
     private String s3EndPoint;
     private String s3TemplateBucket;
+    private String primaryStorageUuid;
     private boolean s3UseHttps;
 
     protected void injectMockito() {
@@ -70,11 +71,11 @@ public class CloudStackTestNGBase extends AbstractTestNGSpringContextTests {
 
     @Parameters({"devcloud-host-uuid", "devcloud-host-gateway", "devcloud-host-cidr",
         "devcloud-host-ip", "template-url", "devcloud-local-storage-uuid",
-        "primary-storage-want-to-add", "devcloud-secondary-storage", "s3-accesskey", "s3-secretkey", "s3-endpoint", "s3-template-bucket", "s3-usehttps", "image-install-path"})
+        "primary-storage-want-to-add", "devcloud-secondary-storage", "s3-accesskey", "s3-secretkey", "s3-endpoint", "s3-template-bucket", "s3-usehttps", "image-install-path", "primary-storage-uuid-want-to-add"})
     protected void setup(String hostuuid, String gateway, String cidr,
             String hostIp, String templateUrl, String localStorageUuid,
             String primaryStorage, String secondaryStorage, String s3_accessKey, String s3_secretKey, String s3_endpoint, String s3_template_bucket,
-            String s3_usehttps, String imageInstallPath) {
+            String s3_usehttps, String imageInstallPath, String primaryStorageUuid) {
         this.hostGuid = hostuuid;
         this.hostGateway = gateway;
         this.hostCidr = cidr;
@@ -82,6 +83,7 @@ public class CloudStackTestNGBase extends AbstractTestNGSpringContextTests {
         this.templateUrl = templateUrl;
         this.localStorageUuid = localStorageUuid;
         this.primaryStorageUrl = primaryStorage;
+        this.primaryStorageUuid = primaryStorageUuid;
         this.imageInstallPath = imageInstallPath;
         this.setSecondaryStorage(secondaryStorage);
         // set S3 parameters
@@ -157,4 +159,12 @@ public class CloudStackTestNGBase extends AbstractTestNGSpringContextTests {
         this.imageInstallPath = imageInstallPath;
     }
 
+    public String getPrimaryStorageUuid() {
+        return primaryStorageUuid;
+    }
+
+    public void setPrimaryStorageUuid(String primaryStorageUuid) {
+        this.primaryStorageUuid = primaryStorageUuid;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
new file mode 100644
index 0000000..afd63f5
--- /dev/null
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.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.storage.test;
+
+public class SnapshotTest {
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TemplateTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TemplateTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TemplateTest.java
index ff540d9..164cced 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TemplateTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TemplateTest.java
@@ -26,11 +26,14 @@ import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.Storage;
+import com.cloud.storage.TemplateProfile;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.Storage.TemplateType;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.storage.download.DownloadMonitor;
 import com.cloud.storage.download.DownloadMonitorImpl;
+import com.cloud.template.HypervisorTemplateAdapter;
+import com.cloud.template.TemplateAdapter;
 import com.cloud.utils.component.ComponentContext;
 
 @ContextConfiguration(locations={"classpath:/storageContext.xml"})
@@ -53,6 +56,8 @@ public class TemplateTest extends CloudStackTestNGBase {
 	EndPointSelector epSelector;
 	@Inject
 	DownloadMonitorImpl downloadMonitor;
+
+	
 	long dcId;
 	long templateId;
 	

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
index c4a1d01..0171545 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
+import java.util.concurrent.ExecutionException;
 
 import javax.inject.Inject;
 
@@ -37,6 +38,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManag
 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.ObjectInDataStoreStateMachine.Event;
+import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService.VolumeApiResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk;
@@ -44,6 +46,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService;
+import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.storage.LocalHostEndpoint;
 import org.apache.cloudstack.storage.RemoteHostEndPoint;
 import org.apache.cloudstack.storage.command.CopyCmdAnswer;
@@ -58,6 +61,7 @@ import org.apache.cloudstack.storage.volume.db.VolumeDao2;
 import org.apache.cloudstack.storage.volume.db.VolumeVO;
 import org.mockito.Mockito;
 import org.springframework.test.context.ContextConfiguration;
+import org.testng.AssertJUnit;
 import org.testng.annotations.Test;
 
 import com.cloud.agent.AgentManager;
@@ -68,6 +72,7 @@ import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.dao.ClusterDao;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.HostPodDao;
+import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.host.Host;
 import com.cloud.host.Host.Type;
 import com.cloud.host.HostVO;
@@ -78,9 +83,12 @@ import com.cloud.org.Managed.ManagedState;
 import com.cloud.resource.ResourceManager;
 import com.cloud.resource.ResourceState;
 import com.cloud.storage.DataStoreRole;
+import com.cloud.storage.ScopeType;
 import com.cloud.storage.Storage;
+import com.cloud.storage.StoragePoolStatus;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.storage.VMTemplateVO;
+import com.cloud.storage.Storage.StoragePoolType;
 import com.cloud.storage.Storage.TemplateType;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.utils.component.ComponentContext;
@@ -255,7 +263,7 @@ public class VolumeTest extends CloudStackTestNGBase {
                 return this.dataStoreMgr.getPrimaryDataStore(pools.get(0).getId());
             }
             
-            DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("cloudstack primary data store provider");
+            /*DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("cloudstack primary data store provider");
             Map<String, Object> params = new HashMap<String, Object>();
             URI uri = new URI(this.getPrimaryStorageUrl());
             params.put("url", this.getPrimaryStorageUrl());
@@ -274,7 +282,24 @@ public class VolumeTest extends CloudStackTestNGBase {
             DataStoreLifeCycle lifeCycle = provider.getDataStoreLifeCycle();
             DataStore store = lifeCycle.initialize(params);
             ClusterScope scope = new ClusterScope(clusterId, podId, dcId);
-            lifeCycle.attachCluster(store, scope);
+            lifeCycle.attachCluster(store, scope);*/
+            
+            StoragePoolVO pool = new StoragePoolVO();
+            pool.setClusterId(clusterId);
+            pool.setDataCenterId(dcId);
+            URI uri = new URI(this.getPrimaryStorageUrl());
+            pool.setHostAddress(uri.getHost());
+            pool.setPath(uri.getPath());
+            pool.setPort(0);
+            pool.setName(this.primaryName);
+            pool.setUuid(this.getPrimaryStorageUuid());
+            pool.setStatus(StoragePoolStatus.Up);
+            pool.setPoolType(StoragePoolType.NetworkFilesystem);
+            pool.setPodId(podId);
+            pool.setScope(ScopeType.CLUSTER);
+            pool.setStorageProviderName("cloudstack primary data store provider");
+            pool = this.primaryStoreDao.persist(pool);
+            DataStore store = this.dataStoreMgr.getPrimaryDataStore(pool.getId());
             return store;
         } catch (Exception e) {
             return null;
@@ -283,18 +308,75 @@ public class VolumeTest extends CloudStackTestNGBase {
     
     private VolumeVO createVolume(Long templateId, long dataStoreId) {
         VolumeVO volume = new VolumeVO(1000, new RootDisk().toString(), UUID.randomUUID().toString(), templateId);
-        //volume.setPoolId(dataStoreId);
+        volume.setPoolId(dataStoreId);
         volume = volumeDao.persist(volume);
         return volume;
     }
     
-    @Test
+    //@Test
     public void testCopyBaseImage() {
         DataStore primaryStore = createPrimaryDataStore();
         primaryStoreId = primaryStore.getId();
         primaryStore = this.dataStoreMgr.getPrimaryDataStore(primaryStoreId);
         VolumeVO volume = createVolume(image.getId(), primaryStore.getId());
         VolumeInfo volInfo = this.volFactory.getVolume(volume.getId());
-        this.volumeService.createVolumeFromTemplateAsync(volInfo, this.primaryStoreId, this.templateFactory.getTemplate(this.image.getId()));
+        AsyncCallFuture<VolumeApiResult> future = this.volumeService.createVolumeFromTemplateAsync(volInfo, this.primaryStoreId, this.templateFactory.getTemplate(this.image.getId()));
+        try {
+            VolumeApiResult result = future.get();
+        
+            AssertJUnit.assertTrue(result.isSuccess());
+          
+            VolumeInfo newVol = result.getVolume();
+            this.volumeService.destroyVolume(newVol.getId());
+            VolumeInfo vol = this.volFactory.getVolume(volume.getId());
+            this.volumeService.expungeVolumeAsync(vol);
+        } catch (InterruptedException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ExecutionException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ConcurrentOperationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+    
+    @Test
+    public void testCreateDataDisk() {
+        DataStore primaryStore = createPrimaryDataStore();
+        primaryStoreId = primaryStore.getId();
+        primaryStore = this.dataStoreMgr.getPrimaryDataStore(primaryStoreId);
+        VolumeVO volume = createVolume(null, primaryStore.getId());
+        VolumeInfo volInfo = this.volFactory.getVolume(volume.getId());
+        this.volumeService.createVolumeAsync(volInfo, primaryStore);
+    }
+    
+    @Test
+    public void testDeleteDisk() {
+        DataStore primaryStore = createPrimaryDataStore();
+        primaryStoreId = primaryStore.getId();
+        primaryStore = this.dataStoreMgr.getPrimaryDataStore(primaryStoreId);
+        VolumeVO volume = createVolume(null, primaryStore.getId());
+        VolumeInfo volInfo = this.volFactory.getVolume(volume.getId());
+        AsyncCallFuture<VolumeApiResult> future = this.volumeService.createVolumeAsync(volInfo, primaryStore);
+        try {
+            VolumeApiResult result = future.get();
+            VolumeInfo vol = result.getVolume();
+            
+            this.volumeService.destroyVolume(volInfo.getId());
+            volInfo = this.volFactory.getVolume(vol.getId());
+            this.volumeService.expungeVolumeAsync(volInfo);
+        } catch (InterruptedException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ExecutionException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ConcurrentOperationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
index 2152b2e..3b915dc 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
@@ -31,7 +31,6 @@ import java.util.concurrent.ExecutionException;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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.DataStoreLifeCycle;
@@ -50,6 +49,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService.VolumeAp
 import org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk;
 import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.storage.RemoteHostEndPoint;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
index 615ed20..79237c4 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
@@ -22,7 +22,6 @@ import java.util.concurrent.ExecutionException;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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.DataMotionService;
@@ -42,6 +41,7 @@ import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java
index 20bf054..177dc3e 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java
@@ -18,11 +18,11 @@
  */
 package org.apache.cloudstack.storage.datastore;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 
 public interface DataObjectManager {
     public void createAsync(DataObject data, DataStore store, AsyncCompletionCallback<CreateCmdResult> callback, boolean noCopy);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
index 566da62..c4eb2e4 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
@@ -20,7 +20,6 @@ package org.apache.cloudstack.storage.datastore;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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.DataMotionService;
@@ -32,6 +31,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreState
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java b/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java
index 908d6d5..b376413 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java
@@ -18,9 +18,9 @@
  */
 package org.apache.cloudstack.storage.image.motion;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.db.ObjectInDataStoreVO;
 import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
index ffac68e..1aee5d3 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
@@ -27,6 +27,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.storage.command.CopyCmdAnswer;
+import org.apache.cloudstack.storage.command.CreateObjectAnswer;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO;
@@ -380,6 +381,13 @@ public class VolumeObject implements VolumeInfo {
                vol.setPath(newVol.getPath());
                vol.setSize(newVol.getSize());
                volumeDao.update(vol.getId(), vol);
+           } else if (answer instanceof CreateObjectAnswer) {
+               CreateObjectAnswer createAnswer =(CreateObjectAnswer)answer;
+               VolumeObjectTO newVol = (VolumeObjectTO)createAnswer.getData();
+               VolumeVO vol = this.volumeDao.findById(this.getId());
+               vol.setPath(newVol.getPath());
+               vol.setSize(newVol.getSize());
+               volumeDao.update(vol.getId(), vol);
            }
        } else if (this.dataStore.getRole() == DataStoreRole.Image) {
            if (answer instanceof DownloadAnswer) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index ec38a21..74e01be 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -26,7 +26,6 @@ import java.util.Map;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity;
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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.DataMotionService;
@@ -44,6 +43,7 @@ import org.apache.cloudstack.framework.async.AsyncCallFuture;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.DataObjectManager;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.apache.cloudstack.storage.datastore.PrimaryDataStore;
@@ -165,7 +165,7 @@ public class VolumeServiceImpl implements VolumeService {
         DataObject vo = context.getVolume();
         String errMsg = null;
         if (result.isSuccess()) {
-            vo.processEvent(Event.OperationSuccessed);
+            vo.processEvent(Event.OperationSuccessed, result.getAnswer());
         } else {
             vo.processEvent(Event.OperationFailed);
             errMsg = result.getResult();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index cdc8da9..c88a746 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -54,9 +54,10 @@ import javax.naming.ConfigurationException;
 import javax.xml.parsers.DocumentBuilderFactory;
 
 import com.cloud.agent.api.*;
-import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import com.cloud.agent.api.to.*;
 import com.cloud.network.rules.FirewallRule;
+
+import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import org.apache.log4j.Logger;
 import org.apache.xmlrpc.XmlRpcException;
 import org.w3c.dom.Document;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
index 77e5ca6..4209949 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
@@ -42,11 +42,12 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.storage.command.AttachPrimaryDataStoreAnswer;
 import org.apache.cloudstack.storage.command.AttachPrimaryDataStoreCmd;
-import org.apache.cloudstack.storage.command.CopyCommand;
 import org.apache.cloudstack.storage.command.CopyCmdAnswer;
+import org.apache.cloudstack.storage.command.CopyCommand;
 import org.apache.cloudstack.storage.command.CreateObjectAnswer;
 import org.apache.cloudstack.storage.command.CreateObjectCommand;
 import org.apache.cloudstack.storage.command.CreatePrimaryDataStoreCmd;
+import org.apache.cloudstack.storage.command.DeleteCommand;
 import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import org.apache.cloudstack.storage.datastore.protocol.DataStoreProtocol;
 import org.apache.cloudstack.storage.to.ImageStoreTO;
@@ -113,8 +114,8 @@ public class XenServerStorageResource {
             return execute((CreatePrimaryDataStoreCmd) command);
         } else if (command instanceof CreateObjectCommand) {
             return execute((CreateObjectCommand) command);
-        } else if (command instanceof DeleteVolumeCommand) {
-            return execute((DeleteVolumeCommand)command);
+        } else if (command instanceof DeleteCommand) {
+            return execute((DeleteCommand)command);
         }
         return new Answer((Command)command, false, "not implemented yet");
     }
@@ -222,15 +223,14 @@ public class XenServerStorageResource {
            return new CreateObjectAnswer(e.toString());
        }
     }
-
-    protected Answer execute(DeleteVolumeCommand cmd) {
-        VolumeObjectTO volume = null;
+    
+    protected Answer deleteVolume(VolumeObjectTO volume) {
         Connection conn = hypervisorResource.getConnection();
         String errorMsg = null;
         try {
-            VDI vdi = VDI.getByUuid(conn, volume.getUuid());
+            VDI vdi = VDI.getByUuid(conn, volume.getPath());
             deleteVDI(conn, vdi);
-            return new Answer(cmd);
+            return new Answer(null);
         } catch (BadServerResponse e) {
             s_logger.debug("Failed to delete volume", e);
             errorMsg = e.toString();
@@ -241,8 +241,19 @@ public class XenServerStorageResource {
             s_logger.debug("Failed to delete volume", e);
             errorMsg = e.toString();
         }
+        return new Answer(null, false, errorMsg);
+    }
+
+    protected Answer execute(DeleteCommand cmd) {
+        DataTO data = cmd.getData();
+        Answer answer = null;
+        if (data.getObjectType() == DataObjectType.VOLUME) {
+            answer = deleteVolume((VolumeObjectTO)data);
+        } else {
+            answer = new Answer(cmd, false, "unsupported type");
+        }
 
-        return new Answer(cmd, false, errorMsg);
+        return answer;
     }
 
    /* protected Answer execute(CreateVolumeFromBaseImageCommand cmd) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/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 382ae44..c30d8a6 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
@@ -24,7 +24,6 @@ import java.util.Set;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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;
@@ -38,6 +37,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
index c92ea26..b64f934 100644
--- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
+++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
@@ -26,7 +26,6 @@ import java.util.Set;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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;
@@ -40,6 +39,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/plugins/storage/image/sample/src/org/apache/cloudstack/storage/datastore/driver/SampleImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/sample/src/org/apache/cloudstack/storage/datastore/driver/SampleImageStoreDriverImpl.java b/plugins/storage/image/sample/src/org/apache/cloudstack/storage/datastore/driver/SampleImageStoreDriverImpl.java
index e477b57..72864c3 100644
--- a/plugins/storage/image/sample/src/org/apache/cloudstack/storage/datastore/driver/SampleImageStoreDriverImpl.java
+++ b/plugins/storage/image/sample/src/org/apache/cloudstack/storage/datastore/driver/SampleImageStoreDriverImpl.java
@@ -22,7 +22,6 @@ import java.util.Set;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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;
@@ -32,6 +31,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.CreateObjectAnswer;
 import org.apache.cloudstack.storage.command.CreateObjectCommand;
 import org.apache.cloudstack.storage.image.ImageStoreDriver;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
index 1031077..8446eeb 100644
--- a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
+++ b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
@@ -26,7 +26,6 @@ import java.util.Set;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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;
@@ -39,6 +38,7 @@ 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.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/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 93d37de..6acded9 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
@@ -22,7 +22,6 @@ import java.util.Set;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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;
@@ -30,11 +29,14 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 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.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.CreateObjectCommand;
+import org.apache.cloudstack.storage.command.DeleteCommand;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.to.SnapshotObjectTO;
 import org.apache.cloudstack.storage.volume.VolumeObject;
@@ -80,6 +82,7 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
 	@Inject SnapshotDao snapshotDao;
 	@Inject PrimaryDataStoreDao primaryStoreDao;
 	@Inject SnapshotManager snapshotMgr;
+	@Inject EndPointSelector epSelecotor;
 	@Override
 	public String grantAccess(DataObject data, EndPoint ep) {
 		// TODO Auto-generated method stub
@@ -117,7 +120,8 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
 		}
 		
 		CreateObjectCommand cmd = new CreateObjectCommand(volume.getTO());
-		Answer answer = storageMgr.sendToPool((StoragePool)volume.getDataStore(), null, cmd);
+		EndPoint ep = epSelecotor.select(volume);
+		Answer answer = ep.sendMessage(cmd);
 		return answer;
 	}
 
@@ -149,28 +153,17 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
 	@Override
 	public void deleteAsync(DataObject data,
 			AsyncCompletionCallback<CommandResult> callback) {
-
-		String vmName = null;
-		VolumeVO vol = this.volumeDao.findById(data.getId());
-
-
-		StoragePool pool = (StoragePool)data.getDataStore();
-
-		DestroyCommand cmd = new DestroyCommand(pool, vol, vmName);
+		DeleteCommand cmd = new DeleteCommand(data.getTO());
 
 		CommandResult result = new CommandResult();
 		try {
-			Answer answer = this.storageMgr.sendToPool(pool, cmd);
+		    EndPoint ep = epSelecotor.select(data);
+			Answer answer = ep.sendMessage(cmd);
 			if (answer != null && !answer.getResult()) {
 				result.setResult(answer.getDetails());
-				s_logger.info("Will retry delete of " + vol + " from " + pool.getId());
 			}
-		} catch (StorageUnavailableException e) {
-			s_logger.error("Storage is unavailable currently.  Will retry delete of "
-					+ vol + " from " + pool.getId(), e);
-			result.setResult(e.toString());
 		} catch (Exception ex) {
-			s_logger.debug("Unable to destoy volume" + vol + " from " + pool.getId(), ex);
+			s_logger.debug("Unable to destoy volume" + data.getId(), ex);
 			result.setResult(ex.toString());
 		}
 		callback.complete(result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/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 a9226c7..c8a2a0c 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
@@ -21,7 +21,6 @@ import java.util.Set;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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;
@@ -34,6 +33,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
 import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.CreateObjectAnswer;
 import org.apache.cloudstack.storage.command.CreateObjectCommand;
 import org.apache.cloudstack.storage.command.DeleteCommand;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/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 4ec0373..9b2334b 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
@@ -18,7 +18,6 @@ package org.apache.cloudstack.storage.datastore.driver;
 
 import java.util.Set;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 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;
@@ -28,6 +27,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
 import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.command.CommandResult;
 
 import com.cloud.agent.api.to.DataStoreTO;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/server/src/com/cloud/storage/TemplateProfile.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/TemplateProfile.java b/server/src/com/cloud/storage/TemplateProfile.java
index e3943d9..65c29f0 100755
--- a/server/src/com/cloud/storage/TemplateProfile.java
+++ b/server/src/com/cloud/storage/TemplateProfile.java
@@ -46,6 +46,7 @@ public class TemplateProfile {
 	VMTemplateVO template;
 	String templateTag;
 	Map details;
+	
 
 	public TemplateProfile(Long templateId, Long userId, String name, String displayText, Integer bits, Boolean passwordEnabled, Boolean requiresHvm,
 			String url, Boolean isPublic, Boolean featured, Boolean isExtractable, ImageFormat format, Long guestOsId, Long zoneId,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/server/src/com/cloud/template/HypervisorTemplateAdapter.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
index 7e560e3..9bb7bc7 100755
--- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java
+++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
@@ -61,7 +61,7 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Local(value=TemplateAdapter.class)
-public class HypervisorTemplateAdapter extends TemplateAdapterBase implements TemplateAdapter {
+public class HypervisorTemplateAdapter extends TemplateAdapterBase {
 	private final static Logger s_logger = Logger.getLogger(HypervisorTemplateAdapter.class);
 	@Inject DownloadMonitor _downloadMonitor;
 	@Inject AgentManager _agentMgr;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2d544e71/server/src/com/cloud/template/TemplateManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java
index fbac9b4..09cce63 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -50,7 +50,6 @@ import org.apache.cloudstack.api.command.user.template.ListTemplatePermissionsCm
 import org.apache.cloudstack.api.command.user.template.RegisterTemplateCmd;
 import org.apache.cloudstack.api.command.user.template.UpdateTemplateCmd;
 import org.apache.cloudstack.api.command.user.template.UpdateTemplatePermissionsCmd;
-import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
@@ -65,6 +64,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.framework.async.AsyncCallFuture;
+import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;


Mime
View raw message