/** * Function called by the dependency manager when at least one dependency * become unsatisfied or when the component is shutting down because for * example bundle is being stopped. * */ void destroy() { destroyCache(); }
/** * Function called by the dependency manager when at least one dependency * become unsatisfied or when the component is shutting down because for * example bundle is being stopped. * */ void destroy() { destroyCache(); }
/** * Function called by the dependency manager when at least one dependency * become unsatisfied or when the component is shutting down because for * example bundle is being stopped. * */ void destroy() { destroyCache(); }
private void cleanObjectReferences(OpenDoveObject o) { if (o instanceof OpenDoveDomain) { for (OpenDoveNetwork oDN: openDoveBidirectionalInterfaces.getNetworks()) { oDN.removeScopingDomain((OpenDoveDomain) o); openDoveBidirectionalInterfaces.removeDomain(o.getUUID()); openDoveSBInterfaces.removeEgwFwdRule(o.getUUID()); openDoveSBInterfaces.removeEgwSNATPool(o.getUUID()); openDoveSBInterfaces.removeGwIpv4(o.getUUID()); OpenDoveGwIpv4 gwIP = (OpenDoveGwIpv4) o; if (gwIP.getNeutronSubnet() != null) { for (OpenDoveDomain oDD: openDoveBidirectionalInterfaces.getDomains()) { oDD.removeNetwork((OpenDoveNetwork) o); if (oDD.getAssociatedNetworks().size() == 1) { openDoveBidirectionalInterfaces.updateNetwork(last.getUUID()); openDoveBidirectionalInterfaces.updateDomain(oDD.getUUID(), oDD); openDoveBidirectionalInterfaces.removeNetwork(o.getUUID()); OpenDoveSubnet oDS = openDoveSBInterfaces.getSubnet(oDNSA.getOpenDoveNetworkSubnetUuid()); if (oDS != null) { oDS.removeNetwork(openDoveBidirectionalInterfaces.getNetworkByVnid(oDNSA.getOpenDoveNetworkVnid()).getUUID()); if (oDS.getNetworkUUIDs().size() == 0) { oDS.setTombstoneFlag(true);
public void run(Timeout arg0) throws Exception { if (openDoveSBInterfaces != null && openDoveBidirectionalInterfaces != null) { ConcurrentMap<Integer, OpenDoveObject> internalCache = openDoveSBInterfaces.getObjectDB(); List<OpenDoveServiceAppliance> oDSAs = openDoveBidirectionalInterfaces.getAppliances(); for (Integer i: OpenDoveConcurrentBackedMap.getOrderedBackingKeys(internalCache)) { OpenDoveObject o = internalCache.get(i); if (o != null) { if (canBeRemoved(o)) { boolean purge = true; for (OpenDoveServiceAppliance oDSA: oDSAs) { cleanObjectReferences(o); internalCache.remove(i);
private void startUp() { allocateCache(); retrieveCache(); }
private void startUp() { allocateCache(); retrieveCache(); }
private void startUp() { allocateCache(); retrieveCache(); OpenDoveUtils.initRNG(); }
/** * Function called when the activator starts just after some * initializations are done by the * ComponentActivatorAbstractBase. * */ @Override public void init() { openDoveGC = new OpenDoveGC(); scheduler = new HashedWheelTimer(1000, TimeUnit.MILLISECONDS); openDoveGC.setTimer(scheduler); scheduler.newTimeout(openDoveGC, 5000, TimeUnit.MILLISECONDS); scheduler.start(); }
OpenDoveDomain domain = createDoveDomain(domainName, neutronNetwork.getID(), domainDB, networkDB); domain.setAssociatedOSTenantUUID(neutronNetwork.getTenantID()); int vnid = networkDB.allocateVNID(); networkDB.addNetwork(doveNetwork.getUUID(), doveNetwork); OpenDoveSubnet subnet = createDoveSubnet(neutronSubnet, subnetDB, networkSubnetAssociationDB, neutronNetwork, domain, doveNetwork);
public int canCreateSubnet(NeutronSubnet subnet) { return canAllocateEGW(subnet.getNetworkUUID(), true); }
public int allocateVNID() { boolean done = false; while (!done) { long candidateVNID = OpenDoveUtils.getNextLong() & 0x0000000000FFFFFF; if (!networkExistsByVnid((int) candidateVNID)) { return (int) candidateVNID; } } return 0; }
/** * Function called by the dependency manager when all the required * dependencies are satisfied * */ void init(Component c) { Dictionary<?, ?> props = c.getServiceProperties(); if (props != null) { containerName = (String) props.get("containerName"); logger.debug("Running containerName: {}", containerName); } else { // In the Global instance case the containerName is empty containerName = ""; } startUp(); }
/** * Function called by the dependency manager when all the required * dependencies are satisfied * */ void init(Component c) { Dictionary<?, ?> props = c.getServiceProperties(); if (props != null) { this.containerName = (String) props.get("containerName"); logger.debug("Running containerName: {}", this.containerName); } else { // In the Global instance case the containerName is empty this.containerName = ""; } startUp(); }
/** * Function called by the dependency manager when all the required * dependencies are satisfied * */ void init(Component c) { Dictionary<?, ?> props = c.getServiceProperties(); if (props != null) { containerName = (String) props.get("containerName"); logger.debug("Running containerName: {}", containerName); } else { // In the Global instance case the containerName is empty containerName = ""; } startUp(); }
public void addNetworkToDomain(String domainUUID, OpenDoveNetwork network) { if (domainExists(domainUUID)) { OpenDoveDomain domain = (OpenDoveDomain) domainMap.get(domainUUID); domain.addNetwork(network); } }
Dictionary<String, String> props = new Hashtable<String, String>(); props.put("salListenerName", "opendove"); c.add(createContainerServiceDependency(containerName) .setService(IClusterContainerServices.class) .setCallbacks("setClusterContainerService", Dictionary<String, String> props = new Hashtable<String, String>(); props.put("salListenerName", "opendove"); c.add(createContainerServiceDependency(containerName) .setService(IClusterContainerServices.class) .setCallbacks("setClusterContainerService", Dictionary<String, String> props = new Hashtable<String, String>(); props.put("salListenerName", "opendove"); c.add(createContainerServiceDependency(containerName) .setService(IClusterContainerServices.class) .setCallbacks("setClusterContainerService", Dictionary<String, String> props = new Hashtable<String, String>(); props.put("salListenerName", "opendove"); c.add(createContainerServiceDependency(containerName) .setService(IClusterContainerServices.class) .setCallbacks("setClusterContainerService",
public void neutronNetworkCreated(NeutronNetwork input) { IfNBSystemRU systemDB = OpenDoveCRUDInterfaces.getIfSystemRU(this); IfOpenDoveDomainCRUD domainDB = OpenDoveCRUDInterfaces.getIfDoveDomainCRU(this); IfOpenDoveNetworkCRUD doveNetworkDB = OpenDoveCRUDInterfaces.getIfDoveNetworkCRU(this); if (!input.isRouterExternal()) { // don't map router external networks if (input.isShared()) { // map shared network OpenDoveNeutronControlBlock controlBlock = systemDB.getSystemBlock(); //get system block if (!controlBlock.getDomainSeparation()) { //if domain separation not supported, map to shared domain OpenDoveDomain sharedDomain = createDoveDomain("SharedDomain", input.getID(), domainDB, doveNetworkDB); int vnid = doveNetworkDB.allocateVNID(); String networkName = "Neutron "+input.getID(); OpenDoveNetwork doveNetwork = new OpenDoveNetwork(networkName, vnid, sharedDomain, 0, input.getID()); doveNetworkDB.addNetwork(doveNetwork.getUUID(), doveNetwork); } } else { // map dedicated network String domainName = "Neutron "+input.getTenantID(); OpenDoveDomain domain = createDoveDomain(domainName, input.getID(), domainDB, doveNetworkDB); domain.setAssociatedOSTenantUUID(input.getTenantID()); int vnid = doveNetworkDB.allocateVNID(); String networkName = "Neutron "+input.getID(); OpenDoveNetwork doveNetwork = new OpenDoveNetwork(networkName, vnid, domain, 0, input.getID()); doveNetworkDB.addNetwork(doveNetwork.getUUID(), doveNetwork); } } }
String networkName = "Neutron "+neutronSubnet.getNetworkUUID(); OpenDoveNetwork network = networkDB.getNetworkByName(networkName); OpenDoveSubnet subnet = createDoveSubnet(neutronSubnet, subnetDB, networkSubnetAssociationDB, neutronNetwork, sharedDomain, network); String networkName = "Neutron "+neutronSubnet.getNetworkUUID(); OpenDoveNetwork network = networkDB.getNetworkByName(networkName); OpenDoveSubnet subnet = createDoveSubnet(neutronSubnet, subnetDB, networkSubnetAssociationDB, neutronNetwork, domain, network);
public int canCreatePort(NeutronPort port) { // openDove specific requirement on create if (port.getAdminStateUp() != null && !port.isAdminStateUp()) { return 400; } return canAllocateEGW(port.getNetworkUUID(), false); }