Package org.apache.cloudstack.api.response

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


    @Override
    public void execute(){
        try {
            boolean result = _vpcService.restartVpc(getId());
            if (result) {
                SuccessResponse response = new SuccessResponse(getCommandName());
                this.setResponseObject(response);
            } else {
                throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to restart VPC");
            }
        } catch (ResourceUnavailableException ex) {
View Full Code Here


    public void execute() throws ResourceUnavailableException {
        UserContext.current().setEventDetails("Route Id: " + id);
        boolean result = _vpcService.revokeStaticRoute(id);

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

    }

    @Override
    public void execute(){
        _resourceMetaDataService.deleteResourceMetaData(getResourceId(), getResourceType(), getKey());
        this.setResponseObject(new SuccessResponse(getCommandName()));
    }
View Full Code Here

    }

    @Override
    public void execute(){
        _resourceMetaDataService.addResourceMetaData(getResourceId(), getResourceType(), getDetails());
        this.setResponseObject(new SuccessResponse(getCommandName()));
    }
View Full Code Here

    @Override
    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
      boolean result = _ciscoNexusVSMService.deleteCiscoNexusVSM(this);
        if (result) {
          SuccessResponse response = new SuccessResponse(getCommandName());
          response.setResponseName(getCommandName());
          this.setResponseObject(response);
        } else {
          throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Cisco Nexus VSM device");
        }
    }
View Full Code Here

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

        }

        if (!_ravService.applyVpnUsers(owner.getId(), userName)) {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to apply vpn user removal");
        }
        SuccessResponse response = new SuccessResponse(getCommandName());
        setResponseObject(response);
    }
View Full Code Here

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

    @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

    @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

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.