Package com.cloud.network

Examples of com.cloud.network.NiciraNvpDeviceVO


        if (devices.isEmpty()) {
            s_logger.error("No NiciraNvp Controller on physical network "
                    + network.getPhysicalNetworkId());
            return false;
        }
        NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
        HostVO niciraNvpHost = _hostDao.findById(niciraNvpDevice.getHostId());
        _hostDao.loadDetails(niciraNvpHost);

        Account owner = context.getAccount();

        // Implement SourceNat immediately as we have al the info already
View Full Code Here


        if (devices.isEmpty()) {
            s_logger.error("No NiciraNvp Controller on physical network "
                    + network.getPhysicalNetworkId());
            return false;
        }
        NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
        HostVO niciraNvpHost = _hostDao.findById(niciraNvpDevice.getHostId());

        NiciraNvpNicMappingVO existingNicMap = _niciraNvpNicMappingDao
                .findByNicUuid(nicVO.getUuid());
        if (existingNicMap != null) {
            FindLogicalSwitchPortCommand findCmd = new FindLogicalSwitchPortCommand(
View Full Code Here

        if (devices.isEmpty()) {
            s_logger.error("No NiciraNvp Controller on physical network "
                    + network.getPhysicalNetworkId());
            return false;
        }
        NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
        HostVO niciraNvpHost = _hostDao.findById(niciraNvpDevice.getHostId());

        NiciraNvpNicMappingVO nicMap = _niciraNvpNicMappingDao
                .findByNicUuid(nicVO.getUuid());
        if (nicMap == null) {
            s_logger.error("No mapping for nic " + nic.getName());
View Full Code Here

        if (devices.isEmpty()) {
            s_logger.error("No NiciraNvp Controller on physical network "
                    + network.getPhysicalNetworkId());
            return false;
        }
        NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
        HostVO niciraNvpHost = _hostDao.findById(niciraNvpDevice.getHostId());

        if (_networkModel.isProviderSupportServiceInNetwork(network.getId(),
                Service.SourceNat, Provider.NiciraNvp)) {
            s_logger.debug("Apparently we were providing SourceNat on this network");
View Full Code Here

                    Host.Type.L2Networking, params);
            if (host != null) {
                return Transaction.execute(new TransactionCallback<NiciraNvpDeviceVO>() {
                    @Override
                    public NiciraNvpDeviceVO doInTransaction(TransactionStatus status) {
                        NiciraNvpDeviceVO niciraNvpDevice = new NiciraNvpDeviceVO(host.getId(),
                                physicalNetworkId, ntwkSvcProvider.getProviderName(),
                                deviceName);
                        _niciraNvpDao.persist(niciraNvpDevice);

                        DetailVO detail = new DetailVO(host.getId(),
                                "niciranvpdeviceid", String.valueOf(niciraNvpDevice
                                        .getId()));
                        _hostDetailsDao.persist(detail);

                        return niciraNvpDevice;
                    }
View Full Code Here

    }

    @Override
    public boolean deleteNiciraNvpDevice(DeleteNiciraNvpDeviceCmd cmd) {
        Long niciraDeviceId = cmd.getNiciraNvpDeviceId();
        NiciraNvpDeviceVO niciraNvpDevice = _niciraNvpDao
                .findById(niciraDeviceId);
        if (niciraNvpDevice == null) {
            throw new InvalidParameterValueException(
                    "Could not find a nicira device with id " + niciraDeviceId);
        }

        // Find the physical network we work for
        Long physicalNetworkId = niciraNvpDevice.getPhysicalNetworkId();
        PhysicalNetworkVO physicalNetwork = _physicalNetworkDao
                .findById(physicalNetworkId);
        if (physicalNetwork != null) {
            // Lets see if there are networks that use us
            // Find the nicira networks on this physical network
            List<NetworkVO> networkList = _networkDao
                    .listByPhysicalNetwork(physicalNetworkId);

            // Networks with broadcast type lswitch are ours
            for (NetworkVO network : networkList) {
                if (network.getBroadcastDomainType() == Networks.BroadcastDomainType.Lswitch) {
                    if ((network.getState() != Network.State.Shutdown)
                            && (network.getState() != Network.State.Destroy)) {
                        throw new CloudRuntimeException(
                                "This Nicira Nvp device can not be deleted as there are one or more logical networks provisioned by cloudstack.");
                    }
                }
            }
        }

        HostVO niciraHost = _hostDao.findById(niciraNvpDevice.getHostId());
        Long hostId = niciraHost.getId();

        niciraHost.setResourceState(ResourceState.Maintenance);
        _hostDao.update(hostId, niciraHost);
        _resourceMgr.deleteHost(hostId, false, false);
View Full Code Here

            throw new InvalidParameterValueException(
                    "Either physical network Id or nicira device Id must be specified");
        }

        if (niciraNvpDeviceId != null) {
            NiciraNvpDeviceVO niciraNvpDevice = _niciraNvpDao
                    .findById(niciraNvpDeviceId);
            if (niciraNvpDevice == null) {
                throw new InvalidParameterValueException(
                        "Could not find Nicira Nvp device with id: "
                                + niciraNvpDevice);
View Full Code Here

    @Override
    public List<? extends Network> listNiciraNvpDeviceNetworks(
            ListNiciraNvpDeviceNetworksCmd cmd) {
        Long niciraDeviceId = cmd.getNiciraNvpDeviceId();
        NiciraNvpDeviceVO niciraNvpDevice = _niciraNvpDao
                .findById(niciraDeviceId);
        if (niciraNvpDevice == null) {
            throw new InvalidParameterValueException(
                    "Could not find a nicira device with id " + niciraDeviceId);
        }

        // Find the physical network we work for
        Long physicalNetworkId = niciraNvpDevice.getPhysicalNetworkId();
        PhysicalNetworkVO physicalNetwork = _physicalNetworkDao
                .findById(physicalNetworkId);
        if (physicalNetwork == null) {
            // No such physical network, so no provisioned networks
            return Collections.emptyList();
View Full Code Here

            if (devices.isEmpty()) {
                s_logger.error("No NiciraNvp Controller on physical network "
                        + network.getPhysicalNetworkId());
                return false;
            }
            NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
            HostVO niciraNvpHost = _hostDao.findById(niciraNvpDevice.getHostId());
            _hostDao.loadDetails(niciraNvpHost);

            NiciraNvpRouterMappingVO routermapping = _niciraNvpRouterMappingDao
                    .findByNetworkId(network.getId());
            if (routermapping == null) {
View Full Code Here

        if (devices.isEmpty()) {
            s_logger.error("No NiciraNvp Controller on physical network "
                    + network.getPhysicalNetworkId());
            return false;
        }
        NiciraNvpDeviceVO niciraNvpDevice = devices.get(0);
        HostVO niciraNvpHost = _hostDao.findById(niciraNvpDevice.getHostId());

        NiciraNvpRouterMappingVO routermapping = _niciraNvpRouterMappingDao
                .findByNetworkId(network.getId());
        if (routermapping == null) {
            s_logger.error("No logical router uuid found for network "
View Full Code Here

TOP

Related Classes of com.cloud.network.NiciraNvpDeviceVO

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.