コード例 #1
0
 private void endRemoveSnapshotSingleDisk(boolean taskGroupSuccess) {
   ImagesContainterParametersBase parameters = buildRemoveSnapshotSingleDiskParameters();
   parameters.setTaskGroupSuccess(taskGroupSuccess);
   VdcReturnValueBase vdcReturnValue =
       Backend.getInstance()
           .endAction(VdcActionType.RemoveSnapshotSingleDisk, parameters, getCommandContext());
   enclosingCommand.getReturnValue().setSucceeded(vdcReturnValue.getSucceeded());
 }
コード例 #2
0
  private ImagesContainterParametersBase buildRemoveSnapshotSingleDiskParameters() {
    ImagesContainterParametersBase parameters = new ImagesContainterParametersBase(imageId, vmId);

    DiskImage dest =
        DbFacade.getInstance().getDiskImageDao().getAllSnapshotsForParent(imageId).get(0);

    parameters.setDestinationImageId(dest.getImageId());
    parameters.setEntityInfo(enclosingCommand.getParameters().getEntityInfo());
    parameters.setParentParameters(enclosingCommand.getParameters());
    parameters.setParentCommand(enclosingCommand.getActionType());
    parameters.setWipeAfterDelete(dest.isWipeAfterDelete());
    parameters.setSessionId(enclosingCommand.getParameters().getSessionId());
    return parameters;
  }