@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { ListResponse<UcsBladeResponse> response = mgr.listUcsBlades(this); response.setResponseName(getCommandName()); response.setObjectName("ucsblade"); this.setResponseObject(response); } catch (Exception e) { s_logger.warn(e.getMessage(), e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { ListResponse<UcsManagerResponse> response = mgr.listUcsManager(this); response.setResponseName(getCommandName()); response.setObjectName("ucsmanager"); this.setResponseObject(response); } catch (Exception e) { s_logger.warn("Exception: ", e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { ListResponse<UcsProfileResponse> response = mgr.listUcsProfiles(this); response.setResponseName(getCommandName()); response.setObjectName("ucsprofiles"); this.setResponseObject(response); } catch (Exception e) { s_logger.warn("Exception: ", e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }
@Override public void execute() { LOGGER.info("'" + GetVolumeSnapshotDetailsCmd.class.getSimpleName() + ".execute' method invoked"); List<ApiVolumeSnapshotDetailsResponse> responses = util.getSnapshotDetails(snapshotUuid); ListResponse<ApiVolumeSnapshotDetailsResponse> listReponse = new ListResponse<>(); listReponse.setResponses(responses); listReponse.setResponseName(getCommandName()); listReponse.setObjectName("apivolumesnapshotdetails"); this.setResponseObject(listReponse); } }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { ListResponse<BaremetalRctResponse> response = new ListResponse<>(); List<BaremetalRctResponse> rctResponses = new ArrayList<>(); BaremetalRctResponse rsp = vlanMgr.listRct(); if (rsp != null) { rctResponses.add(rsp); } response.setResponses(rctResponses); response.setResponseName(getCommandName()); response.setObjectName("baremetalrcts"); this.setResponseObject(response); } catch (Exception e) { s_logger.debug("Exception happened while executing ListBaremetalRctCmd", e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { ListResponse<BaremetalPxeResponse> response = new ListResponse<BaremetalPxeResponse>(); List<BaremetalPxeResponse> pxeResponses = _pxeMgr.listPxeServers(this); response.setResponses(pxeResponses); response.setResponseName(getCommandName()); response.setObjectName("baremetalpxeservers"); this.setResponseObject(response); } catch (Exception e) { s_logger.debug("Exception happened while executing ListPingPxeServersCmd", e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { // preconditions to check: // if entity type is null entity uuid can not have a value Preconditions.checkArgument(StringUtils.isNotBlank(entityType) ? ! StringUtils.isNotBlank(uuid) : true, "I can search for an anotation on an entity or for a specific annotation, not both"); // if uuid has a value entity type and entity uuid can not have a value Preconditions.checkArgument(StringUtils.isNotBlank(uuid) ? entityType == null && entityUuid == null : true, "I will either search for a specific annotation or for annotations on an entity, not both"); ListResponse<AnnotationResponse> response = annotationService.searchForAnnotations(this); response.setResponseName(getCommandName()); this.setResponseObject(response); response.setObjectName("annotations"); }
@Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { try { ListResponse<BaremetalDhcpResponse> response = new ListResponse<BaremetalDhcpResponse>(); List<BaremetalDhcpResponse> dhcpResponses = _dhcpMgr.listBaremetalDhcps(this); response.setResponses(dhcpResponses); response.setResponseName(getCommandName()); response.setObjectName("baremetaldhcps"); this.setResponseObject(response); } catch (Exception e) { s_logger.debug("Exception happend while executing ListBaremetalDhcpCmd"); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } }