mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-21 13:03:10 +01:00
Fix build.
This commit is contained in:
parent
8a1a51c6fc
commit
bc91e7692d
@ -44,7 +44,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService.VolumeApiResult;
|
||||
import org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk;
|
||||
import org.apache.cloudstack.framework.async.AsyncCallFuture;
|
||||
import org.apache.cloudstack.storage.RemoteHostEndPoint;
|
||||
import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
|
||||
|
||||
@ -2122,35 +2122,6 @@ ServerResource {
|
||||
return new DeleteSnapshotBackupAnswer(cmd, true, null);
|
||||
}
|
||||
|
||||
protected Answer execute(DeleteSnapshotsDirCommand cmd) {
|
||||
Long dcId = cmd.getDcId();
|
||||
Long accountId = cmd.getAccountId();
|
||||
Long volumeId = cmd.getVolumeId();
|
||||
KVMStoragePool secondaryStoragePool = null;
|
||||
try {
|
||||
secondaryStoragePool = _storagePoolMgr.getStoragePoolByURI(cmd
|
||||
.getSecondaryStorageUrl());
|
||||
|
||||
String ssPmountPath = secondaryStoragePool.getLocalPath();
|
||||
String snapshotDestPath = ssPmountPath + File.separator
|
||||
+ "snapshots" + File.separator + dcId + File.separator
|
||||
+ accountId + File.separator + volumeId;
|
||||
|
||||
final Script command = new Script(_manageSnapshotPath,
|
||||
_cmdsTimeout, s_logger);
|
||||
command.add("-d", snapshotDestPath);
|
||||
command.add("-f");
|
||||
command.execute();
|
||||
} catch (CloudRuntimeException e) {
|
||||
return new Answer(cmd, false, e.toString());
|
||||
} finally {
|
||||
if (secondaryStoragePool != null) {
|
||||
_storagePoolMgr.deleteStoragePool(secondaryStoragePool.getType(),secondaryStoragePool.getUuid());
|
||||
}
|
||||
|
||||
}
|
||||
return new Answer(cmd, true, null);
|
||||
}
|
||||
|
||||
protected CreateVolumeFromSnapshotAnswer execute(
|
||||
final CreateVolumeFromSnapshotCommand cmd) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user