cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [5/6] git commit: updated refs/heads/object_store to 8a514ea
Date Wed, 08 May 2013 00:45:27 GMT
Change VMTemplate state in destroy.


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

Branch: refs/heads/object_store
Commit: d79b890904347c4ded0f5713e22776e974164e8c
Parents: 8984e43
Author: Min Chen <min.chen@citrix.com>
Authored: Tue May 7 17:42:52 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Tue May 7 17:45:06 2013 -0700

----------------------------------------------------------------------
 .../storage/image/TemplateServiceImpl.java         |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d79b8909/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 3fee59c..b19fc65 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -511,8 +511,8 @@ public class TemplateServiceImpl implements TemplateService {
         return future;
     }
 
-    public Void deleteTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, TemplateApiResult>
callback, TemplateOpContext<TemplateApiResult> context) {
-        TemplateApiResult result = callback.getResult();
+    public Void deleteTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, CommandResult>
callback, TemplateOpContext<TemplateApiResult> context) {
+        CommandResult result = callback.getResult();
         TemplateObject vo = context.getTemplate();
         // we can only update state in template_store_ref table
          if (result.isSuccess()) {
@@ -520,7 +520,10 @@ public class TemplateServiceImpl implements TemplateService {
         } else {
             vo.processEvent(Event.OperationFailed);
          }
-        context.future.complete(result);
+        TemplateApiResult apiResult = new TemplateApiResult(vo);
+        apiResult.setResult(result.getResult());
+        apiResult.setSucess(result.isSuccess());
+        context.future.complete(apiResult);
         return null;
     }
 


Mime
View raw message