Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62881152 --- 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; --- End diff -- why Void and return null instead of void and return?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---