use of org.ovirt.engine.core.common.action.RemoveSnapshotParameters in project ovirt-engine by oVirt.
the class GlusterStorageSyncCommand method removeDRSnapshots.
private void removeDRSnapshots() {
for (Map.Entry<Guid, Guid> entry : getParameters().getVmIdSnapshotIds().entrySet()) {
RemoveSnapshotParameters removeSnapshotParameters = new RemoveSnapshotParameters(entry.getValue(), entry.getKey());
removeSnapshotParameters.setParentCommand(getActionType());
removeSnapshotParameters.setEndProcedure(EndProcedure.COMMAND_MANAGED);
removeSnapshotParameters.setParentParameters(getParameters());
removeSnapshotParameters.setNeedsLocking(false);
commandCoordinatorUtil.executeAsyncCommand(ActionType.RemoveSnapshot, removeSnapshotParameters, cloneContextAndDetachFromParent());
}
}
use of org.ovirt.engine.core.common.action.RemoveSnapshotParameters in project ovirt-engine by oVirt.
the class LiveMigrateDiskCommand method removeAutogeneratedSnapshot.
private void removeAutogeneratedSnapshot() {
RemoveSnapshotParameters removeSnapshotParameters = new RemoveSnapshotParameters(getParameters().getAutoGeneratedSnapshotId(), getVmId());
removeSnapshotParameters.setEndProcedure(EndProcedure.COMMAND_MANAGED);
removeSnapshotParameters.setParentCommand(getActionType());
removeSnapshotParameters.setParentParameters(getParameters());
removeSnapshotParameters.setNeedsLocking(false);
// This is required to prevent the freeLock() in RemoveSnapshotCommand#execute
// from being called and prematurely freeing the lock
removeSnapshotParameters.setFreeLockNeeded(false);
runInternalAction(ActionType.RemoveSnapshot, removeSnapshotParameters, ExecutionHandler.createInternalJobContext(createStepsContext(StepEnum.MERGE_SNAPSHOTS), liveStorageMigrationEngineLock));
}
use of org.ovirt.engine.core.common.action.RemoveSnapshotParameters in project ovirt-engine by oVirt.
the class VmSnapshotListModel method onRemove.
private void onRemove() {
Snapshot snapshot = getSelectedItem();
if (snapshot == null) {
cancel();
return;
}
VM vm = getEntity();
if (vm != null) {
Frontend.getInstance().runAction(ActionType.RemoveSnapshot, new RemoveSnapshotParameters(snapshot.getId(), vm.getId()), null, null);
}
getCanSelectSnapshot().setEntity(false);
cancel();
}
Aggregations