@Override public void execute() { boolean result = _networkService.releasePodIp(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); response.setDisplayText("IP is released sucessfully"); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release Pod ip "); } } }
@Override public void execute() throws ServerApiException, ConcurrentOperationException, EntityExistsException { SuccessResponse response = new SuccessResponse(); try { boolean result = _netsclarLbService.deleteNetscalerControlCenter(this); if (response != null && result) { response.setDisplayText("Netscaler Control Center Deleted Successfully"); response.setSuccess(result); response.setResponseName(getCommandName()); setResponseObject(response); } } catch (CloudRuntimeException runtimeExcp) { response.setDisplayText(runtimeExcp.getMessage()); response.setSuccess(false); response.setResponseName(getCommandName()); setResponseObject(response); return; } catch (Exception e) { e.printStackTrace(); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }
@Override public void execute() throws ServerApiException, ConcurrentOperationException, EntityExistsException { SuccessResponse response = new SuccessResponse(); try { boolean result = _netsclarLbService.deleteServicePackageOffering(this); if (response != null && result) { response.setDisplayText("Deleted Successfully"); response.setSuccess(result); response.setResponseName(getCommandName()); this.setResponseObject(response); } } catch (CloudRuntimeException runtimeExcp) { response.setDisplayText(runtimeExcp.getMessage()); response.setSuccess(false); response.setResponseName(getCommandName()); this.setResponseObject(response); return; } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Service Package due to internal error."); } }