Package org.apache.cloudstack.api.response

Examples of org.apache.cloudstack.api.response.SuccessResponse


    @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);
    }
View Full Code Here


    @Override
    public void execute(){
        boolean result = dedicatedService.releaseDedicatedResource(null, getPodId(), null, null);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release dedicated pod");
        }
    }
View Full Code Here

    @Override
    public void execute(){
        boolean result = dedicatedService.releaseDedicatedResource(null, null, getClusterId(), null);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release dedicated cluster");
        }
    }
View Full Code Here

    @Override
    public void execute(){
        boolean result = dedicatedService.releaseDedicatedResource(null, null, null, getHostId());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release dedicated Host");
        }
    }
View Full Code Here

    @Override
    public void execute(){
        boolean result = dedicatedService.releaseDedicatedResource(getZoneId(), null, null, null);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release dedicated zone");
        }
    }
View Full Code Here

    @Override
    public void execute(){
        UserContext.current().setEventDetails("Zone Id: "+getId());
        boolean result = _configService.deleteZone(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete zone");
        }
    }
View Full Code Here

        boolean result = _simMgr.configureSimulator(zoneId, podId, clusterId, hostId, command, values);
        if (!result) {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to configure simulator");
        }

        SuccessResponse response = new SuccessResponse(getCommandName());
        this.setResponseObject(response);
    }
View Full Code Here

    @Override
    public void execute() {
        UserContext.current().setEventDetails("vmsnapshot id: " + getId());
        boolean result = _vmSnapshotService.deleteVMSnapshot(getId());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm snapshot");
        }
    }
View Full Code Here

        } else if (startDate != null && endDate == null) {
            throw new InvalidParameterValueException("enddate must be specified with startdate parameter");
        }
        boolean result = _mgr.archiveAlerts(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to archive Alerts, one or more parameters has invalid values");
        }
    }
View Full Code Here

    @Override
    public void execute(){
        boolean result = _configService.deletePod(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete pod");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.api.response.SuccessResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.