コード例 #1
0
  private Guid addDisk(DiskImage disk) {
    VdcReturnValueBase returnValue =
        getBackend()
            .runInternalAction(
                VdcActionType.AddDisk,
                buildAddDiskParameters(disk),
                enclosingCommand.getContext().clone());

    if (!returnValue.getSucceeded()) {
      throw new EngineException(
          returnValue.getFault().getError(),
          String.format("Failed to create disk! %s", disk.getDiskAlias()));
    }

    enclosingCommand.getTaskIdList().addAll(returnValue.getInternalVdsmTaskIdList());
    return returnValue.getActionReturnValue();
  }