diff --git a/build.xml b/build.xml index ab4bffc7d817b536c08df37fbfef4ccc36831185..b26d1bfc5903d36f31ea71ba0182f952a5a64549 100644 --- a/build.xml +++ b/build.xml @@ -277,7 +277,7 @@ </jar> </target> - <target name="package"> <!-- depends="dist" //--> + <target name="deb" depends="dist"> <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask" classpathref="package-classpath"/> @@ -311,11 +311,13 @@ <data src="debian/misc/default/floodlight" type="file"> <mapper type="perm" prefix="/etc/default"/> </data> - <data src="src/main/resources/floodlightdefault.properties" type="file"> + <data src="debian/misc/floodlight.properties" type="file"> <mapper type="perm" prefix="/etc/floodlight"/> </data> + <tarfileset dir="src/main/resources/apps" prefix="/etc/floodlight/apps.d"/> </deb> </target> + <target name="package" depends="deb"/> <target name="javadoc"> <javadoc access="protected" diff --git a/debian/control/dirs b/debian/control/dirs index 262b10f9a89f13c810736c90be22800af96bfdaa..b93738fd93fd127bbd9bc425a846fc8acb89cd6c 100644 --- a/debian/control/dirs +++ b/debian/control/dirs @@ -1,2 +1,4 @@ /var/log/floodlight /var/lib/floodlight +/etc/floodlight/apps.d +/etc/floodlight/conf.d diff --git a/debian/control/postinst b/debian/control/postinst index a5f3176a54fdec4d2768d8df61872f5bf61003ea..92eeb7af94f9713a230716fc97b0bc8415c4a694 100644 --- a/debian/control/postinst +++ b/debian/control/postinst @@ -1,6 +1,7 @@ #!/bin/sh -e NAME=floodlight +KEYSTORE=/etc/floodlight/auth_credentials.jceks case "$1" in configure) @@ -10,13 +11,23 @@ case "$1" in fi mkdir -p /var/log/floodlight mkdir -p /var/lib/floodlight - chown -R $NAME:$NAME /var/log/floodlight + mkdir -p /etc/floodlight/conf.d + + chown -R syslog:adm /var/log/floodlight chown -R $NAME:$NAME /var/lib/floodlight + if [ ! -f /etc/floodlight/auth_credentials.jceks ]; then + KSPASS=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` + echo "org.sdnplatform.sync.internal.SyncManager.keyStorePassword=$KSPASS" > \ + /etc/floodlight/conf.d/01-keystorepass.properties authtool -a CHALLENGE_RESPONSE \ - -ks /etc/floodlight/auth_credentials.jceks \ - -kp dcbc178a0a3a8674f048ac86372ac456 + -ks $KEYSTORE \ + -kp $KSPASS + chown $NAME:$NAME $KEYSTORE fi + + service rsyslog reload + service floodlight restart ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/control/postrm b/debian/control/postrm index 79466b46e9eae5232778991aa4ead511c5c4dca5..8507a619ec9ee5b8534615e103aea056519d0664 100644 --- a/debian/control/postrm +++ b/debian/control/postrm @@ -7,6 +7,7 @@ case "$1" in deluser --quiet --system $NAME || true delgroup --quiet --system $NAME || true rm -f /etc/floodlight/auth_credentials.jceks + rm -f /etc/floodlight/conf.d/01-keystorepass.properties rm -rf /var/lib/floodlight/SyncDB ;; diff --git a/debian/control/prerm b/debian/control/prerm new file mode 100644 index 0000000000000000000000000000000000000000..4c9669156abd1bb9d6c5b18dddf27cc0d8ceb763 --- /dev/null +++ b/debian/control/prerm @@ -0,0 +1,27 @@ +#!/bin/sh -e + +NAME=floodlight + +case "$1" in + purge) + rm -f /etc/floodlight/auth_credentials.jceks + rm -f /etc/floodlight/conf.d/01-keystorepass.properties + rm -rf /var/lib/floodlight/SyncDB + ;; + + remove) + service floodlight stop + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/misc/bin/authtool b/debian/misc/bin/authtool index 978f3d7899b1eaaf54173f014bff93cc15e18af8..cf5c66ed77740f53b142cafae4d1974235595ca8 100644 --- a/debian/misc/bin/authtool +++ b/debian/misc/bin/authtool @@ -1,3 +1,3 @@ #!/bin/sh -exec java -cp /usr/share/floodlight/java/floodlight.jar org.sdnplatform.sync.client.AuthTool "$@" +exec java -cp '/usr/share/floodlight/java/*' org.sdnplatform.sync.client.AuthTool "$@" diff --git a/debian/misc/bin/bootstraptool b/debian/misc/bin/bootstraptool index 2ea61c566795d094b6cd99a48f9b24b06f5c87b2..1fef8728add0118281f48f3fb349deadfe3c54d6 100644 --- a/debian/misc/bin/bootstraptool +++ b/debian/misc/bin/bootstraptool @@ -1,3 +1,3 @@ #!/bin/sh -exec java -cp /usr/share/floodlight/java/floodlight.jar org.sdnplatform.sync.client.BootstrapTool "$@" +exec java -cp '/usr/share/floodlight/java/*' org.sdnplatform.sync.client.BootstrapTool "$@" diff --git a/debian/misc/bin/floodlight b/debian/misc/bin/floodlight index c1fc4548b846bcb4c4caced408d0e05f310317be..9eda036472a9c198ff103bc32738f6d24078de00 100755 --- a/debian/misc/bin/floodlight +++ b/debian/misc/bin/floodlight @@ -1,3 +1,3 @@ #!/bin/sh -exec java -cp /usr/share/floodlight/java/floodlight.jar net.floodlightcontroller.core.Main "$@" +exec java -cp '/usr/share/floodlight/java/*' net.floodlightcontroller.core.Main "$@" diff --git a/debian/misc/bin/syncclient b/debian/misc/bin/syncclient index 825cb268255544fdabb59c40c10b898674cefabb..270e2a192c206a08da602733635af31e093013f7 100644 --- a/debian/misc/bin/syncclient +++ b/debian/misc/bin/syncclient @@ -1,3 +1,3 @@ #!/bin/sh -exec java -cp /usr/share/floodlight/java/floodlight.jar org.sdnplatform.sync.client.SyncClient "$@" +exec java -cp '/usr/share/floodlight/java/*' org.sdnplatform.sync.client.SyncClient "$@" diff --git a/debian/misc/default/floodlight b/debian/misc/default/floodlight index acac914e7d8843a842c2593010abba3abe80bc8c..5d06fa28887bd9dbe522607d1875bd4dd6fd2c13 100644 --- a/debian/misc/default/floodlight +++ b/debian/misc/default/floodlight @@ -1,5 +1,5 @@ # Options to pass to Floodlight. -DAEMON_OPTS="-cf /etc/floodlight/floodlightdefault.properties" +DAEMON_OPTS="-cf /etc/floodlight/floodlight.properties" # Additional options to pass to the JVM JVM_OPTS="" # Sample performance options taken from upstream diff --git a/debian/misc/floodlight.properties b/debian/misc/floodlight.properties new file mode 100644 index 0000000000000000000000000000000000000000..e0665c9c2a0cb35b7e2f974fa2bab39b349e6c52 --- /dev/null +++ b/debian/misc/floodlight.properties @@ -0,0 +1,11 @@ +floodlight.confd = /etc/floodlight/conf.d +floodlight.modules = \ +net.floodlightcontroller.jython.JythonDebugInterface,\ +net.floodlightcontroller.core.module.ApplicationLoader +net.floodlightcontroller.core.module.ApplicationLoader.appsd=/etc/floodlight/apps.d +net.floodlightcontroller.core.module.ApplicationLoader.application=simpleforwarding +net.floodlightcontroller.core.FloodlightProvider.rolepath=/var/lib/floodlight/current_role +org.sdnplatform.sync.internal.SyncManager.authScheme=CHALLENGE_RESPONSE +org.sdnplatform.sync.internal.SyncManager.keyStorePath=/etc/floodlight/auth_credentials.jceks +org.sdnplatform.sync.internal.SyncManager.dbPath=/var/lib/floodlight/ + diff --git a/debian/misc/init/floodlight.conf b/debian/misc/init/floodlight.conf index 4b58aa2c58d926d8fb727ab866a0b15429862308..cd3c488b993ccffe5c691ead1aae190d76978bd0 100644 --- a/debian/misc/init/floodlight.conf +++ b/debian/misc/init/floodlight.conf @@ -9,6 +9,6 @@ script if [ -f /etc/default/floodlight ]; then . /etc/default/floodlight fi - COMMAND="java ${JVM_OPTS} -cp /usr/share/floodlight/java/floodlight.jar net.floodlightcontroller.core.Main ${DAEMON_OPTS}" + COMMAND="java ${JVM_OPTS} -cp '/usr/share/floodlight/java/*' net.floodlightcontroller.core.Main ${DAEMON_OPTS}" exec /bin/bash -c "${COMMAND} 2>&1 | /usr/bin/logger -t floodlight -p user.info" end script diff --git a/debian/misc/rsyslog/10-floodlight.conf b/debian/misc/rsyslog/10-floodlight.conf index 5bcc8f25fe6355a4328441f473e78a08e877c451..af4f3636f3af6ead18c6f4c9650e2b560711cdcc 100644 --- a/debian/misc/rsyslog/10-floodlight.conf +++ b/debian/misc/rsyslog/10-floodlight.conf @@ -1,3 +1,3 @@ !floodlight -*.* /var/log/floodlight.log +*.* /var/log/floodlight/floodlight.log !* diff --git a/src/main/java/net/floodlightcontroller/core/module/ApplicationLoader.java b/src/main/java/net/floodlightcontroller/core/module/ApplicationLoader.java new file mode 100644 index 0000000000000000000000000000000000000000..f56dfa996e90f9550a09fb3ae817ed4685431046 --- /dev/null +++ b/src/main/java/net/floodlightcontroller/core/module/ApplicationLoader.java @@ -0,0 +1,179 @@ +package net.floodlightcontroller.core.module; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectReader; + +/** + * Load an application from a configuration directory + * @author readams + */ +public class ApplicationLoader + implements IFloodlightModule, IApplicationService { + + /** + * Representation for the application configuration + * @author readams + */ + public static class Application { + private String name; + private String[] modules; + private Map<String,String> config; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String[] getModules() { + return modules; + } + public void setModules(String[] modules) { + this.modules = modules; + } + public Map<String, String> getConfig() { + return config; + } + public void setConfig(Map<String, String> config) { + this.config = config; + } + } + + + protected static Logger logger = + LoggerFactory.getLogger(ApplicationLoader.class); + protected static ObjectMapper mapper = new ObjectMapper(); + protected static ObjectReader reader = mapper.reader(Application.class); + + IModuleService moduleService; + + private static String APP_RESOURCE_PATH = "apps/"; + + /** + * Path containing application description files + */ + protected String applicationPath; + + /** + * Application to load + */ + protected String application; + + // ***************** + // IFloodlightModule + // ***************** + + @Override + public Collection<Class<? extends IFloodlightService>> + getModuleServices() { + Collection<Class<? extends IFloodlightService>> l = + new ArrayList<Class<? extends IFloodlightService>>(); + l.add(IApplicationService.class); + return l; + } + + @Override + public Map<Class<? extends IFloodlightService>, IFloodlightService> + getServiceImpls() { + + Map<Class<? extends IFloodlightService>, + IFloodlightService> m = + new HashMap<Class<? extends IFloodlightService>, + IFloodlightService>(); + // We are the class that implements the service + m.put(IApplicationService.class, this); + return m; + } + + @Override + public Collection<Class<? extends IFloodlightService>> + getModuleDependencies() { + return null; + } + + @Override + public void init(FloodlightModuleContext context) + throws FloodlightModuleException { + moduleService = context.getServiceImpl(IModuleService.class); + + Map<String,String> config = context.getConfigParams(this); + if (config.containsKey("appsd")) + applicationPath = config.get("appsd"); + if (config.containsKey("application")) + application = config.get("application"); + } + + @Override + public void startUp(FloodlightModuleContext context) + throws FloodlightModuleException { + if (application == null) { + throw new FloodlightModuleException("No application to load"); + } + + // attempt to load from application path + File appPath; + if (applicationPath != null && + (appPath = new File(applicationPath)).exists() && + appPath.isDirectory()) { + File[] files = appPath.listFiles(); + Arrays.sort(files); + for (File f : files) { + if (f.isFile() && f.getName().matches(".*\\.json$")); + try { + if (loadApplication(new FileInputStream(f), f.getPath())) + return; + } catch (FileNotFoundException e) { + throw new FloodlightModuleException(e); + } + } + } + + // attempt to load from classpath. Note here that the file needs + // to be named after the application to be successful + try { + String r = APP_RESOURCE_PATH + application + ".json"; + InputStream is = getClass().getClassLoader().getResourceAsStream(r); + loadApplication(is, "resource: " + r); + } catch (Exception e) { + throw new FloodlightModuleException(e); + } + + } + + private boolean loadApplication(InputStream is, String path) + throws FloodlightModuleException { + Application a; + try { + a = reader.readValue(is); + } catch (Exception e) { + throw new FloodlightModuleException("Could not read application " + + path, e); + } + if (application.equals(a.getName())) { + Properties p = new Properties(); + if (a.getConfig() != null) + p.putAll(a.getConfig()); + if (a.getModules() != null) { + logger.info("Loading application {}", a.getName()); + moduleService.loadModulesFromList(Arrays.asList(a.getModules()), + p); + return true; + } + } + return false; + } +} diff --git a/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleContext.java b/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleContext.java index 2ebe41e3ca404992a379cc7ec12d4adc7461cc46..27c1f968ac0534ecf1bfcd293ce471669016719e 100644 --- a/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleContext.java +++ b/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleContext.java @@ -16,6 +16,7 @@ package net.floodlightcontroller.core.module; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -69,8 +70,10 @@ public class FloodlightModuleContext implements IFloodlightModuleContext { return moduleSet; } - public void setModuleSet(Collection<IFloodlightModule> modSet) { - this.moduleSet = modSet; + public void addModules(Collection<IFloodlightModule> modSet) { + if (this.moduleSet == null) + this.moduleSet = new ArrayList<IFloodlightModule>(); + this.moduleSet.addAll(modSet); } @Override diff --git a/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleLoader.java b/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleLoader.java index 78422e50a9472970a57d446f042f9b3fb2ac910d..39642aff0e630ceb16ab24303e5e7bed0496dc6d 100644 --- a/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleLoader.java +++ b/src/main/java/net/floodlightcontroller/core/module/FloodlightModuleLoader.java @@ -18,7 +18,6 @@ package net.floodlightcontroller.core.module; import java.io.File; import java.io.FileInputStream; -import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; @@ -47,7 +46,7 @@ import org.slf4j.LoggerFactory; * @author alexreimers * */ -public class FloodlightModuleLoader { +public class FloodlightModuleLoader implements IModuleService { protected static Logger logger = LoggerFactory.getLogger(FloodlightModuleLoader.class); @@ -58,6 +57,9 @@ public class FloodlightModuleLoader { IFloodlightService>>> moduleServiceMap; protected static Map<String, IFloodlightModule> moduleNameMap; protected static Object lock = new Object(); + + protected static Set<String> initedSet = new HashSet<String>(); + protected static Set<String> startedSet = new HashSet<String>();; protected FloodlightModuleContext floodlightModuleContext; @@ -65,9 +67,12 @@ public class FloodlightModuleLoader { "floodlightdefault.properties"; public static final String FLOODLIGHT_MODULES_KEY = "floodlight.modules"; - + public static final String FLOODLIGHT_CONFD = + "floodlight.confd"; + public FloodlightModuleLoader() { floodlightModuleContext = new FloodlightModuleContext(); + floodlightModuleContext.addService(IModuleService.class, this); } /** @@ -180,33 +185,62 @@ public class FloodlightModuleLoader { public IFloodlightModuleContext loadModulesFromConfig(String fName) throws FloodlightModuleException { Properties prop = new Properties(); + Collection<String> configMods; File f = new File(fName); if (f.isFile()) { - logger.info("Loading modules from file {}", fName); - try { - prop.load(new FileInputStream(fName)); - } catch (Exception e) { - logger.error("Could not load module configuration file", e); - System.exit(1); - } + logger.info("Loading modules from file {}", f.getPath()); + configMods = loadProperties(null, f, prop); } else { logger.info("Loading default modules"); InputStream is = this.getClass().getClassLoader(). getResourceAsStream(COMPILED_CONF_FILE); - try { - prop.load(is); - } catch (IOException e) { - logger.error("Could not load default modules", e); - System.exit(1); + configMods = loadProperties(is, null, prop); + } + + return loadModulesFromList(configMods, prop); + } + + private Collection<String> loadProperties(InputStream is, + File confFile, + Properties prop) { + try { + Properties fprop = new Properties(); + if (is != null) { + fprop.load(is); + } else { + fprop.load(new FileInputStream(confFile)); } + prop.putAll(fprop); + } catch (Exception e) { + logger.error("Could not load module configuration file", e); + System.exit(1); } - String moduleList = prop.getProperty(FLOODLIGHT_MODULES_KEY) - .replaceAll("\\s", ""); Collection<String> configMods = new ArrayList<String>(); - configMods.addAll(Arrays.asList(moduleList.split(","))); - return loadModulesFromList(configMods, prop); + String moduleList = prop.getProperty(FLOODLIGHT_MODULES_KEY); + if (moduleList != null) { + moduleList = moduleList.replaceAll("\\s", ""); + configMods.addAll(Arrays.asList(moduleList.split(","))); + prop.remove(FLOODLIGHT_MODULES_KEY); + } + + String confdStr = prop.getProperty(FLOODLIGHT_CONFD); + prop.remove(FLOODLIGHT_CONFD); + if (confdStr != null) { + File confd = new File(confdStr); + if (confd.exists() && confd.isDirectory()) { + File[] files = confd.listFiles(); + Arrays.sort(files); + for (File f : files) { + if (f.isFile() && + f.getName().matches(".*\\.properties$")) + configMods.addAll(loadProperties(null, f, prop)); + } + } + } + + return configMods; } /** @@ -245,7 +279,7 @@ public class FloodlightModuleLoader { throw new FloodlightModuleException("Module " + moduleName + " not found"); } - // If the module provies a service that is in the + // If the module provides a service that is in the // services ignorelist don't load it. if ((ignoreList != null) && (module.getModuleServices() != null)) { for (IFloodlightService ifs : ignoreList) { @@ -315,7 +349,7 @@ public class FloodlightModuleLoader { } } - floodlightModuleContext.setModuleSet(moduleSet); + floodlightModuleContext.addModules(moduleSet); parseConfigParameters(prop); initModules(moduleSet); startupModules(moduleSet); @@ -323,13 +357,7 @@ public class FloodlightModuleLoader { return floodlightModuleContext; } - /** - * Loads modules (and their dependencies) specified in the list. - * @param configMods The collection of fully qualified module names to load. - * @param prop The list of properties that are configuration options. - * @return The ModuleContext containing all the loaded modules. - * @throws FloodlightModuleException - */ + @Override public IFloodlightModuleContext loadModulesFromList(Collection<String> configMods, Properties prop) throws FloodlightModuleException { return loadModulesFromList(configMods, prop, null); @@ -363,7 +391,10 @@ public class FloodlightModuleLoader { */ protected void initModules(Collection<IFloodlightModule> moduleSet) throws FloodlightModuleException { - for (IFloodlightModule module : moduleSet) { + for (IFloodlightModule module : moduleSet) { + if (initedSet.contains(module.getClass().getCanonicalName())) + continue; + // Get the module's service instance(s) Map<Class<? extends IFloodlightService>, IFloodlightService> simpls = module.getServiceImpls(); @@ -394,6 +425,10 @@ public class FloodlightModuleLoader { } for (IFloodlightModule module : moduleSet) { + if (initedSet.contains(module.getClass().getCanonicalName())) + continue; + initedSet.add(module.getClass().getCanonicalName()); + // init the module if (logger.isDebugEnabled()) { logger.debug("Initializing " + @@ -411,6 +446,10 @@ public class FloodlightModuleLoader { protected void startupModules(Collection<IFloodlightModule> moduleSet) throws FloodlightModuleException { for (IFloodlightModule m : moduleSet) { + if (startedSet.contains(m.getClass().getCanonicalName())) + continue; + startedSet.add(m.getClass().getCanonicalName()); + if (logger.isDebugEnabled()) { logger.debug("Starting " + m.getClass().getCanonicalName()); } diff --git a/src/main/java/net/floodlightcontroller/core/module/IApplicationService.java b/src/main/java/net/floodlightcontroller/core/module/IApplicationService.java new file mode 100644 index 0000000000000000000000000000000000000000..60a916930a06185f5a11199bd1cd839d9ebf8f2b --- /dev/null +++ b/src/main/java/net/floodlightcontroller/core/module/IApplicationService.java @@ -0,0 +1,5 @@ +package net.floodlightcontroller.core.module; + +public interface IApplicationService extends IFloodlightService { + +} diff --git a/src/main/java/net/floodlightcontroller/core/module/IModuleService.java b/src/main/java/net/floodlightcontroller/core/module/IModuleService.java new file mode 100644 index 0000000000000000000000000000000000000000..440ad2de6240709ef9e8a068e4b557f6b1444d82 --- /dev/null +++ b/src/main/java/net/floodlightcontroller/core/module/IModuleService.java @@ -0,0 +1,18 @@ +package net.floodlightcontroller.core.module; + +import java.util.Collection; +import java.util.Properties; + +public interface IModuleService extends IFloodlightService { + /** + * Loads modules (and their dependencies) specified in the list. + * @param configMods The collection of fully qualified module names to load. + * @param prop The list of properties that are configuration options. + * @return The ModuleContext containing all the loaded modules. + * @throws FloodlightModuleException + */ + public IFloodlightModuleContext + loadModulesFromList(Collection<String> configMods, + Properties prop) throws FloodlightModuleException; + +} diff --git a/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule b/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule index 56e56c0c1336bbe54dd9eb1e89127ecba62462c2..6f169c912ebb91e6255de16aba25c99b9f30f39e 100644 --- a/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule +++ b/src/main/resources/META-INF/services/net.floodlightcontroller.core.module.IFloodlightModule @@ -1,3 +1,4 @@ +net.floodlightcontroller.core.module.ApplicationLoader net.floodlightcontroller.core.internal.FloodlightProvider net.floodlightcontroller.storage.memory.MemoryStorageSource net.floodlightcontroller.devicemanager.internal.DeviceManagerImpl diff --git a/src/main/resources/apps/simpleforwarding.json b/src/main/resources/apps/simpleforwarding.json new file mode 100644 index 0000000000000000000000000000000000000000..81805efd30b9fb86aa5ab2d5d1644274dc403105 --- /dev/null +++ b/src/main/resources/apps/simpleforwarding.json @@ -0,0 +1,25 @@ +{ + "name": "simpleforwarding", + "modules": [ + "net.floodlightcontroller.counter.CounterStore", + "net.floodlightcontroller.storage.memory.MemoryStorageSource", + "net.floodlightcontroller.core.internal.FloodlightProvider", + "net.floodlightcontroller.threadpool.ThreadPool", + "net.floodlightcontroller.devicemanager.internal.DeviceManagerImpl", + "net.floodlightcontroller.devicemanager.internal.DefaultEntityClassifier", + "net.floodlightcontroller.staticflowentry.StaticFlowEntryPusher", + "net.floodlightcontroller.firewall.Firewall", + "net.floodlightcontroller.forwarding.Forwarding", + "net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager", + "net.floodlightcontroller.topology.TopologyManager", + "net.floodlightcontroller.flowcache.FlowCache", + "net.floodlightcontroller.flowcache.FlowReconcileManager", + "net.floodlightcontroller.debugcounter.DebugCounter", + "net.floodlightcontroller.perfmon.PktInProcessingTime", + "net.floodlightcontroller.ui.web.StaticWebRoutable", + "net.floodlightcontroller.loadbalancer.LoadBalancer", + "org.sdnplatform.sync.internal.SyncManager" + ], + "config": { + } +} diff --git a/src/main/resources/floodlightdefault.properties b/src/main/resources/floodlightdefault.properties index 188e1b2c2757e38d32450fc3cec9433b93f24795..0ee15508587325eaede72ad1f7356f46e3e08ff8 100644 --- a/src/main/resources/floodlightdefault.properties +++ b/src/main/resources/floodlightdefault.properties @@ -1,28 +1,7 @@ -floodlight.modules = net.floodlightcontroller.storage.memory.MemoryStorageSource,\ -net.floodlightcontroller.core.internal.FloodlightProvider,\ -net.floodlightcontroller.threadpool.ThreadPool,\ -net.floodlightcontroller.devicemanager.internal.DeviceManagerImpl,\ -net.floodlightcontroller.devicemanager.internal.DefaultEntityClassifier,\ -net.floodlightcontroller.staticflowentry.StaticFlowEntryPusher,\ -net.floodlightcontroller.firewall.Firewall,\ -net.floodlightcontroller.forwarding.Forwarding,\ -net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager, \ -net.floodlightcontroller.topology.TopologyManager, \ -net.floodlightcontroller.flowcache.FlowCache, \ -net.floodlightcontroller.flowcache.FlowReconcileManager, \ +floodlight.modules = \ net.floodlightcontroller.jython.JythonDebugInterface,\ -net.floodlightcontroller.counter.CounterStore,\ -net.floodlightcontroller.debugcounter.DebugCounter,\ -net.floodlightcontroller.perfmon.PktInProcessingTime,\ -net.floodlightcontroller.ui.web.StaticWebRoutable,\ -net.floodlightcontroller.loadbalancer.LoadBalancer,\ -org.sdnplatform.sync.internal.SyncManager -net.floodlightcontroller.restserver.RestApiServer.port = 8080 -net.floodlightcontroller.core.internal.FloodlightProvider.openflowport = 6633 -net.floodlightcontroller.jython.JythonDebugInterface.port = 6655 -net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5 -net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0 -org.sdnplatform.sync.internal.SyncManager.dbPath=/var/lib/floodlight/ +net.floodlightcontroller.core.module.ApplicationLoader +net.floodlightcontroller.core.module.ApplicationLoader.application=simpleforwarding org.sdnplatform.sync.internal.SyncManager.authScheme=CHALLENGE_RESPONSE org.sdnplatform.sync.internal.SyncManager.keyStorePath=/etc/floodlight/auth_credentials.jceks -org.sdnplatform.sync.internal.SyncManager.keyStorePassword=dcbc178a0a3a8674f048ac86372ac456 +org.sdnplatform.sync.internal.SyncManager.dbPath=/var/lib/floodlight/