Package com.cloud.deploy

Examples of com.cloud.deploy.DeployDestination


                            Network newNetwork = _networkMgr.createGuestNetwork(requiredOfferings.get(0).getId(),
                                    newAccount.getAccountName() + "-network", newAccount.getAccountName() + "-network", null, null,
                                    null, null, newAccount, null, physicalNetwork, zone.getId(), ACLType.Account, null, null, null, null, true, null);
                            // if the network offering has persistent set to true, implement the network
                            if (requiredOfferings.get(0).getIsPersistent()) {
                                DeployDestination dest = new DeployDestination(zone, null, null, null);
                                UserVO callerUser = _userDao.findById(CallContext.current().getCallingUserId());
                                Journal journal = new Journal.LogJournal("Implementing " + newNetwork, s_logger);
                                ReservationContext context = new ReservationContextImpl(UUID.randomUUID().toString(),
                                        journal, callerUser, caller);
                                s_logger.debug("Implementing the network for account" + newNetwork + " as a part of" +
View Full Code Here


        DataCenter dc = _dcDao.findById(router.getDataCenterIdToDeployIn());
        HostPodVO pod = null;
        if (router.getPodIdToDeployIn() != null) {
            pod = _podDao.findById(router.getPodIdToDeployIn());
        }
        DeployDestination dest = new DeployDestination(dc, pod, null, null);

        ReservationContext context = new ReservationContextImpl(null, null, callerUser, owner);

        List<NicVO> nics = _nicDao.listByVmId(routerId);
View Full Code Here

        } else {
            s_logger.debug("Skip the shutting down of network id=" + networkId);
        }

        // implement the network elements and rules again
        DeployDestination dest = new DeployDestination(_dcDao.findById(network.getDataCenterId()), null, null, null);

        s_logger.debug("Implementing the network " + network + " elements and resources as a part of network restart");
        NetworkOfferingVO offering = _networkOfferingDao.findById(network.getNetworkOfferingId());

        try {
View Full Code Here

        }

        // 3) Implement the elements and rules again
        if (restartNetwork) {
            if (network.getState() != Network.State.Allocated) {
                DeployDestination dest = new DeployDestination(_dcDao.findById(network.getDataCenterId()), null, null, null);
                s_logger.debug("Implementing the network " + network + " elements and resources as a part of network update");
                try {
                    if (!changeCidr) {
                        implementNetworkElementsAndResources(dest, context, network, _networkOfferingDao.findById(network.getNetworkOfferingId()));
                    } else {
View Full Code Here

       
        VirtualMachine vm = vmProfile.getVirtualMachine();
        NetworkVO networkVO = _networksDao.findById(network.getId());
        DataCenter dc = _configMgr.getZone(network.getDataCenterId());
        Host host = _hostDao.findById(vm.getHostId());
        DeployDestination dest = new DeployDestination(dc, null, null, host);
       
        NicProfile nic = getNicProfileForVm(network, requested, vm);
       
        //1) allocate nic (if needed)
        if (nic == null) {
View Full Code Here

        final NetworkVO network = mock(NetworkVO.class);
        when(network.getName()).thenReturn("testnetwork");
        when(network.getState()).thenReturn(State.Implementing);
        when(network.getPhysicalNetworkId()).thenReturn(NETWORK_ID);

        final DeployDestination dest = mock(DeployDestination.class);

        final DataCenter dc = mock(DataCenter.class);
        when(dest.getDataCenter()).thenReturn(dc);

        final HostVO niciraHost = mock(HostVO.class);
        when(hostdao.findById(anyLong())).thenReturn(niciraHost);
        when(niciraHost.getDetail("transportzoneuuid")).thenReturn("aaaa");
        when(niciraHost.getDetail("transportzoneisotype")).thenReturn("stt");
View Full Code Here

        when(network.getState()).thenReturn(State.Implementing);
        when(network.getGateway()).thenReturn("10.1.1.1");
        when(network.getCidr()).thenReturn("10.1.1.0/24");
        when(network.getPhysicalNetworkId()).thenReturn(NETWORK_ID);

        final DeployDestination dest = mock(DeployDestination.class);

        final DataCenter dc = mock(DataCenter.class);
        when(dest.getDataCenter()).thenReturn(dc);

        final HostVO niciraHost = mock(HostVO.class);
        when(hostdao.findById(anyLong())).thenReturn(niciraHost);
        when(niciraHost.getDetail("transportzoneuuid")).thenReturn("aaaa");
        when(niciraHost.getDetail("transportzoneisotype")).thenReturn("stt");
View Full Code Here

        final NetworkVO network = mock(NetworkVO.class);
        when(network.getName()).thenReturn("testnetwork");
        when(network.getState()).thenReturn(State.Implementing);
        when(network.getPhysicalNetworkId()).thenReturn(NETWORK_ID);

        final DeployDestination dest = mock(DeployDestination.class);

        final DataCenter dc = mock(DataCenter.class);
        when(dest.getDataCenter()).thenReturn(dc);

        final HostVO niciraHost = mock(HostVO.class);
        when(hostdao.findById(anyLong())).thenReturn(niciraHost);
        when(niciraHost.getDetail("transportzoneuuid")).thenReturn("aaaa");
        when(niciraHost.getDetail("transportzoneisotype")).thenReturn("stt");
View Full Code Here

        when(network.getBroadcastDomainType()).thenReturn(BroadcastDomainType.Lswitch);
        when(network.getBroadcastUri()).thenReturn(new URI("lswitch:aaaaa"));
        when(network.getPhysicalNetworkId()).thenReturn(NETWORK_ID);
        when(netdao.findById(NETWORK_ID)).thenReturn(network);

        final DeployDestination dest = mock(DeployDestination.class);

        final DataCenter dc = mock(DataCenter.class);
        when(dest.getDataCenter()).thenReturn(dc);

        final HostVO niciraHost = mock(HostVO.class);
        when(hostdao.findById(anyLong())).thenReturn(niciraHost);
        when(niciraHost.getDetail("transportzoneuuid")).thenReturn("aaaa");
        when(niciraHost.getDetail("transportzoneisotype")).thenReturn("stt");
View Full Code Here

                }
            } else {
                //2.2 Start Internal LB vm per IP address
                List<? extends VirtualRouter> internalLbVms;
                try {
                    DeployDestination dest = new DeployDestination(_entityMgr.findById(DataCenter.class, network.getDataCenterId()), null, null, null);
                    internalLbVms = _internalLbMgr.deployInternalLbVm(network, sourceIp, dest, _accountMgr.getAccount(network.getAccountId()), null);
                } catch (InsufficientCapacityException e) {
                    s_logger.warn("Failed to apply lb rule(s) for ip " + sourceIp.addr() + "on the element " + getName() + " due to:", e);
                    return false;
                } catch (ConcurrentOperationException e) {
View Full Code Here

TOP

Related Classes of com.cloud.deploy.DeployDestination

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.