public void prepare2() { PreparingEnlistment enlistment = (PreparingEnlistment) context.enlistment; ActionReturnValue returnValue = context.changeVDSClusterReturnValue; context.enlistment = null; if (returnValue != null && returnValue.getSucceeded()) { enlistment.prepared(); } else { enlistment.forceRollback(); } }
private void postLogin( ActionReturnValue returnValue, SanStorageModelBase sanStorageModel) { SanTargetModel sanTargetModel = sanStorageModel.targetsToConnect.remove(0); boolean success = returnValue != null && returnValue.getSucceeded(); if (success) { sanTargetModel.setIsLoggedIn(true); sanTargetModel.getLoginCommand().setIsExecutionAllowed(false); } if (sanStorageModel.targetsToConnect.isEmpty()) { sanStorageModel.updateInternal(); } }
public void postUpdateVmTemplate(ActionReturnValue returnValue) { UnitVmModel model = (UnitVmModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); } }
public void postOnAddBricks(ActionReturnValue returnValue) { VolumeBrickModel model = (VolumeBrickModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); } }
@Override public Response add(GraphicsConsole console) { GraphicsDevice device = getMapper(GraphicsConsole.class, GraphicsDevice.class).map(console, null); device.setVmId(guid); ActionReturnValue res = doCreateEntity(ActionType.AddGraphicsAndVideoDevices, createAddGraphicsDeviceParams(device)); if (res != null && res.getSucceeded()) { return BackendGraphicsConsoleHelper.find(console, this::list); } throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build()); }
public void postOnSetParameter(ActionReturnValue returnValue) { VolumeParameterModel model = (VolumeParameterModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); } }
private void postCreateBrick(ActionReturnValue returnValue) { CreateBrickModel model = (CreateBrickModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { setWindow(null); } }
public void postOnAddCluster(ActionReturnValue returnValue) { ClusterModel model = (ClusterModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); postAction(); } }
public void postOnSaveInternal(ActionReturnValue returnValue, boolean approveInitiated) { HostModel model = (HostModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { if (approveInitiated) { onApproveInternal(); } cancel(); } }
public void postOnAddHost(ActionReturnValue returnValue) { HostModel model = (HostModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); postAction(); } }
public void postOnAddHost(ActionReturnValue returnValue) { HostModel model = (HostModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); postAction(); } }
private void invokeHostUpgrade(UpgradeHostParameters params) { Frontend.getInstance().runAction(ActionType.UpgradeHost, params, result -> { ActionReturnValue returnValue = result.getReturnValue(); if (returnValue != null && returnValue.getSucceeded()) { getCancelCommand().execute(); } }); } }
private void invokeHostUpgrade(UpgradeHostParameters params) { Frontend.getInstance().runAction(ActionType.UpgradeHost, params, result -> { ActionReturnValue returnValue = result.getReturnValue(); if (returnValue != null && returnValue.getSucceeded()) { getCancelCommand().execute(); } }); } }
private void prepare3() { PreparingEnlistment enlistment = (PreparingEnlistment) context.enlistment; EnlistmentContext enlistmentContext = (EnlistmentContext) enlistment.getContext(); ActionReturnValue returnValue = context.addDataCenterReturnValue; context.enlistment = null; if (returnValue != null && returnValue.getSucceeded()) { enlistmentContext.setDataCenterId((Guid) returnValue.getActionReturnValue()); enlistment.prepared(); } else { enlistment.forceRollback(); } }
public void postOnSave(ActionReturnValue returnValue) { TagModel model = (TagModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); getSearchCommand().execute(); } }
private void invokeCheckForHostUpgrade(VdsActionParameters params) { Frontend.getInstance().runAction(ActionType.HostUpgradeCheck, params, result -> { ActionReturnValue returnValue = result.getReturnValue(); if (returnValue != null && returnValue.getSucceeded()) { getCancelCommand().execute(); } }); } }
private void setErrorMessage(ActionReturnValue result, GlusterVolumeGeoRepActionConfirmationModel cModel) { String errorMessage = ""; //$NON-NLS-1$ if (result == null) { errorMessage = ConstantsManager.getInstance().getConstants().testFailedUnknownErrorMsg(); } else if (!result.getSucceeded()) { errorMessage = result.isValid() ? result.getFault().getMessage() : result.getValidationMessages().get(0); } cModel.setActionConfirmationMessage(errorMessage); } }
public void postOnCreateVolume(ActionReturnValue returnValue, GlusterVolumeEntity volume) { VolumeModel model = (VolumeModel) getWindow(); model.stopProgress(); if (returnValue != null && returnValue.getSucceeded()) { cancel(); if (model.getOptimizeForVirtStore().getEntity()) { volume.setId((Guid) returnValue.getActionReturnValue()); optimizeVolumesForVirtStore(Arrays.asList(volume)); } } }
private void setTestResultValue(ActionReturnValue result) { String errorMessage = EMPTY_ERROR_MESSAGE; if (result == null) { errorMessage = ConstantsManager.getInstance().getConstants().testFailedUnknownErrorMsg(); } else if (!result.getSucceeded()) { errorMessage = result.isValid() ? result.getFault().getMessage() : result.getValidationMessages().get(0); } getTestResult().setEntity(errorMessage); }
private void initiateResumeUploadStartTransfer(FrontendActionAsyncResult result) { if (result.getReturnValue() != null && result.getReturnValue().getSucceeded()) { ImageTransfer rv = result.getReturnValue().getActionReturnValue(); setCommandId(rv.getId()); setBytesSent(rv.getBytesSent()); setBytesEndOffset(rv.getBytesTotal()); startStatusPolling(); } else { setProgressStr(messages.uploadImageFailedToResumeMessage(result.getReturnValue().getDescription())); } }