Package org.apache.cloudstack.api.response

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


    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
    ResourceAllocationException {
        try {
            boolean result = nwDeviceMgr.deleteNetworkDevice(this);
            if (result) {
                SuccessResponse response = new SuccessResponse(getCommandName());
                response.setResponseName(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete network device:" + getId());
            }
        } catch (InvalidParameterValueException ipve) {
View Full Code Here


    @Override
    public void execute(){
        boolean result = _resourceService.releaseHostReservation(getId());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release host reservation");
        }
    }
View Full Code Here

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

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

    @Override
    public void execute(){
        UserContext.current().setEventDetails("Physical Network Id: " + id);
        boolean result = _networkService.deletePhysicalNetwork(getId());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete physical network");
        }
    }
View Full Code Here

    @Override
    public void execute(){
        boolean result = _usageService.generateUsageRecords(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to generate usage records");
        }
    }
View Full Code Here

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

    @Override
    public void execute(){
        try{
            boolean result = _networkService.deleteNetworkServiceProvider(getId());
            if (result) {
                SuccessResponse response = new SuccessResponse(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete network service provider");
            }
        } catch (ResourceUnavailableException ex) {
View Full Code Here

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

    @Override
    public void execute(){
        boolean result = _configService.deleteDiskOffering(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete disk offering");
        }
    }
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.