cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject [2/2] git commit: updated refs/heads/4.5 to 3fc392a
Date Wed, 26 Nov 2014 11:06:55 GMT
CLOUDSTACK-7960: [Automation] Creation of Volume from Snapshot fails due to StringIndexOutOfBoundsException
Fixed the appropriate CopyCommand handler in simulator plugin


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

Branch: refs/heads/4.5
Commit: 3fc392abf8a17d823d76805782d3ee01b54b5210
Parents: d55059d
Author: Koushik Das <koushik@apache.org>
Authored: Wed Nov 26 16:00:54 2014 +0530
Committer: Koushik Das <koushik@apache.org>
Committed: Wed Nov 26 16:00:54 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/resource/SimulatorStorageProcessor.java         | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3fc392ab/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
index bdb3277..86556f7 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
@@ -142,7 +142,7 @@ public class SimulatorStorageProcessor implements StorageProcessor {
         int index = snapshot.getPath().lastIndexOf("/");
 
         String snapshotName = snapshot.getPath().substring(index + 1);
-        String snapshotRelPath = null;
+        String snapshotRelPath = "snapshots";
         SnapshotObjectTO newSnapshot = new SnapshotObjectTO();
         newSnapshot.setPath(snapshotRelPath + File.separator + snapshotName);
         return new CopyCmdAnswer(newSnapshot);
@@ -209,7 +209,6 @@ public class SimulatorStorageProcessor implements StorageProcessor {
         SnapshotObjectTO snapshot = (SnapshotObjectTO)srcData;
         String snapshotPath = snapshot.getPath();
         int index = snapshotPath.lastIndexOf("/");
-        snapshotPath = snapshotPath.substring(0, index);
         String snapshotName = snapshotPath.substring(index + 1);
         VolumeObjectTO newVol = new VolumeObjectTO();
         newVol.setPath(snapshotName);


Mime
View raw message