@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { bmMgr.notifyProvisionDone(this); this.setResponseObject(new SuccessResponse(getCommandName())); } catch (Exception e) { s_logger.warn(String.format("unable to notify baremetal provision done[mac:%s]", mac), e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { s_logger.trace("execute"); SuccessResponse resp = new SuccessResponse(); resp.setSuccess(_service.deleteSspHost(this)); this.setResponseObject(resp); }
@Override public void execute() { boolean result = _storageService.deleteImageStore(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete image store"); } } }
@Override public void execute() { boolean result = _configService.deleteServiceOffering(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete service offering"); } } }
@Override public void execute() { boolean result = _snapshotService.deleteSnapshotPolicies(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete snapshot policy"); } } }
@Override public void execute() { boolean result = _configService.deletePortableIpRange(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete portable ip range"); } }
@Override public void execute() { boolean result = _resourceService.deleteCluster(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete cluster"); } } }
@Override public void execute() { boolean result = _templateService.updateTemplateOrIsoPermissions(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update template/iso permissions"); } } }
private void setupResponse(final boolean result) { final SuccessResponse response = new SuccessResponse(); response.setSuccess(result); response.setResponseName(getCommandName()); response.setObjectName("ha"); setResponseObject(response); }
private void setupResponse(final boolean result) { final SuccessResponse response = new SuccessResponse(); response.setSuccess(result); response.setResponseName(getCommandName()); response.setObjectName("ha"); setResponseObject(response); }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { boolean result = _lbService.removeCertFromLoadBalancer(getLbRuleId()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove certificate from load balancer rule"); } }
private void setupResponse(final boolean result) { final SuccessResponse response = new SuccessResponse(); response.setSuccess(result); response.setResponseName(getCommandName()); response.setObjectName("ha"); setResponseObject(response); }
@Override public void execute() throws ResourceUnavailableException { CallContext.current().setEventDetails("Rule Id: " + id); boolean result = _firewallService.revokeEgressFirewallRule(id, true); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete egress firewall rule"); } }
@Override public void execute() throws ResourceUnavailableException, ConcurrentOperationException { CallContext.current().setEventDetails("Network ACL Id: " + id); boolean result = _vpcService.deleteVpcPrivateGateway(id); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete private gateway"); } }
@Override public void execute() { CallContext.current().setEventDetails("Guest OS Id: " + id); boolean result = _mgr.removeGuestOs(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove guest OS"); } }
@Override public void execute() { CallContext.current().setEventDetails("Dedicated guest vlan range Id: " + id); boolean result = _networkService.releaseDedicatedGuestVlanRange(getId()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release dedicated guest vlan range"); } }
@Override public void execute() { boolean result = caManager.revokeCertificate(getSerialBigInteger(), getCn(), getProvider()); SuccessResponse response = new SuccessResponse(getCommandName()); response.setSuccess(result); setResponseObject(response); }
@Override public void execute() { CallContext.current().setEventDetails("Load balancer ID: " + getId()); boolean result = _appLbService.deleteApplicationLoadBalancer(getId()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete load balancer"); } }
@Override public void execute() { AlertType alertType = AlertService.AlertType.generateAlert(getType(), getName()); if (_alertSvc.generateAlert(alertType, getZoneId(), getPodId(), getDescription())) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to generate an alert"); } }
@Override public void execute() { final Host host = _resourceService.getHost(getHostId()); if (host == null) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Unable to find host by ID: " + getHostId()); } boolean result = caManager.provisionCertificate(host, getReconnect(), getProvider()); SuccessResponse response = new SuccessResponse(getCommandName()); response.setSuccess(result); setResponseObject(response); }