Package com.cloud.network.vpc

Examples of com.cloud.network.vpc.Vpc


public class UpdateVPCCmdByAdmin extends UpdateVPCCmd {
    public static final Logger s_logger = Logger.getLogger(UpdateVPCCmdByAdmin.class.getName());

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


public class CreateVPCCmdByAdmin extends CreateVPCCmd {
    public static final Logger s_logger = Logger.getLogger(CreateVPCCmdByAdmin.class.getName());

    @Override
    public void execute() {
        Vpc vpc = null;
        boolean success = true;
        try {
            if (isStart()) {
                success = _vpcService.startVpc(getEntityId(), true);
            } else {
View Full Code Here

        return BaseAsyncCmd.vpcSyncObject;
    }

    @Override
    public Long getSyncObjId() {
        Vpc vpc = _entityMgr.findById(Vpc.class, vpcId);
        if (vpc == null) {
            throw new InvalidParameterValueException("Invalid id is specified for the vpc");
        }
        return vpc.getId();
    }
View Full Code Here

        return display;
    }

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

        }
    }

    @Override
    public void execute() {
        Vpc vpc = null;
        boolean success = true;
        try {
            if (isStart()) {
                success = _vpcService.startVpc(getEntityId(), true);
            } else {
View Full Code Here

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        Vpc vpc = _entityMgr.findById(Vpc.class, vpcId);
        return vpc.getAccountId();
    }
View Full Code Here

        return s_name;
    }

    @Override
    public long getEntityOwnerId() {
        Vpc vpc = _entityMgr.findById(Vpc.class, getVpnGateway().getVpcId());
        return vpc.getAccountId();
    }
View Full Code Here

            List<IPAddressVO> ips = null;
            Account owner = _entityMgr.findById(Account.class, network.getAccountId());
            if (network.getVpcId() != null) {
                ips = _ipAddressDao.listByAssociatedVpc(network.getVpcId(), true);
                if (ips.isEmpty()) {
                    Vpc vpc = _vpcMgr.getActiveVpc(network.getVpcId());
                    s_logger.debug("Creating a source nat ip for vpc " + vpc);
                    _vpcMgr.assignSourceNatIpAddressToVpc(owner, vpc);
                }
            } else {
                ips = _ipAddressDao.listByAssociatedNetwork(network.getId(), true);
View Full Code Here

    @DB
    protected List<DomainRouterVO> findOrDeployVirtualRouterInVpc(Vpc vpc, DeployDestination dest, Account owner, Map<Param, Object> params)
        throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {

        s_logger.debug("Deploying Virtual Router in VPC " + vpc);
        Vpc vpcLock = _vpcDao.acquireInLockTable(vpc.getId());
        if (vpcLock == null) {
            throw new ConcurrentOperationException("Unable to lock vpc " + vpc.getId());
        }

        //1) Get deployment plan and find out the list of routers
View Full Code Here

                }
            }

            //add vpc cidr/dns/networkdomain to the boot load args
            StringBuilder buf = profile.getBootArgsBuilder();
            Vpc vpc = _entityMgr.findById(Vpc.class, vr.getVpcId());
            buf.append(" vpccidr=" + vpc.getCidr() + " domain=" + vpc.getNetworkDomain());

            buf.append(" dns1=").append(defaultDns1);
            if (defaultDns2 != null) {
                buf.append(" dns2=").append(defaultDns2);
            }
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.