cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mike-tutkowski <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Date Thu, 12 May 2016 20:00:04 GMT
Github user mike-tutkowski commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1403#discussion_r63086591
  
    --- Diff: engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
---
    @@ -554,6 +574,51 @@ protected Void managedCopyBaseImageCallback(AsyncCallbackDispatcher<VolumeServic
             return null;
         }
     
    +    protected Void createManagedTemplateImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl,
CreateCmdResult> callback, CreateVolumeContext<CreateCmdResult> context) {
    +        CreateCmdResult result = callback.getResult();
    +        VolumeApiResult res = new VolumeApiResult(null);
    +
    +        res.setResult(result.getResult());
    +
    +        AsyncCallFuture<VolumeApiResult> future = context.getFuture();
    +        DataObject templateOnPrimaryStoreObj = context.getVolume();
    +
    +        if (result.isSuccess()) {
    +            ((TemplateObject)templateOnPrimaryStoreObj).setInstallPath(result.getPath());
    +            templateOnPrimaryStoreObj.processEvent(Event.OperationSuccessed, result.getAnswer());
    +        }
    +        else {
    +            templateOnPrimaryStoreObj.processEvent(Event.OperationFailed);
    +        }
    +
    +        future.complete(res);
    +
    +        return null;
    +    }
    +
    +    protected Void copyManagedTemplateCallback(AsyncCallbackDispatcher<VolumeServiceImpl,
CopyCommandResult> callback, CreateBaseImageContext<VolumeApiResult> context) {
    --- End diff --
    
    @DaanHoogland I changed them back to the more traditional "void" return type. I'm not
sure why "Void" is being used for those kinds of methods in this class (I was thinking maybe
for AOP).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message