volume upload: returning only the first payload incase of templates

Cross zone copy will be intiated by the management server.


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

Branch: refs/heads/volume-upload
Commit: 812a140d178e49052fdf6dca3ed59949c73f6ac2
Parents: 3814677
Author: Rajani Karuturi <rajanikarut...@gmail.com>
Authored: Mon Feb 2 15:00:45 2015 +0530
Committer: Rajani Karuturi <rajanikarut...@gmail.com>
Committed: Tue Feb 17 11:32:40 2015 +0530

----------------------------------------------------------------------
 server/src/com/cloud/template/TemplateManagerImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/812a140d/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 32c121c..d7a298b 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -345,7 +345,7 @@ public class TemplateManagerImpl extends ManagerBase 
implements TemplateManager,
 
             /*
              * There can be one or more commands depending on the number of 
secondary stores the template needs to go to. Taking the first one to do the 
url upload. The
-             * template will be propagated to the rest through copy.
+             * template will be propagated to the rest through copy by 
management server commands.
              */
             TemplateOrVolumePostUploadCommand firstCommand = payload.get(0);
 
@@ -376,7 +376,7 @@ public class TemplateManagerImpl extends ManagerBase 
implements TemplateManager,
              * encoded metadata using the post upload config ssh key
              */
             Gson gson = new GsonBuilder().create();
-            String jsonPayload = gson.toJson(payload);
+            String jsonPayload = gson.toJson(firstCommand);
             response.setMetadata(EncryptionUtil.encodeData(jsonPayload, key));
 
             /*

Reply via email to