Package com.cloud.network.vpc

Examples of com.cloud.network.vpc.Vpc


        return _name;
    }
   
    @Override
    public long getEntityOwnerId() {
        Vpc vpc = _entityMgr.findById(Vpc.class, getId());
        if (vpc != null) {
            return vpc.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }
View Full Code Here


    /* (non-Javadoc)
     * @see com.cloud.network.vpc.Dao.VpcDao#getActiveVpcById(long)
     */
    @Override
    public Vpc getActiveVpcById(long vpcId) {
        Vpc vpc = findById(vpcId);
        if (vpc != null && vpc.getState() == Vpc.State.Enabled) {
            return vpc;
        }
       
        return null;
    }
View Full Code Here

        return _name;
    }
   
    @Override
    public long getEntityOwnerId() {
        Vpc vpc = _entityMgr.findById(Vpc.class, getId());
        if (vpc != null) {
            return vpc.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }
View Full Code Here

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }

    @Override
    public void execute(){
        Vpc result = _vpcService.updateVpc(getId(), getVpcName(), getDisplayText());
        if (result != null) {
            VpcResponse response = _responseGenerator.createVpcResponse(result);
            response.setResponseName(getCommandName());
            this.setResponseObject(response);
        } else {
View Full Code Here

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        Vpc vpc = _entityMgr.findById(Vpc.class, getId());
        if (vpc != null) {
            return vpc.getAccountId();
        }

        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
    }
View Full Code Here

    private long getZoneId() {
        if (zoneId != null) {
            return zoneId;
        } else if (vpcId != null) {
            Vpc vpc = _entityMgr.findById(Vpc.class, vpcId);
            if (vpc != null) {
                return vpc.getZoneId();
            }
        } else if (networkId != null) {
            Network ntwk = _entityMgr.findById(Network.class, networkId);
            if (ntwk != null) {
                return ntwk.getDataCenterId();
View Full Code Here

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        Vpc vpc = _vpcService.getVpc(vpcId);
        return vpc.getAccountId();
    }
View Full Code Here

        return networkDomain;
    }

    @Override
    public void create() throws ResourceAllocationException {
        Vpc vpc = _vpcService.createVpc(getZoneId(), getVpcOffering(), getEntityOwnerId(), getVpcName(), getDisplayText(),
                getCidr(), getNetworkDomain());
        if (vpc != null) {
            this.setEntityId(vpc.getId());
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to create a VPC");
        }
    }
View Full Code Here

        }
    }
   
    @Override
    public void execute() {
        Vpc vpc = null;
        try {
             if (_vpcService.startVpc(this.getEntityId(), true)) {
                 vpc = _vpcService.getVpc(getEntityId());
             }
        } catch (ResourceUnavailableException ex) {
View Full Code Here

   
    protected void getActiveVpc() {
        //test for active vpc
        boolean result = false;
        String msg = null;
        Vpc vpc = null;
        try {
            List<String> svcs = new ArrayList<String>();
            svcs.add(Service.SourceNat.getName());
            vpc = _vpcService.getActiveVpc(1);
            if (vpc != null) {
View Full Code Here

TOP

Related Classes of com.cloud.network.vpc.Vpc

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.