Package com.cloud.api.response

Examples of com.cloud.api.response.SuccessResponse


  @Override
  public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
          ResourceAllocationException {
    try {
      _storageNetworkService.deleteIpRange(this);
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
    } catch (Exception e) {
      s_logger.warn("Failed to delete storage network ip range " + getId(), e);
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR, e.getMessage());
    }
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(BaseCmd.INTERNAL_ERROR, "Failed to delete customer VPN gateway");
        }
    }
View Full Code Here

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

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

   
    @Override
    public void execute(){
        boolean result = _userVmService.deleteVmGroup(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete vm group");
        }
    }
View Full Code Here

    public void execute() {
        UserContext.current().setEventDetails("Load balancer stickiness policy Id: " + getId());
        boolean result = _lbService.deleteLBStickinessPolicy(getId(), true);

        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete load balancer stickiness policy");
        }
    }
View Full Code Here

    public void execute() throws ResourceUnavailableException {
        UserContext.current().setEventDetails("Network ACL Id: " + id);
        boolean result = _networkACLService.revokeNetworkACL(id, true);
       
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete network ACL");
        }
    }
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(BaseCmd.INTERNAL_ERROR, "Failed to delete physical network");
        }
    }
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(BaseCmd.INTERNAL_ERROR, "Failed to delete static route");
        }
    }
View Full Code Here

    @Override
    public void execute() throws ResourceUnavailableException, NetworkRuleConflictException, InsufficientAddressCapacityException {
        boolean result = _rulesService.disableStaticNat(ipAddressId);
       
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to disable static nat");
        }
    }
View Full Code Here

TOP

Related Classes of com.cloud.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.