Github user mike-tutkowski commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1403#discussion_r63079362
--- 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 --
Actually, @DaanHoogland, I was thinking of a different time when I
corrected an existing "Void" problem like this.
The reason I wrote it this way was to conform to existing code style in the
file (which was using Void (instead of void) for these types of methods and I
wasn't sure why, so I followed the pattern to be on the safe side).
---
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 [email protected] or file a JIRA ticket
with INFRA.
---