<feature version='${project.version}'>odl-lispflowmapping-models</feature>
<feature version="${project.version}">odl-lispflowmapping-inmemorydb</feature>
<feature version="${project.version}">odl-lispflowmapping-southbound</feature>
+ <bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.config/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.dsbackend/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.mapcache/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.implementation/{{VERSION}}</bundle>
- <bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.config/{{VERSION}}</bundle>
</feature>
<feature name="odl-lispflowmapping-mappingservice-shell" description="OpenDaylight :: LISP Flow Mapping :: Mappingservice Shell" version='${project.version}'>
<feature version="${mdsal.version}">odl-mdsal-broker</feature>
<feature version='${project.version}'>odl-lispflowmapping-models</feature>
<feature version="${project.version}">odl-lispflowmapping-inmemorydb</feature>
+ <bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.config/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.dsbackend/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.mapcache/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.southbound/{{VERSION}}</bundle>
- <bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.config/{{VERSION}}</bundle>
</feature>
<feature name="odl-lispflowmapping-neutron" description="OpenDaylight :: LISP Flow Mapping :: Neutron Integration" version='${project.version}'>
package org.opendaylight.lispflowmapping.config;
import java.util.concurrent.TimeUnit;
-
import org.opendaylight.lispflowmapping.interfaces.mappingservice.IMappingService;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
BundleContext context = null;
if (bundle != null) {
context = bundle.getBundleContext();
+ if (context == null) {
+ LOG.warn("Couldn't get the BundleContext needed for reading the properties in the configuration file, "
+ + "bundle state is '{}'", bundleStateToString(bundle.getState()));
+ }
+ } else {
+ LOG.warn("Couldn't get the Bundle object needed for reading the properties in the configuration file, "
+ + "using built-in defaults");
}
+ initConfigs(context);
+ }
+
+ private void initConfigs(BundleContext context) {
initMappingMerge(context);
initSmr(context);
initElpPolicy(context);
initBucketNumber();
}
+ private String bundleStateToString(int state) {
+ switch (state) {
+ case Bundle.ACTIVE:
+ return "Active";
+ case Bundle.INSTALLED:
+ return "Installed";
+ case Bundle.RESOLVED:
+ return "Resolved";
+ case Bundle.STARTING:
+ return "Starting";
+ case Bundle.STOPPING:
+ return "Stopping";
+ case Bundle.UNINSTALLED:
+ return "Uninstalled";
+ default:
+ return "_Unknown_";
+ }
+ }
+
private void initRegisterValiditySb(BundleContext context) {
// set the default value first
this.registrationValiditySb = MIN_REGISTRATION_VALIDITY_SB;