Package com.cloud.api.response

Examples of com.cloud.api.response.SuccessResponse


    @Override
    public void execute(){
        ManagementServerExt _mgrExt = (ManagementServerExt)_mgr;
        boolean result = _mgrExt.generateUsageRecords(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.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(BaseCmd.INTERNAL_ERROR, "Failed to delete service offering");
        }
    }
View Full Code Here

    @Override
    public void execute() {
        UserContext.current().setEventDetails("Project invitation id " + id);
        boolean result = _projectService.deleteProjectInvitation(id);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete the project invitation");
        }
    }
View Full Code Here

    @Override
    public void execute(){
        UserContext.current().setEventDetails("Account Id: "+getId());
        boolean result = _accountService.deleteUserAccount(getId());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete user account and all corresponding users");
        }
    }
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(BaseCmd.INTERNAL_ERROR, "Failed to delete traffic type");
        }
    }
View Full Code Here

        UserContext.current().setEventDetails("Rule Id: "+id);
      boolean result = _firewallService.revokeRelatedFirewallRule(id, true);
      result = result && _rulesService.revokeStaticNatRule(id, true)

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

    @Override
    public void execute(){
        boolean result = false;
        result = _s2sVpnService.deleteVpnGateway(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

      ExternalNetworkDeviceManager nwDeviceMgr;
      ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
      nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class);
      boolean result = nwDeviceMgr.deleteNetworkDevice(this);
      if (result) {
        SuccessResponse response = new SuccessResponse(getCommandName());
        response.setResponseName(getCommandName());
        this.setResponseObject(response);
      } else {
        throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete network device:" + getId());
      }
    } catch (InvalidParameterValueException ipve) {
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(BaseCmd.INTERNAL_ERROR, "Failed to delete iso");
        }
    }
View Full Code Here

    @Override
    public void execute() throws ResourceUnavailableException, ConcurrentOperationException {
        UserContext.current().setEventDetails("Network ACL Id: " + id);
        boolean result = _vpcService.deleteVpcPrivateGateway(id);       
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete private gateway");
        }
    }
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.