Examples of CiscoVnmcControllerVO


Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

            Host host = _resourceMgr.addHost(zoneId, resource, Host.Type.ExternalFirewall, params);
            if (host != null) {
                txn.start();

                ciscoVnmcResource = new CiscoVnmcControllerVO(host.getId(), physicalNetworkId, ntwkSvcProvider.getProviderName(), deviceName);
                _ciscoVnmcDao.persist((CiscoVnmcControllerVO)ciscoVnmcResource);
               
                DetailVO detail = new DetailVO(host.getId(), "deviceid", String.valueOf(ciscoVnmcResource.getId()));
                _hostDetailsDao.persist(detail);
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

    }

    @Override
    public boolean deleteCiscoVnmcResource(DeleteCiscoVnmcResourceCmd cmd) {
        Long vnmcResourceId = cmd.getCiscoVnmcResourceId();
        CiscoVnmcControllerVO vnmcResource = _ciscoVnmcDao.findById(vnmcResourceId);
        if (vnmcResource == null) {
            throw new InvalidParameterValueException(
                    "Could not find a Cisco VNMC appliance with id " + vnmcResourceId);
        }

        // Check if there any ASA 1000v appliances
        Long physicalNetworkId = vnmcResource.getPhysicalNetworkId();
        PhysicalNetworkVO physicalNetwork = _physicalNetworkDao.findById(physicalNetworkId);
        if (physicalNetwork != null) {
            List<CiscoAsa1000vDeviceVO> responseList = _ciscoAsa1000vDao.listByPhysicalNetwork(physicalNetworkId);
            if (responseList.size() > 0) {
                throw new CloudRuntimeException(
                        "Cisco VNMC appliance with id " + vnmcResourceId +
                        " cannot be deleted as there Cisco ASA 1000v appliances using it");
            }
        }

        HostVO vnmcHost = _hostDao.findById(vnmcResource.getHostId());
        Long hostId = vnmcHost.getId();
        vnmcHost.setResourceState(ResourceState.Maintenance);
        _hostDao.update(hostId, vnmcHost);
        _resourceMgr.deleteHost(hostId, false, false);
        _ciscoVnmcDao.remove(vnmcResourceId);
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

        if (physicalNetworkId == null && ciscoVnmcResourceId == null) {
            throw new InvalidParameterValueException("Either physical network Id or vnmc device Id must be specified");
        }

        if (ciscoVnmcResourceId != null) {
            CiscoVnmcControllerVO ciscoVnmcResource = _ciscoVnmcDao.findById(ciscoVnmcResourceId);
            if (ciscoVnmcResource == null) {
                throw new InvalidParameterValueException("Could not find Cisco Vnmc device with id: " + ciscoVnmcResource);
            }
            responseList.add(ciscoVnmcResource);
        }
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

        if (network.getState() == Network.State.Allocated) {
            s_logger.debug("External firewall was asked to apply firewall rules for network with ID " + network.getId() + "; this network is not implemented. Skipping backend commands.");
            return true;
        }

        CiscoVnmcControllerVO ciscoVnmcDevice = devices.get(0);
        HostVO ciscoVnmcHost = _hostDao.findById(ciscoVnmcDevice.getHostId());

        List<FirewallRuleTO> rulesTO = new ArrayList<FirewallRuleTO>();
        for (FirewallRule rule : rules) {
            String address = "0.0.0.0";
            if (rule.getTrafficType() == TrafficType.Ingress) {
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

        if (network.getState() == Network.State.Allocated) {
            s_logger.debug("External firewall was asked to apply port forwarding rules for network with ID " + network.getId() + "; this network is not implemented. Skipping backend commands.");
            return true;
        }

        CiscoVnmcControllerVO ciscoVnmcDevice = devices.get(0);
        HostVO ciscoVnmcHost = _hostDao.findById(ciscoVnmcDevice.getHostId());

        List<PortForwardingRuleTO> rulesTO = new ArrayList<PortForwardingRuleTO>();
        for (PortForwardingRule rule : rules) {
            IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
            Vlan vlan = _vlanDao.findById(sourceIp.getVlanId());
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

        if (network.getState() == Network.State.Allocated) {
            s_logger.debug("External firewall was asked to apply static NAT rules for network with ID " + network.getId() + "; this network is not implemented. Skipping backend commands.");
            return true;
        }

        CiscoVnmcControllerVO ciscoVnmcDevice = devices.get(0);
        HostVO ciscoVnmcHost = _hostDao.findById(ciscoVnmcDevice.getHostId());

        List<StaticNatRuleTO> rulesTO = new ArrayList<StaticNatRuleTO>();
        for (StaticNat rule : rules) {
            IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
            StaticNatRuleTO ruleTO = new StaticNatRuleTO(rule.getSourceIpAddressId(), sourceIp.getAddress().addr(), null,
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

            if (vsmDevice == null) {
                s_logger.error("Unable to load details of Cisco Nexus VSM device associated with cluster " + asaCluster.getName());
                return false;
            }

            CiscoVnmcControllerVO ciscoVnmcDevice = devices.get(0);
            HostVO ciscoVnmcHost = _hostDao.findById(ciscoVnmcDevice.getHostId());
            _hostDao.loadDetails(ciscoVnmcHost);
            Account owner = context.getAccount();
            PublicIp sourceNatIp = _networkMgr.assignSourceNatIpAddressToGuestNetwork(owner, network);
            String vlan = network.getBroadcastUri().getHost();
            long vlanId = Long.parseLong(vlan);
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

        String vlan = network.getBroadcastUri().getHost();
        long vlanId = Long.parseLong(vlan);
        List<CiscoVnmcControllerVO> devices = _ciscoVnmcDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
        if (!devices.isEmpty()) {
            CiscoVnmcControllerVO ciscoVnmcDevice = devices.get(0);
            HostVO ciscoVnmcHost = _hostDao.findById(ciscoVnmcDevice.getHostId());
            cleanupLogicalEdgeFirewall(vlanId, ciscoVnmcHost.getId());
        }

        return true;
    }
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

            if (vsmDevice == null) {
                s_logger.error("Unable to load details of Cisco Nexus VSM device associated with cluster " + asaCluster.getName());
                throw new CloudRuntimeException("Unable to load details of Cisco Nexus VSM device associated with cluster " + asaCluster.getName());
            }

            CiscoVnmcControllerVO ciscoVnmcDevice = devices.get(0);
            HostVO ciscoVnmcHost = _hostDao.findById(ciscoVnmcDevice.getHostId());
            _hostDao.loadDetails(ciscoVnmcHost);
            Account owner = context.getAccount();
            PublicIp sourceNatIp = _ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, network);
            long vlanId = Long.parseLong(BroadcastDomainType.getValue(network.getBroadcastUri()));
View Full Code Here

Examples of com.cloud.network.cisco.CiscoVnmcControllerVO

        unassignAsa1000vFromNetwork(network);

        long vlanId = Long.parseLong(BroadcastDomainType.getValue(network.getBroadcastUri()));
        List<CiscoVnmcControllerVO> devices = _ciscoVnmcDao.listByPhysicalNetwork(network.getPhysicalNetworkId());
        if (!devices.isEmpty()) {
            CiscoVnmcControllerVO ciscoVnmcDevice = devices.get(0);
            HostVO ciscoVnmcHost = _hostDao.findById(ciscoVnmcDevice.getHostId());
            cleanupLogicalEdgeFirewall(vlanId, ciscoVnmcHost.getId());
        }

        return true;
    }
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.