Examples of SuccessResponse


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

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

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

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

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

    @Override
    public void execute() throws ResourceUnavailableException, ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException {
        boolean result = _networkService.restartNetwork(this, getCleanup());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to restart network");
        }
    }
View Full Code Here

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

    @Override
    public void execute() {
        boolean result = _securityGroupService.revokeSecurityGroupEgress(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to revoke security group egress rule");
        }
    }
View Full Code Here

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

    @Override
    public void execute() {
        boolean result = _securityGroupService.revokeSecurityGroupIngress(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to revoke security group ingress rule");
        }
    }
View Full Code Here

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

        } else {
            result = _networkACLService.replaceNetworkACL(aclId, networkId);
        }

        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to replace network ACL");
        }
    }
View Full Code Here

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

    public void execute() throws ResourceUnavailableException {
        UserContext.current().setEventDetails("Network ACL Item Id: " + id);
        boolean result = _networkACLService.revokeNetworkACLItem(id);

        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete network ACL Item");
        }
    }
View Full Code Here

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

    public void execute() throws ResourceUnavailableException {
        UserContext.current().setEventDetails("Network ACL Id: " + id);
        boolean result = _networkACLService.deleteNetworkACL(id);

        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete network ACL");
        }
    }
View Full Code Here

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

    @Override
    public void execute(){
        try {
            boolean result = _s2sVpnService.deleteVpnConnection(this);
            if (result) {
                SuccessResponse response = new SuccessResponse(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete site to site VPN connection");
            }
        } catch (ResourceUnavailableException ex) {
View Full Code Here

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

    @Override
    public void execute(){
        try{
            boolean result = _securityGroupService.deleteSecurityGroup(this);
            if (result) {
                SuccessResponse response = new SuccessResponse(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete security group");
            }
        } catch (ResourceInUseException ex) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.