incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [27/32] git commit: Simulator: Fixing the listTemplatesCommand
Date Thu, 27 Dec 2012 21:48:16 GMT
Simulator: Fixing the listTemplatesCommand

Should return the ListTemplatesAnswer and ListVolumes returns
ListVolumesAnswer

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


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

Branch: refs/heads/ui-plugins
Commit: 539fca35209bdbf26eecfb22f7a63d2f21488cc1
Parents: bab974c
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Wed Dec 26 19:20:32 2012 -0800
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Wed Dec 26 19:22:17 2012 -0800

----------------------------------------------------------------------
 .../agent/manager/MockStorageManagerImpl.java      |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/539fca35/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
index a950926..1076089 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
@@ -434,13 +434,13 @@ public class MockStorageManagerImpl implements MockStorageManager {
 			List<MockVolumeVO> volumes = _mockVolumeDao.findByStorageIdAndType(storage.getId(),
 					MockVolumeType.VOLUME);
 
-			Map<String, TemplateInfo> templateInfos = new HashMap<String, TemplateInfo>();
+			Map<Long, TemplateInfo> templateInfos = new HashMap<Long, TemplateInfo>();
 			for (MockVolumeVO volume : volumes) {
-				templateInfos.put(volume.getName(), new TemplateInfo(volume.getName(), volume.getPath()
+				templateInfos.put(volume.getId(), new TemplateInfo(volume.getName(), volume.getPath()
 						.replaceAll(storage.getMountPoint(), ""), volume.getSize(), volume.getSize(), true,
false));
 			}
 			txn.commit();
-			return new ListTemplateAnswer(cmd.getSecUrl(), templateInfos);
+			return new ListVolumeAnswer(cmd.getSecUrl(), templateInfos);
 		} catch (Exception ex) {
 			txn.rollback();
 			throw new CloudRuntimeException("Error when finding template on sec storage " + storage.getId(),
ex);


Mime
View raw message