diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java b/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java index 45d3fcf2aae..b709991ee57 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java +++ b/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java @@ -91,7 +91,7 @@ public class HypervsiorHostEndPointRpcServer implements HostEndpointRpcServer { @Override public Answer sendCommand(HypervisorHostEndPoint host, Command command) { SendCommandContext context = new SendCommandContext(null); - AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setCallback(caller.getTarget().sendCommandCallback(null, null)) .setContext(context); @@ -109,7 +109,7 @@ public class HypervsiorHostEndPointRpcServer implements HostEndpointRpcServer { return context.getAnswer(); } - protected Object sendCommandCallback(AsyncCallbackDispatcher callback, SendCommandContext context) { + protected Object sendCommandCallback(AsyncCallbackDispatcher callback, SendCommandContext context) { context.setAnswer((Answer)callback.getResult()); synchronized(context) { context.notify(); diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java index 5449534deec..f9900adc766 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java @@ -204,7 +204,7 @@ public class VolumeEntityImpl implements VolumeEntity { public boolean createVolumeFromTemplate(long dataStoreId, VolumeDiskType diskType, TemplateEntity template) { TemplateInfo ti = ((TemplateEntityImpl)template).getTemplateInfo(); - AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setCallback(caller.getTarget().createVolumeFromTemplateAsyncCallback(null, null)); vs.createVolumeFromTemplateAsync(volumeInfo, dataStoreId, diskType, ti, caller); @@ -219,7 +219,7 @@ public class VolumeEntityImpl implements VolumeEntity { } - private Void createVolumeFromTemplateAsyncCallback(AsyncCompletionCallback callback, Object context) { + private Void createVolumeFromTemplateAsyncCallback(AsyncCallbackDispatcher callback, Object context) { synchronized (volumeInfo) { volumeInfo.notify(); } @@ -228,7 +228,7 @@ public class VolumeEntityImpl implements VolumeEntity { @Override public boolean createVolume(long dataStoreId, VolumeDiskType diskType) { - AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setCallback(caller.getTarget().createVolumeCallback(null, null)); vs.createVolumeAsync(volumeInfo, dataStoreId, diskType, caller); try { @@ -245,7 +245,7 @@ public class VolumeEntityImpl implements VolumeEntity { } } - private Void createVolumeCallback(AsyncCallbackDispatcher callback, Object context) { + private Void createVolumeCallback(AsyncCallbackDispatcher callback, Object context) { synchronized (volumeInfo) { this.result = callback.getResult(); volumeInfo.notify(); diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java index fcf6f987032..f6f77b95fd6 100644 --- a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java @@ -87,5 +87,5 @@ public interface VolumeService { VolumeEntity getVolumeEntity(long volumeId); void createVolumeFromTemplateAsync(VolumeInfo volume, long dataStoreId, VolumeDiskType diskType, TemplateInfo template, - AsyncCompletionCallback callback); + AsyncCompletionCallback callback); } diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java index e88d707e26c..88eeca250f8 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java @@ -65,14 +65,14 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver CreateVolumeCommand createCmd = new CreateVolumeCommand(this.dataStore.getVolumeTO(volInfo)); CreateVolumeContext context = new CreateVolumeContext(callback, vol); - AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setContext(context) .setCallback(caller.getTarget().createVolumeAsyncCallback(null, null)); ep.sendMessageAsync(createCmd, caller); } - protected Void createVolumeAsyncCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { + protected Void createVolumeAsyncCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { CommandResult result = new CommandResult(); CreateVolumeAnswer volAnswer = (CreateVolumeAnswer) callback.getResult(); if (volAnswer.getResult()) { @@ -156,7 +156,7 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver EndPoint ep = endPoints.get(0); CreateVolumeFromBaseImageContext context = new CreateVolumeFromBaseImageContext(callback, volume); - AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setContext(context) .setCallback(caller.getTarget().createVolumeFromBaseImageAsyncCallback(null, null)); @@ -165,7 +165,7 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver } - public Object createVolumeFromBaseImageAsyncCallback(AsyncCallbackDispatcher callback, CreateVolumeFromBaseImageContext context) { + public Object createVolumeFromBaseImageAsyncCallback(AsyncCallbackDispatcher callback, CreateVolumeFromBaseImageContext context) { CreateVolumeAnswer answer = (CreateVolumeAnswer)callback.getResult(); CommandResult result = new CommandResult(); if (answer == null || answer.getDetails() != null) { diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java index d5d26819181..f57b428ce4a 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java @@ -91,14 +91,14 @@ public class VolumeServiceImpl implements VolumeService { vo.stateTransit(Volume.Event.CreateRequested); CreateVolumeContext context = new CreateVolumeContext(callback, vo); - AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setCallback(caller.getTarget().createVolumeCallback(null, null)) .setContext(context); dataStore.createVolumeAsync(vo, diskType, caller); } - protected Void createVolumeCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { + protected Void createVolumeCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { CommandResult result = callback.getResult(); VolumeObject vo = context.getVolume(); VolumeApiResult volResult = new VolumeApiResult(vo); diff --git a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java index a891ffec165..54d12c97fc9 100644 --- a/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java +++ b/plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java @@ -11,12 +11,6 @@ import org.apache.cloudstack.storage.volume.VolumeObject; public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { - @Override - public boolean createVolumeAsync(VolumeObject vol) { - // TODO Auto-generated method stub - return false; - } - @Override public boolean deleteVolume(VolumeObject vo) { // TODO Auto-generated method stub @@ -77,4 +71,10 @@ public class SolidfirePrimaryDataStoreDriver implements PrimaryDataStoreDriver { } + @Override + public void createVolumeAsync(VolumeObject vol, AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + }