Examples of PrivateGateway


Examples of com.cloud.network.vpc.PrivateGateway

    }


    @Override
    public void create() throws ResourceAllocationException {
        PrivateGateway result = null;
        try {
            result = _vpcService.createVpcPrivateGateway(getVpcId(), getPhysicalNetworkId(),
                    getVlan(), getStartIp(), getGateway(), getNetmask(), getEntityOwnerId(), getIsSourceNat(), getAclId());
        } catch (InsufficientCapacityException ex){
            s_logger.info(ex);
            s_logger.trace(ex);
            throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());
        } catch (ConcurrentOperationException ex) {
            s_logger.warn("Exception: ", ex);
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
        }

        if (result != null) {
            this.setEntityId(result.getId());
            this.setEntityUuid(result.getUuid());
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create private gateway");
        }
    }
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

    }

    @Override
    public void execute() throws InsufficientCapacityException, ConcurrentOperationException,
    ResourceAllocationException, ResourceUnavailableException {
        PrivateGateway result = _vpcService.applyVpcPrivateGateway(getEntityId(), true);
        if (result != null) {
            PrivateGatewayResponse response = _responseGenerator.createPrivateGatewayResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

                Matchers.anyList())).thenReturn(applyNetworkACLs);

        // Make sure it applies ACL to private gateway
        List<VpcGatewayVO> vpcGateways = new ArrayList<VpcGatewayVO>();
        VpcGatewayVO vpcGateway = Mockito.mock(VpcGatewayVO.class);
        PrivateGateway privateGateway = Mockito.mock(PrivateGateway.class);
        Mockito.when(_vpcSvc.getVpcPrivateGateway(Mockito.anyLong())).thenReturn(privateGateway);
        vpcGateways.add(vpcGateway);
        Mockito.when(_vpcGatewayDao.listByAclIdAndType(aclId, VpcGateway.Type.Private))
            .thenReturn(vpcGateways);
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

        return s_name;
    }

    @Override
    public void create() throws ResourceAllocationException {
        PrivateGateway result = null;
        try {
            result =
                _vpcService.createVpcPrivateGateway(getVpcId(), getPhysicalNetworkId(), getBroadcastUri(), getStartIp(), getGateway(), getNetmask(), getEntityOwnerId(),
                    getNetworkOfferingId(), getIsSourceNat(), getAclId());
        } catch (InsufficientCapacityException ex) {
            s_logger.info(ex);
            s_logger.trace(ex);
            throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());
        } catch (ConcurrentOperationException ex) {
            s_logger.warn("Exception: ", ex);
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
        }

        if (result != null) {
            setEntityId(result.getId());
            setEntityUuid(result.getUuid());
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create private gateway");
        }
    }
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

        }
    }

    @Override
    public void execute() throws InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException, ResourceUnavailableException {
        PrivateGateway result = _vpcService.applyVpcPrivateGateway(getEntityId(), true);
        if (result != null) {
            PrivateGatewayResponse response = _responseGenerator.createPrivateGatewayResponse(result);
            response.setResponseName(getCommandName());
            setResponseObject(response);
        } else {
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

    }


    @Override
    public void create() throws ResourceAllocationException {
        PrivateGateway result = null;
        try {
            result = _vpcService.createVpcPrivateGateway(getVpcId(), getPhysicalNetworkId(),
                    getVlan(), getStartIp(), getGateway(), getNetmask(), getEntityOwnerId());
        } catch (InsufficientCapacityException ex){
            s_logger.info(ex);
            s_logger.trace(ex);
            throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());
        } catch (ConcurrentOperationException ex) {
            s_logger.warn("Exception: ", ex);
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
        }

        if (result != null) {
            this.setEntityId(result.getId());
            this.setEntityUuid(result.getUuid());
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create private gateway");
        }
    }
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

    }

    @Override
    public void execute() throws InsufficientCapacityException, ConcurrentOperationException,
    ResourceAllocationException, ResourceUnavailableException {
        PrivateGateway result = _vpcService.applyVpcPrivateGateway(getEntityId(), true);
        if (result != null) {
            PrivateGatewayResponse response = _responseGenerator.createPrivateGatewayResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

    }
   
   
    @Override
    public void create() throws ResourceAllocationException {
        PrivateGateway result = null;
        try {
            result = _vpcService.createVpcPrivateGateway(getVpcId(), getPhysicalNetworkId(),
                    getVlan(), getStartIp(), getGateway(), getNetmask(), getEntityOwnerId());
        } catch (InsufficientCapacityException ex){
            s_logger.info(ex);
            s_logger.trace(ex);
            throw new ServerApiException(BaseCmd.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());
        } catch (ConcurrentOperationException ex) {
            s_logger.warn("Exception: ", ex);
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, ex.getMessage());
        }
       
        if (result != null) {
            this.setEntityId(result.getId());
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to create private gateway");
        }
    }
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

    }
   
    @Override
    public void execute() throws InsufficientCapacityException, ConcurrentOperationException,
    ResourceAllocationException, ResourceUnavailableException {
        PrivateGateway result = _vpcService.applyVpcPrivateGateway(getEntityId(), true);
        if (result != null) {
            PrivateGatewayResponse response = _responseGenerator.createPrivateGatewayResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
View Full Code Here

Examples of com.cloud.network.vpc.PrivateGateway

    }


    @Override
    public void create() throws ResourceAllocationException {
        PrivateGateway result = null;
        try {
            result = _vpcService.createVpcPrivateGateway(getVpcId(), getPhysicalNetworkId(),
                    getBroadcastUri(), getStartIp(), getGateway(), getNetmask(), getEntityOwnerId(), getNetworkOfferingId(), getIsSourceNat(), getAclId());
        } catch (InsufficientCapacityException ex){
            s_logger.info(ex);
            s_logger.trace(ex);
            throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());
        } catch (ConcurrentOperationException ex) {
            s_logger.warn("Exception: ", ex);
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage());
        }

        if (result != null) {
            setEntityId(result.getId());
            setEntityUuid(result.getUuid());
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create private gateway");
        }
    }
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.