Updated Branches: refs/heads/javelin e40042b55 -> d7bc09f95
fix build Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/d7bc09f9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/d7bc09f9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/d7bc09f9 Branch: refs/heads/javelin Commit: d7bc09f9501affee77700541289da4ff112b8475 Parents: e40042b Author: Edison Su <[email protected]> Authored: Thu Jan 3 11:35:41 2013 -0800 Committer: Edison Su <[email protected]> Committed: Thu Jan 3 11:35:41 2013 -0800 ---------------------------------------------------------------------- .../image/motion/DefaultImageMotionStrategy.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d7bc09f9/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java ---------------------------------------------------------------------- diff --git a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java index 015d009..91cacdb 100644 --- a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java +++ b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java @@ -30,6 +30,8 @@ import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO; import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo; import org.springframework.stereotype.Component; +import com.cloud.agent.api.Answer; + @Component public class DefaultImageMotionStrategy implements ImageMotionStrategy { @@ -71,16 +73,16 @@ public class DefaultImageMotionStrategy implements ImageMotionStrategy { ImageOnPrimayDataStoreTO imageTo = new ImageOnPrimayDataStoreTO(templateStore); CopyTemplateToPrimaryStorageCmd copyCommand = new CopyTemplateToPrimaryStorageCmd(imageTo); CreateTemplateContext<CommandResult> context = new CreateTemplateContext<CommandResult>(callback, templateStore); - AsyncCallbackDispatcher<DefaultImageMotionStrategy> caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher<DefaultImageMotionStrategy, Answer> caller = AsyncCallbackDispatcher.create(this); caller.setCallback(caller.getTarget().copyTemplateCallBack(null, null)) .setContext(context); ep.sendMessageAsync(copyCommand, caller); } - public Object copyTemplateCallBack(AsyncCallbackDispatcher<DefaultImageMotionStrategy> callback, CreateTemplateContext<CommandResult> context) { + public Object copyTemplateCallBack(AsyncCallbackDispatcher<DefaultImageMotionStrategy, Answer> callback, CreateTemplateContext<CommandResult> context) { AsyncCompletionCallback<CommandResult> parentCall = context.getParentCallback(); - CopyTemplateToPrimaryStorageAnswer answer = callback.getResult(); + CopyTemplateToPrimaryStorageAnswer answer = (CopyTemplateToPrimaryStorageAnswer)callback.getResult(); CommandResult result = new CommandResult(); if (!answer.getResult()) {
