Skip to content
Snippets Groups Projects
Commit 7ccc6b22 authored by abat's avatar abat
Browse files

Merge into master from pull request #106:

Add a config parameter to change the port the Jython server runs on. (https://github.com/floodlight/floodlight/pull/106)
parents 34c4039a 65990c9d
No related branches found
No related tags found
No related merge requests found
......@@ -1690,7 +1690,7 @@ public class Controller implements IFloodlightProviderService {
if (threads != null) {
this.workerThreads = Integer.parseInt(threads);
}
log.info("Number of worker threads port set to {}", this.workerThreads);
log.info("Number of worker threads set to {}", this.workerThreads);
String controllerId = configParams.get("controllerid");
if (controllerId != null) {
this.controllerId = controllerId;
......
......@@ -14,7 +14,8 @@ import net.floodlightcontroller.core.module.IFloodlightService;
public class JythonDebugInterface implements IFloodlightModule {
protected static Logger log = LoggerFactory.getLogger(JythonDebugInterface.class);
JythonServer debug_server;
protected JythonServer debug_server;
protected static int JYTHON_PORT = 6655;
@Override
public Collection<Class<? extends IFloodlightService>> getModuleServices() {
......@@ -44,8 +45,7 @@ public class JythonDebugInterface implements IFloodlightModule {
@Override
public void startUp(FloodlightModuleContext context) {
Map<String, Object> locals = new HashMap<String, Object>();
Map<String, Object> locals = new HashMap<String, Object>();
// add all existing module references to the debug server
for (Class<? extends IFloodlightService> s : context.getAllServices()) {
// Put only the last part of the name
......@@ -54,7 +54,15 @@ public class JythonDebugInterface implements IFloodlightModule {
locals.put(name, context.getServiceImpl(s));
}
JythonServer debug_server = new JythonServer(6655, locals);
// read our config options
Map<String, String> configOptions = context.getConfigParams(this);
int port = JYTHON_PORT;
String portNum = configOptions.get("port");
if (portNum != null) {
port = Integer.parseInt(portNum);
}
JythonServer debug_server = new JythonServer(port, locals);
debug_server.start();
}
}
......@@ -7,3 +7,4 @@ net.floodlightcontroller.perfmon.PktInProcessingTime,\
net.floodlightcontroller.ui.web.StaticWebRoutable
net.floodlightcontroller.restserver.RestApiServer.port = 8080
net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633
net.floodlightcontroller.jython.JythonDebugInterface.port = 6655
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment