cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [2/2] git commit: updated refs/heads/object_store to 2dd8e2c
Date Sat, 13 Apr 2013 01:22:48 GMT
add getStoreTO into each DataStoreDriver, and add implementation for 3
data store plugins.

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

Branch: refs/heads/object_store
Commit: 2dd8e2cb975b24cb4c0fba96e86c46dbba95ecf3
Parents: 2ff01a7
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Apr 12 18:22:23 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Apr 12 18:22:23 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/agent/api/to/DataStoreTO.java    |   26 +++++++
 api/src/com/cloud/agent/api/to/S3TO.java           |    9 ++-
 api/src/com/cloud/agent/api/to/SwiftTO.java        |   10 +++-
 api/src/com/cloud/storage/DataStoreRole.java       |   54 ++++++++++++++
 .../engine/subsystem/api/storage/DataStore.java    |    3 +
 .../subsystem/api/storage/DataStoreDriver.java     |    3 +
 .../subsystem/api/storage/DataStoreManager.java    |    2 +
 .../subsystem/api/storage/DataStoreRole.java       |   54 --------------
 .../engine/subsystem/api/storage/DataStoreTO.java  |   23 ------
 .../engine/subsystem/api/storage/DataTO.java       |    2 +
 .../storage/datastore/db/ImageStoreVO.java         |    2 +-
 .../storage/image/ImageDataFactoryImpl.java        |    2 +-
 .../manager/ImageStoreProviderManagerImpl.java     |    2 +-
 .../storage/image/store/ImageStoreImpl.java        |   12 +++-
 .../cloudstack/storage/test/volumeServiceTest.java |    2 +-
 .../storage/snapshot/SnapshotDataFactoryImpl.java  |    2 +-
 .../snapshot/strategy/AncientSnapshotStrategy.java |    2 +-
 .../storage/datastore/DataStoreManagerImpl.java    |    2 +-
 .../datastore/ObjectInDataStoreManager.java        |    2 +-
 .../datastore/ObjectInDataStoreManagerImpl.java    |    2 +-
 .../cloudstack/storage/db/ObjectInDataStoreVO.java |    2 +-
 .../storage/endpoint/DefaultEndPointSelector.java  |    2 +-
 .../storage/image/datastore/ImageStoreHelper.java  |    2 +-
 .../storage/image/db/ImageStoreDaoImpl.java        |    2 +-
 .../apache/cloudstack/storage/to/ImageStoreTO.java |   40 +++++++++--
 .../cloudstack/storage/to/PrimaryDataStoreTO.java  |    5 +-
 .../cloudstack/storage/to/TemplateObjectTO.java    |    3 +-
 .../volume/datastore/PrimaryDataStoreHelper.java   |    2 +-
 .../storage/datastore/PrimaryDataStoreImpl.java    |    4 +-
 .../datastore/provider/DefaultHostListener.java    |    2 +-
 .../storage/volume/VolumeDataFactoryImpl.java      |    2 +-
 .../cloudstack/storage/volume/VolumeObject.java    |    2 +-
 .../xen/resource/XenServerStorageResource.java     |    4 +-
 .../driver/CloudStackImageStoreDriverImpl.java     |   17 ++++-
 .../datastore/driver/S3ImageStoreDriverImpl.java   |   26 +++++++-
 .../driver/SampleImageStoreDriverImpl.java         |   22 ++++--
 .../driver/SwiftImageStoreDriverImpl.java          |   19 +++++-
 .../CloudStackPrimaryDataStoreDriverImpl.java      |   16 +++-
 .../CloudStackPrimaryDataStoreLifeCycleImpl.java   |    2 +-
 .../driver/SamplePrimaryDataStoreDriverImpl.java   |   55 +++++++++------
 .../driver/SolidfirePrimaryDataStoreDriver.java    |   23 ++++--
 .../com/cloud/resource/ResourceManagerImpl.java    |    2 +-
 .../src/com/cloud/storage/StorageManagerImpl.java  |    1 -
 .../cloud/storage/StoragePoolAutomationImpl.java   |    1 -
 .../src/com/cloud/storage/VolumeManagerImpl.java   |    1 -
 .../secondary/SecondaryStorageManagerImpl.java     |    2 +-
 .../cloud/template/HypervisorTemplateAdapter.java  |    2 +-
 .../com/cloud/template/TemplateAdapterBase.java    |    2 +-
 .../com/cloud/template/TemplateManagerImpl.java    |    2 +-
 49 files changed, 315 insertions(+), 166 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/api/src/com/cloud/agent/api/to/DataStoreTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/DataStoreTO.java b/api/src/com/cloud/agent/api/to/DataStoreTO.java
new file mode 100644
index 0000000..9014f8e
--- /dev/null
+++ b/api/src/com/cloud/agent/api/to/DataStoreTO.java
@@ -0,0 +1,26 @@
+/*
+ * 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.agent.api.to;
+
+import com.cloud.storage.DataStoreRole;
+
+
+public interface DataStoreTO {
+    public DataStoreRole getRole();
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/api/src/com/cloud/agent/api/to/S3TO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/S3TO.java b/api/src/com/cloud/agent/api/to/S3TO.java
index d556cb6..1020728 100644
--- a/api/src/com/cloud/agent/api/to/S3TO.java
+++ b/api/src/com/cloud/agent/api/to/S3TO.java
@@ -18,9 +18,10 @@ package com.cloud.agent.api.to;
 
 import java.util.Date;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.utils.S3Utils;
 
-public final class S3TO implements S3Utils.ClientOptions {
+public final class S3TO implements S3Utils.ClientOptions, DataStoreTO {
 
     private Long id;
     private String uuid;
@@ -249,4 +250,10 @@ public final class S3TO implements S3Utils.ClientOptions {
         this.created = created;
     }
 
+    @Override
+    public DataStoreRole getRole() {
+        return DataStoreRole.Image;
+    }
+
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/api/src/com/cloud/agent/api/to/SwiftTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/SwiftTO.java b/api/src/com/cloud/agent/api/to/SwiftTO.java
index 32742c7..e1697f9 100644
--- a/api/src/com/cloud/agent/api/to/SwiftTO.java
+++ b/api/src/com/cloud/agent/api/to/SwiftTO.java
@@ -16,7 +16,9 @@
 // under the License.
 package com.cloud.agent.api.to;
 
-public class SwiftTO {
+import com.cloud.storage.DataStoreRole;
+
+public class SwiftTO implements DataStoreTO {
     Long id;
     String url;
     String account;
@@ -54,5 +56,11 @@ public class SwiftTO {
         return key;
     }
 
+    @Override
+    public DataStoreRole getRole() {
+        return DataStoreRole.Image;
+    }
+
+
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/api/src/com/cloud/storage/DataStoreRole.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/DataStoreRole.java b/api/src/com/cloud/storage/DataStoreRole.java
new file mode 100644
index 0000000..0448d29
--- /dev/null
+++ b/api/src/com/cloud/storage/DataStoreRole.java
@@ -0,0 +1,54 @@
+/*
+ * 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;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+
+public enum DataStoreRole {
+    Primary("primary"),
+    Image("image"),
+    ImageCache("imagecache"),
+    Backup("backup");
+    
+    public boolean isImageStore() {
+        return (this.role.equalsIgnoreCase("image") || this.role.equalsIgnoreCase("imagecache")) ? true : false;
+    }
+    
+    private final String role;
+    DataStoreRole(String type) {
+        this.role = type;
+    }
+    
+    public static DataStoreRole getRole(String role) {
+        if (role == null) {
+            throw new CloudRuntimeException("role can't be empty");
+        }
+        if (role.equalsIgnoreCase("primary")) {
+            return Primary;
+        } else if (role.equalsIgnoreCase("image")) {
+            return Image;
+        } else if (role.equalsIgnoreCase("imagecache")) {
+            return ImageCache;
+        } else if (role.equalsIgnoreCase("backup")) {
+            return Backup;
+        } else {
+            throw new CloudRuntimeException("can't identify the role");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java
index d20167b..c0570a9 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java
@@ -16,6 +16,9 @@
 // under the License.
 package org.apache.cloudstack.engine.subsystem.api.storage;
 
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.storage.DataStoreRole;
+
 public interface DataStore {
     DataStoreDriver getDriver();
     DataStoreRole getRole();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 f79d349..e4986d6 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
@@ -22,6 +22,8 @@ import java.util.Set;
 
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 
+import com.cloud.agent.api.to.DataStoreTO;
+
 public interface DataStoreDriver {
     public String grantAccess(DataObject data, EndPoint ep);
     public boolean revokeAccess(DataObject data, EndPoint ep);
@@ -32,4 +34,5 @@ public interface DataStoreDriver {
     public boolean canCopy(DataObject srcData, DataObject destData);
     public void resize(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback);
     public DataTO getTO(DataObject data);
+    public DataStoreTO getStoreTO(DataStore store);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 1a36c8c..096a1fd 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
@@ -21,6 +21,8 @@ package org.apache.cloudstack.engine.subsystem.api.storage;
 import java.util.List;
 import java.util.Map;
 
+import com.cloud.storage.DataStoreRole;
+
 
 public interface DataStoreManager {
     public DataStore getDataStore(long storeId, DataStoreRole role);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreRole.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreRole.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreRole.java
deleted file mode 100644
index a45ca7a..0000000
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreRole.java
+++ /dev/null
@@ -1,54 +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;
-
-import com.cloud.utils.exception.CloudRuntimeException;
-
-public enum DataStoreRole {
-    Primary("primary"),
-    Image("image"),
-    ImageCache("imagecache"),
-    Backup("backup");
-    
-    public boolean isImageStore() {
-        return (this.role.equalsIgnoreCase("image") || this.role.equalsIgnoreCase("imagecache")) ? true : false;
-    }
-    
-    private final String role;
-    DataStoreRole(String type) {
-        this.role = type;
-    }
-    
-    public static DataStoreRole getRole(String role) {
-        if (role == null) {
-            throw new CloudRuntimeException("role can't be empty");
-        }
-        if (role.equalsIgnoreCase("primary")) {
-            return Primary;
-        } else if (role.equalsIgnoreCase("image")) {
-            return Image;
-        } else if (role.equalsIgnoreCase("imagecache")) {
-            return ImageCache;
-        } else if (role.equalsIgnoreCase("backup")) {
-            return Backup;
-        } else {
-            throw new CloudRuntimeException("can't identify the role");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreTO.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreTO.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreTO.java
deleted file mode 100644
index 5886bde..0000000
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreTO.java
+++ /dev/null
@@ -1,23 +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 interface DataStoreTO {
-    public DataStoreRole getRole();
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataTO.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataTO.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataTO.java
index cd43745..9e26894 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataTO.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataTO.java
@@ -18,6 +18,8 @@
  */
 package org.apache.cloudstack.engine.subsystem.api.storage;
 
+import com.cloud.agent.api.to.DataStoreTO;
+
 public interface DataTO {
     public DataObjectType getObjectType();
     public DataStoreTO getDataStore();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/api/src/org/apache/cloudstack/storage/datastore/db/ImageStoreVO.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/ImageStoreVO.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/ImageStoreVO.java
index 5503df0..39b74d0 100644
--- a/engine/api/src/org/apache/cloudstack/storage/datastore/db/ImageStoreVO.java
+++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/ImageStoreVO.java
@@ -28,10 +28,10 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 import javax.persistence.TableGenerator;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 
 
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ImageStore;
 import com.cloud.storage.ScopeType;
 import com.cloud.utils.db.GenericDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java
index a7b9c42..37204bf 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java
@@ -25,7 +25,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 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.DataStoreManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
@@ -33,6 +32,7 @@ import org.apache.cloudstack.storage.image.store.TemplateObject;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.VMTemplateStoragePoolVO;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.dao.VMTemplateDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageStoreProviderManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageStoreProviderManagerImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageStoreProviderManagerImpl.java
index a1096d3..c14e2d9 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageStoreProviderManagerImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageStoreProviderManagerImpl.java
@@ -28,7 +28,6 @@ import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
@@ -41,6 +40,7 @@ import org.apache.cloudstack.storage.image.store.ImageStoreImpl;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.utils.db.SearchCriteria.Op;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
index 4cd70ca..4989b26 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
@@ -18,14 +18,13 @@
  */
 package org.apache.cloudstack.storage.image.store;
 
+import java.util.Date;
 import java.util.Set;
 
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
 import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
@@ -37,6 +36,8 @@ import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
 import org.apache.cloudstack.storage.image.ImageStoreDriver;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity;
 
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.utils.component.ComponentContext;
 import com.cloud.utils.storage.encoding.EncodingType;
@@ -132,6 +133,11 @@ public class ImageStoreImpl implements ImageStoreEntity {
         return this.imageDataStoreVO.getUuid();
     }
 
+    public Date getCreated(){
+        return this.imageDataStoreVO.getCreated();
+    }
+
+
     @Override
     public DataObject create(DataObject obj) {
         DataObject object = objectInStoreMgr.create(obj, this);
@@ -165,6 +171,8 @@ public class ImageStoreImpl implements ImageStoreEntity {
         return imageDataStoreVO.getProtocol();
     }
 
+
+
     @Override
     public DataStoreTO getTO() {
         return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 ca64105..64d2143 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
@@ -36,7 +36,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 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.ImageDataFactory;
@@ -73,6 +72,7 @@ import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.org.Cluster.ClusterType;
 import com.cloud.org.Managed.ManagedState;
 import com.cloud.resource.ResourceState;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.Storage;
 import com.cloud.storage.Storage.StoragePoolType;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java
index 6a7edc2..ff96a19 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java
@@ -25,7 +25,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 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.DataStoreManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
@@ -33,6 +32,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.springframework.stereotype.Component;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.Snapshot;
 import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.dao.SnapshotDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java
index ce2786b..944c477 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java
@@ -30,7 +30,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 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.DataStoreManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
@@ -58,6 +57,7 @@ import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.host.HostVO;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.resource.ResourceManager;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.Snapshot;
 import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.StoragePool;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 adc7250..fb14604 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java
@@ -25,12 +25,12 @@ import javax.inject.Inject;
 
 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.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreProviderManager;
 import org.springframework.stereotype.Component;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.utils.exception.CloudRuntimeException;
 
 @Component

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java
index 2632143..876a066 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java
@@ -20,10 +20,10 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 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.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
 
 import com.cloud.agent.api.Answer;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.utils.fsm.NoTransitionException;
 
 public interface ObjectInDataStoreManager {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java
index 632860d..69db872 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java
@@ -23,7 +23,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 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.DataStoreManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State;
@@ -42,6 +41,7 @@ import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.api.Answer;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.VMTemplateStoragePoolVO;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.storage.dao.VMTemplatePoolDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java
index 7b44de0..fb8c93c 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java
@@ -31,9 +31,9 @@ import javax.persistence.TemporalType;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.Storage;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.utils.db.GenericDaoBase;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
index ab5c552..2d03c44 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
@@ -28,7 +28,6 @@ import javax.inject.Inject;
 
 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.DataStoreRole;
 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.Scope;
@@ -40,6 +39,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.host.HostVO;
 import com.cloud.host.Status;
 import com.cloud.host.dao.HostDao;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.SearchCriteria2;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageStoreHelper.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageStoreHelper.java b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageStoreHelper.java
index a4d3db9..64f8591 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageStoreHelper.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageStoreHelper.java
@@ -23,13 +23,13 @@ import java.util.Map;
 
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailVO;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
 import org.springframework.stereotype.Component;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ImageStore;
 import com.cloud.storage.ScopeType;
 import com.cloud.utils.exception.CloudRuntimeException;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDaoImpl.java
index ee07822..2300649 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDaoImpl.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import javax.naming.ConfigurationException;
 
 
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
@@ -32,6 +31,7 @@ import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/to/ImageStoreTO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/ImageStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/ImageStoreTO.java
index 5224e2e..a9d95e8 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/to/ImageStoreTO.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/to/ImageStoreTO.java
@@ -16,26 +16,32 @@
 // under the License.
 package org.apache.cloudstack.storage.to;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreTO;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreInfo;
 
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.storage.DataStoreRole;
+
 public class ImageStoreTO implements DataStoreTO {
-    private final String type;
-    private final String uri;
-    private final String providerName;
-    private final DataStoreRole role;
+    private String type;
+    private String uri;
+    private String providerName;
+    private DataStoreRole role;
+
+    public ImageStoreTO(){
+
+    }
+
     public ImageStoreTO(ImageStoreInfo dataStore) {
         this.type = dataStore.getType();
         this.uri = dataStore.getUri();
         this.providerName = null;
         this.role = dataStore.getRole();
     }
-    
+
     public String getType() {
         return this.type;
     }
-    
+
     public String getUri() {
         return this.uri;
     }
@@ -47,8 +53,26 @@ public class ImageStoreTO implements DataStoreTO {
         return providerName;
     }
 
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public void setUri(String uri) {
+        this.uri = uri;
+    }
+
+    public void setProviderName(String providerName) {
+        this.providerName = providerName;
+    }
+
+    public void setRole(DataStoreRole role) {
+        this.role = role;
+    }
+
     @Override
     public DataStoreRole getRole() {
         return this.role;
     }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java
index b410dd6..cf9448b 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java
@@ -16,10 +16,11 @@
 // under the License.
 package org.apache.cloudstack.storage.to;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
 
+import com.cloud.agent.api.to.DataStoreTO;
+import com.cloud.storage.DataStoreRole;
+
 public class PrimaryDataStoreTO implements DataStoreTO {
     private final String uuid;
     private final String name;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/to/TemplateObjectTO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/TemplateObjectTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/TemplateObjectTO.java
index 76f0d03..513a1dd 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/to/TemplateObjectTO.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/to/TemplateObjectTO.java
@@ -17,12 +17,13 @@
 package org.apache.cloudstack.storage.to;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreInfo;
 
+import com.cloud.agent.api.to.DataStoreTO;
+
 public class TemplateObjectTO implements DataTO {
     private final String path;
     private final String uuid;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
index c5f7a1b..d131008 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
@@ -25,7 +25,6 @@ import javax.inject.Inject;
 
 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.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters;
 import org.apache.cloudstack.storage.command.AttachPrimaryDataStoreCmd;
@@ -41,6 +40,7 @@ import com.cloud.alert.AlertManager;
 import com.cloud.capacity.Capacity;
 import com.cloud.capacity.CapacityVO;
 import com.cloud.capacity.dao.CapacityDao;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePool;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
index 836f9d4..0feefd0 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
@@ -28,8 +28,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
@@ -47,8 +45,10 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 import org.apache.cloudstack.storage.volume.VolumeObject;
 import org.apache.log4j.Logger;
 
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.storage.Storage.StoragePoolType;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.StoragePoolHostVO;
 import com.cloud.storage.StoragePoolStatus;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
index f2cb1c4..fcb5c32 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
@@ -21,7 +21,6 @@ package org.apache.cloudstack.storage.datastore.provider;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
@@ -32,6 +31,7 @@ import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.ModifyStoragePoolAnswer;
 import com.cloud.agent.api.ModifyStoragePoolCommand;
 import com.cloud.alert.AlertManager;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.StoragePool;
 import com.cloud.storage.StoragePoolHostVO;
 import com.cloud.storage.dao.StoragePoolHostDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java
index 3019cf2..2929d38 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java
@@ -24,12 +24,12 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 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.DataStoreManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager;
 import org.springframework.stereotype.Component;
 
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.VolumeDao;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 67f75b0..34e080d 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
@@ -23,7 +23,6 @@ import javax.inject.Inject;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore;
 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.DataStoreRole;
 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;
@@ -34,6 +33,7 @@ import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.Volume;
 import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.VolumeDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 b629377..1cd5335 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
@@ -31,8 +31,6 @@ import java.util.Set;
 import java.util.UUID;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.storage.command.AttachPrimaryDataStoreAnswer;
 import org.apache.cloudstack.storage.command.AttachPrimaryDataStoreCmd;
@@ -62,7 +60,9 @@ import com.cloud.agent.api.Command;
 import com.cloud.agent.api.storage.DeleteVolumeCommand;
 import com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer;
 import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand;
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.hypervisor.xen.resource.CitrixResourceBase.SRType;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.storage.encoding.DecodedDataObject;
 import com.cloud.utils.storage.encoding.DecodedDataStore;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 692aded..af6a3b6 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
@@ -35,7 +35,9 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
 import org.apache.cloudstack.storage.image.ImageStoreDriver;
+import org.apache.cloudstack.storage.image.store.ImageStoreImpl;
 import org.apache.cloudstack.storage.image.store.TemplateObject;
+import org.apache.cloudstack.storage.to.ImageStoreTO;
 import org.apache.cloudstack.storage.volume.VolumeObject;
 import org.apache.log4j.Logger;
 
@@ -43,10 +45,12 @@ import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.DeleteSnapshotBackupCommand;
 import com.cloud.agent.api.storage.DeleteVolumeCommand;
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.agent.api.to.S3TO;
 import com.cloud.agent.api.to.SwiftTO;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.RegisterVolumePayload;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.SnapshotVO;
@@ -92,12 +96,23 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver {
         // TODO Auto-generated method stub
         return null;
     }
-    
+
     @Override
     public DataTO getTO(DataObject data) {
         return null;
     }
 
+
+    @Override
+    public DataStoreTO getStoreTO(DataStore store) {
+        ImageStoreImpl nfsStore = (ImageStoreImpl)store;
+        ImageStoreTO nfsTO = new ImageStoreTO();
+        nfsTO.setProviderName("CloudStack");
+        nfsTO.setRole(DataStoreRole.Image);
+        nfsTO.setUri(nfsStore.getUri());
+        return nfsTO;
+    }
+
     @Override
     public boolean revokeAccess(DataObject data, EndPoint ep) {
         // TODO Auto-generated method stub

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 c5574d3..5f33a49 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
@@ -19,10 +19,12 @@
 package org.apache.cloudstack.storage.datastore.driver;
 
 import java.util.List;
+import java.util.Map;
 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;
@@ -34,7 +36,9 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
 import org.apache.cloudstack.storage.image.ImageStoreDriver;
+import org.apache.cloudstack.storage.image.store.ImageStoreImpl;
 import org.apache.cloudstack.storage.image.store.TemplateObject;
 import org.apache.cloudstack.storage.volume.VolumeObject;
 import org.apache.log4j.Logger;
@@ -43,6 +47,7 @@ import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.DeleteSnapshotBackupCommand;
 import com.cloud.agent.api.storage.DeleteVolumeCommand;
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.agent.api.to.S3TO;
 import com.cloud.agent.api.to.SwiftTO;
 import com.cloud.host.HostVO;
@@ -77,6 +82,8 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
     @Inject DownloadMonitor _downloadMonitor;
     @Inject
     VMTemplateHostDao _vmTemplateHostDao;
+    @Inject
+    ImageStoreDetailsDao _imageStoreDetailsDao;
     @Inject VolumeDao volumeDao;
     @Inject VolumeHostDao volumeHostDao;
     @Inject HostDao hostDao;
@@ -92,12 +99,29 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
         // TODO Auto-generated method stub
         return null;
     }
-    
+
     @Override
     public DataTO getTO(DataObject data) {
         return null;
     }
 
+
+    @Override
+    public DataStoreTO getStoreTO(DataStore store) {
+        ImageStoreImpl imgStore = (ImageStoreImpl)store;
+        Map<String, String> details = _imageStoreDetailsDao.getDetails(imgStore.getId());
+        return new S3TO(imgStore.getId(), imgStore.getUuid(), details.get(ApiConstants.S3_ACCESS_KEY),
+                details.get(ApiConstants.S3_SECRET_KEY),
+                details.get(ApiConstants.S3_END_POINT),
+                details.get(ApiConstants.S3_BUCKET_NAME),
+                Boolean.parseBoolean(details.get(ApiConstants.S3_HTTPS_FLAG)),
+                Integer.valueOf(details.get(ApiConstants.S3_CONNECTION_TIMEOUT)),
+                Integer.valueOf(details.get(ApiConstants.S3_MAX_ERROR_RETRY)),
+                Integer.valueOf(details.get(ApiConstants.S3_SOCKET_TIMEOUT)),
+                imgStore.getCreated());
+
+    }
+
     @Override
     public boolean revokeAccess(DataObject data, EndPoint ep) {
         // TODO Auto-generated method stub

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 4d53520..acf6796 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
@@ -36,6 +36,7 @@ import org.apache.cloudstack.storage.command.CreateObjectAnswer;
 import org.apache.cloudstack.storage.command.CreateObjectCommand;
 import org.apache.cloudstack.storage.image.ImageStoreDriver;
 
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.storage.dao.VMTemplateDao;
 
 //http-read-only based image store
@@ -46,12 +47,19 @@ public class SampleImageStoreDriverImpl implements ImageStoreDriver {
     VMTemplateDao imageDataDao;
     public SampleImageStoreDriverImpl() {
     }
-    
+
     @Override
     public DataTO getTO(DataObject data) {
         return null;
     }
 
+
+    @Override
+    public DataStoreTO getStoreTO(DataStore store) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
     @Override
     public String grantAccess(DataObject data, EndPoint ep) {
         return data.getUri();
@@ -79,7 +87,7 @@ public class SampleImageStoreDriverImpl implements ImageStoreDriver {
             callback.complete(result);
             return;
         }
-        
+
         if (data.getSize() == null && data.getType() == DataObjectType.TEMPLATE) {
             //the template size is unknown during registration, need to find out the size of template
             EndPoint ep = selector.select(data);
@@ -92,14 +100,14 @@ public class SampleImageStoreDriverImpl implements ImageStoreDriver {
             CreateObjectAnswer answer = (CreateObjectAnswer)ep.sendMessage(createCmd);
             if (answer.getResult()) {
                 //update imagestorevo
-               
+
                 result = new CreateCmdResult(answer.getPath(), answer.getSize());
             } else {
                 result.setResult(answer.getDetails());
             }
-            
+
         }
-        
+
         callback.complete(result);
     }
 
@@ -120,13 +128,13 @@ public class SampleImageStoreDriverImpl implements ImageStoreDriver {
     public void copyAsync(DataObject srcdata, DataObject destData,
             AsyncCompletionCallback<CopyCommandResult> callback) {
         // TODO Auto-generated method stub
-        
+
     }
 
 	@Override
 	public void resize(DataObject data,
 			AsyncCompletionCallback<CreateCmdResult> callback) {
 		// TODO Auto-generated method stub
-		
+
 	}
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 8504de9..e96bfff 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
@@ -19,10 +19,12 @@
 package org.apache.cloudstack.storage.datastore.driver;
 
 import java.util.List;
+import java.util.Map;
 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;
@@ -34,7 +36,9 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
 import org.apache.cloudstack.storage.image.ImageStoreDriver;
+import org.apache.cloudstack.storage.image.store.ImageStoreImpl;
 import org.apache.cloudstack.storage.image.store.TemplateObject;
 import org.apache.cloudstack.storage.volume.VolumeObject;
 import org.apache.log4j.Logger;
@@ -43,6 +47,7 @@ import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.DeleteSnapshotBackupCommand;
 import com.cloud.agent.api.storage.DeleteVolumeCommand;
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.agent.api.to.S3TO;
 import com.cloud.agent.api.to.SwiftTO;
 import com.cloud.host.HostVO;
@@ -77,6 +82,8 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
     @Inject DownloadMonitor _downloadMonitor;
     @Inject
     VMTemplateHostDao _vmTemplateHostDao;
+    @Inject
+    ImageStoreDetailsDao _imageStoreDetailsDao;
     @Inject VolumeDao volumeDao;
     @Inject VolumeHostDao volumeHostDao;
     @Inject HostDao hostDao;
@@ -92,12 +99,22 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
         // TODO Auto-generated method stub
         return null;
     }
-    
+
     @Override
     public DataTO getTO(DataObject data) {
         return null;
     }
 
+
+    @Override
+    public DataStoreTO getStoreTO(DataStore store) {
+        ImageStoreImpl imgStore = (ImageStoreImpl)store;
+        Map<String, String> details = _imageStoreDetailsDao.getDetails(imgStore.getId());
+        return new SwiftTO(imgStore.getId(), imgStore.getUri(), details.get(ApiConstants.ACCOUNT),
+                details.get(ApiConstants.USERNAME),
+                details.get(ApiConstants.KEY));
+    }
+
     @Override
     public boolean revokeAccess(DataObject data, EndPoint ep) {
         // TODO Auto-generated method stub

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 412647f..2a9217d 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
@@ -46,6 +46,7 @@ import com.cloud.agent.api.storage.CreateCommand;
 import com.cloud.agent.api.storage.DestroyCommand;
 import com.cloud.agent.api.storage.ResizeVolumeAnswer;
 import com.cloud.agent.api.storage.ResizeVolumeCommand;
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.agent.api.to.StorageFilerTO;
 import com.cloud.exception.StorageUnavailableException;
 import com.cloud.host.HostVO;
@@ -91,13 +92,20 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
 		// TODO Auto-generated method stub
 		return null;
 	}
-	
+
 	@Override
     public DataTO getTO(DataObject data) {
         return null;
     }
 
+
 	@Override
+    public DataStoreTO getStoreTO(DataStore store) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
 	public boolean revokeAccess(DataObject data, EndPoint ep) {
 		// TODO Auto-generated method stub
 		return false;
@@ -148,7 +156,7 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
 									+ template.getId() + " "
 									+ template.getName());
 							throw new CloudRuntimeException("cannot find template"
-									+ template.getId() 
+									+ template.getId()
 									+ template.getName());
 						}
 						HostVO secondaryStorageHost = hostDao
@@ -304,11 +312,11 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
 	            parentSnapshotPath = preSnapshotVO.getPath();
 	        }
 	        StoragePool srcPool = (StoragePool)volume.getDataStore();
-	        
+
 	        ManageSnapshotCommand cmd = new ManageSnapshotCommand(snapshot.getId(), volume.getPath(), srcPool, parentSnapshotPath, snapshot.getName(), vmName);
 
 	        ManageSnapshotAnswer answer = (ManageSnapshotAnswer) this.snapshotMgr.sendToPool(volume, cmd);
-	        
+
 	        if ((answer != null) && answer.getResult()) {
 	            result = new CreateCmdResult(answer.getSnapshotPath(), null);
 	        } else {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
index 4308558..6875b7a 100644
--- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
+++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
@@ -30,7 +30,6 @@ import javax.inject.Inject;
 import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
 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.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle;
@@ -61,6 +60,7 @@ import com.cloud.resource.ResourceManager;
 import com.cloud.server.ManagementServer;
 import com.cloud.storage.OCFS2Manager;
 import com.cloud.storage.Storage.StoragePoolType;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePool;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 99b16eb..fc62a56 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
@@ -41,6 +41,7 @@ import org.apache.cloudstack.storage.datastore.DataObjectManager;
 import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.to.DataStoreTO;
 import com.cloud.storage.dao.StoragePoolHostDao;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.storage.encoding.DecodedDataObject;
@@ -56,14 +57,22 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     @Inject
     DataObjectManager dataObjMgr;
     public SamplePrimaryDataStoreDriverImpl() {
-        
+
     }
-    
+
     @Override
     public DataTO getTO(DataObject data) {
         return null;
     }
-    
+
+
+    @Override
+    public DataStoreTO getStoreTO(DataStore store) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
     private class CreateVolumeContext<T> extends AsyncRpcConext<T> {
         private final DataObject volume;
         /**
@@ -73,13 +82,13 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
             super(callback);
             this.volume = volume;
         }
-        
+
         public DataObject getVolume() {
             return this.volume;
         }
-        
+
     }
-    
+
     public Void createAsyncCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, CreateVolumeContext<CreateCmdResult> context) {
         CreateCmdResult result = null;
         CreateObjectAnswer volAnswer = (CreateObjectAnswer) callback.getResult();
@@ -89,15 +98,15 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
             result = new CreateCmdResult("", null);
             result.setResult(volAnswer.getDetails());
         }
-        
+
         context.getParentCallback().complete(result);
         return null;
     }
-  
+
     @Override
     public void deleteAsync(DataObject vo, AsyncCompletionCallback<CommandResult> callback) {
         DeleteCommand cmd = new DeleteCommand(vo.getUri());
-    
+
         EndPoint ep = selector.select(vo);
         AsyncRpcConext<CommandResult> context = new AsyncRpcConext<CommandResult>(callback);
         AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
@@ -105,7 +114,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
             .setContext(context);
         ep.sendMessageAsync(cmd, caller);
     }
-    
+
     public Void deleteCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, AsyncRpcConext<CommandResult> context) {
         CommandResult result = new CommandResult();
         Answer answer = callback.getResult();
@@ -118,16 +127,16 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     /*
     private class CreateVolumeFromBaseImageContext<T> extends AsyncRpcConext<T> {
         private final VolumeObject volume;
-      
+
         public CreateVolumeFromBaseImageContext(AsyncCompletionCallback<T> callback, VolumeObject volume) {
             super(callback);
             this.volume = volume;
         }
-        
+
         public VolumeObject getVolume() {
             return this.volume;
         }
-        
+
     }
 
     @Override
@@ -137,7 +146,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
         EndPoint ep = endPoints.get(0);
         String templateUri = template.getDataStore().grantAccess(template, ep);
         CreateVolumeFromBaseImageCommand cmd = new CreateVolumeFromBaseImageCommand(vol, templateUri);
-        
+
         CreateVolumeFromBaseImageContext<CommandResult> context = new CreateVolumeFromBaseImageContext<CommandResult>(callback, volume);
         AsyncCallbackDispatcher<DefaultPrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
         caller.setContext(context)
@@ -169,7 +178,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
             AsyncCompletionCallback<CreateCmdResult> callback) {
         EndPoint ep = selector.select(vol);
         CreateObjectCommand createCmd = new CreateObjectCommand(vol.getUri());
-        
+
         CreateVolumeContext<CreateCmdResult> context = new CreateVolumeContext<CreateCmdResult>(callback, vol);
         AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> caller = AsyncCallbackDispatcher.create(this);
         caller.setContext(context)
@@ -181,7 +190,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     @Override
     public String grantAccess(DataObject object, EndPoint ep) {
         //StoragePoolHostVO poolHost = storeHostDao.findByPoolHost(object.getDataStore().getId(), ep.getId());
-        
+
         String uri = object.getUri();
         try {
             DecodedDataObject obj = Decoder.decode(uri);
@@ -197,7 +206,7 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
                     throw new CloudRuntimeException("failed to create object" + answer.getDetails());
                 }
             }
-            
+
             return object.getUri();
         } catch (URISyntaxException e) {
            throw new CloudRuntimeException("uri parsed error", e);
@@ -220,10 +229,10 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     public void revertSnapshot(SnapshotInfo snapshot,
             AsyncCompletionCallback<CommandResult> callback) {
         // TODO Auto-generated method stub
-        
+
     }
 
-    
+
 
     @Override
     public boolean canCopy(DataObject srcData, DataObject destData) {
@@ -235,21 +244,21 @@ public class SamplePrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
     public void copyAsync(DataObject srcdata, DataObject destData,
             AsyncCompletionCallback<CopyCommandResult> callback) {
         // TODO Auto-generated method stub
-        
+
     }
 
 	@Override
 	public void resize(DataObject data,
 			AsyncCompletionCallback<CreateCmdResult> callback) {
 		// TODO Auto-generated method stub
-		
+
 	}
 
 	@Override
 	public void takeSnapshot(SnapshotInfo snapshot,
 			AsyncCompletionCallback<CreateCmdResult> callback) {
 		// TODO Auto-generated method stub
-		
+
 	}
-   
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 3916773..4ec0373 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
@@ -29,6 +29,8 @@ 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 com.cloud.agent.api.to.DataStoreTO;
+
 public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
 
     @Override
@@ -36,12 +38,19 @@ public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
         // TODO Auto-generated method stub
         return null;
     }
-    
+
     @Override
     public DataTO getTO(DataObject data) {
         return null;
     }
 
+
+    @Override
+    public DataStoreTO getStoreTO(DataStore store) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
     @Override
     public boolean revokeAccess(DataObject data, EndPoint ep) {
         // TODO Auto-generated method stub
@@ -57,19 +66,19 @@ public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
     @Override
     public void createAsync(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback) {
         // TODO Auto-generated method stub
-        
+
     }
 
     @Override
     public void deleteAsync(DataObject data, AsyncCompletionCallback<CommandResult> callback) {
         // TODO Auto-generated method stub
-        
+
     }
 
     @Override
     public void copyAsync(DataObject srcdata, DataObject destData, AsyncCompletionCallback<CopyCommandResult> callback) {
         // TODO Auto-generated method stub
-        
+
     }
 
     @Override
@@ -81,21 +90,21 @@ public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
     @Override
     public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CommandResult> callback) {
         // TODO Auto-generated method stub
-        
+
     }
 
 	@Override
 	public void resize(DataObject data,
 			AsyncCompletionCallback<CreateCmdResult> callback) {
 		// TODO Auto-generated method stub
-		
+
 	}
 
 	@Override
 	public void takeSnapshot(SnapshotInfo snapshot,
 			AsyncCompletionCallback<CreateCmdResult> callback) {
 		// TODO Auto-generated method stub
-		
+
 	}
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java
index ef56769..1af3b2f 100755
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -51,7 +51,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.region.dao.RegionDao;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
@@ -114,6 +113,7 @@ import com.cloud.org.Grouping;
 import com.cloud.org.Grouping.AllocationState;
 import com.cloud.org.Managed;
 import com.cloud.service.ServiceOfferingVO;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.GuestOSCategoryVO;
 import com.cloud.storage.ImageStore;
 import com.cloud.storage.S3;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 3b1a768..a5f82a8 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -53,7 +53,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.HostScope;
 import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StoragePoolAutomationImpl.java b/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
index 9bba979..4001775 100644
--- a/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
+++ b/server/src/com/cloud/storage/StoragePoolAutomationImpl.java
@@ -27,7 +27,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 import org.apache.log4j.Logger;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index ddd6ff0..4b87080 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -45,7 +45,6 @@ import org.apache.cloudstack.api.command.user.volume.UploadVolumeCmd;
 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.DataStoreProviderManager;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
index bdac44d..7a1984c 100755
--- a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
+++ b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
@@ -30,7 +30,6 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
-import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.Scope;
 import org.apache.log4j.Logger;
 import org.springframework.context.annotation.Primary;
@@ -98,6 +97,7 @@ import com.cloud.resource.ServerResource;
 import com.cloud.resource.UnableDeleteHostException;
 import com.cloud.service.ServiceOfferingVO;
 import com.cloud.service.dao.ServiceOfferingDao;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.Storage;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 06cf6ac..cbffa8e 100755
--- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java
+++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
@@ -34,7 +34,6 @@ import org.apache.cloudstack.api.command.user.template.RegisterTemplateCmd;
 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.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService;
 import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope;
@@ -54,6 +53,7 @@ import com.cloud.host.HostVO;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.Storage.TemplateType;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.TemplateProfile;
 import com.cloud.storage.VMTemplateHostVO;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/server/src/com/cloud/template/TemplateAdapterBase.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateAdapterBase.java b/server/src/com/cloud/template/TemplateAdapterBase.java
index 1e79b60..05ba35d 100755
--- a/server/src/com/cloud/template/TemplateAdapterBase.java
+++ b/server/src/com/cloud/template/TemplateAdapterBase.java
@@ -28,7 +28,6 @@ import org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd;
 import org.apache.cloudstack.api.command.user.template.RegisterTemplateCmd;
 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.DataStoreRole;
 import org.apache.log4j.Logger;
 
 import com.cloud.api.ApiDBUtils;
@@ -47,6 +46,7 @@ import com.cloud.org.Grouping;
 import com.cloud.storage.GuestOS;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.Storage.TemplateType;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.TemplateProfile;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.dao.VMTemplateDao;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2dd8e2cb/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 aabdaf9..88a4e7f 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -56,7 +56,6 @@ import org.apache.cloudstack.api.command.user.template.UpdateTemplatePermissions
 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.DataStoreRole;
 import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService;
 import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory;
@@ -121,6 +120,7 @@ import com.cloud.storage.Storage;
 
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.Storage.TemplateType;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePool;
 import com.cloud.storage.StoragePoolHostVO;


Mime
View raw message