Giant patch of changes to support OpenFlow 1.3
The following people have contributed to this patch:
- Ali Al-Shabibi <alshabibi.ali@gmail.com>
- Ayaka Koshibe <ayaka@onlab.us>
- Brian O'Connor <bocon@onlab.us>
- Jonathan Hart <jono@onlab.us>
- Matteo Gerola <mgerola@create-net.org>
- Michele Santuari <michele.santuari@create-net.org>
- Pavlin Radoslavov <pavlin@onlab.us>
- Saurav Das <sauravdas@alumni.stanford.edu>
- Toshio Koide <t-koide@onlab.us>
- Yuta HIGUCHI <y-higuchi@onlab.us>
The patch includes the following changes:
- New Floodlight I/O loop / state machine
- New switch/port handling
- New role management (incl. Role.EQUAL)
- Added Floodlight debug framework
- Updates to Controller.java
- Move to Loxigen's OpenflowJ library
- Added OF1.3 support
- Added support for different switches (via DriverManager)
- Updated ONOS modules to use new APIs
- Added and updated unit tests
Change-Id: Ic70a8d50f7136946193d2ba2e4dc0b4bfac5f599
diff --git a/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java b/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
index 4183877..0ee2904 100644
--- a/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
+++ b/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
@@ -1,3 +1,19 @@
+/**
+ * Copyright 2013, Big Switch Networks, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License. You may obtain
+ * a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ **/
+
package net.floodlightcontroller.core;
import java.util.ArrayList;
@@ -10,6 +26,8 @@
import net.floodlightcontroller.core.module.FloodlightModuleException;
import net.floodlightcontroller.core.module.IFloodlightModule;
import net.floodlightcontroller.core.module.IFloodlightService;
+import net.floodlightcontroller.debugcounter.IDebugCounterService;
+import net.floodlightcontroller.debugevent.IDebugEventService;
import net.floodlightcontroller.restserver.IRestApiService;
import net.floodlightcontroller.threadpool.IThreadPoolService;
import net.onrc.onos.core.linkdiscovery.ILinkDiscoveryService;
@@ -28,13 +46,13 @@
@Override
public Map<Class<? extends IFloodlightService>,
- IFloodlightService> getServiceImpls() {
+ IFloodlightService> getServiceImpls() {
controller = new Controller();
Map<Class<? extends IFloodlightService>,
- IFloodlightService> m =
+ IFloodlightService> m =
new HashMap<Class<? extends IFloodlightService>,
- IFloodlightService>();
+ IFloodlightService>();
m.put(IFloodlightProviderService.class, controller);
return m;
}
@@ -42,33 +60,36 @@
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> dependencies =
- new ArrayList<Class<? extends IFloodlightService>>(4);
+ new ArrayList<Class<? extends IFloodlightService>>(4);
dependencies.add(IRestApiService.class);
+ dependencies.add(IDebugCounterService.class);
+ dependencies.add(IDebugEventService.class);
dependencies.add(IThreadPoolService.class);
- // Following added by ONOS
- // dependencies.add(IControllerRegistryService.class);
- // dependencies.add(ILinkDiscoveryService.class);
-
return dependencies;
}
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
- controller.setRestApiService(
- context.getServiceImpl(IRestApiService.class));
- controller.setThreadPoolService(
- context.getServiceImpl(IThreadPoolService.class));
- // Following added by ONOS
- controller.setMastershipService(
- context.getServiceImpl(IControllerRegistryService.class));
- controller.setLinkDiscoveryService(
- context.getServiceImpl(ILinkDiscoveryService.class));
+ controller.setDebugCounter(
+ context.getServiceImpl(IDebugCounterService.class));
+ controller.setDebugEvent(
+ context.getServiceImpl(IDebugEventService.class));
+ controller.setRestApiService(
+ context.getServiceImpl(IRestApiService.class));
+ controller.setThreadPoolService(
+ context.getServiceImpl(IThreadPoolService.class));
+ // Following added by ONOS
+ controller.setMastershipService(
+ context.getServiceImpl(IControllerRegistryService.class));
+ controller.setLinkDiscoveryService(
+ context.getServiceImpl(ILinkDiscoveryService.class));
- controller.init(context.getConfigParams(this));
+ controller.init(context.getConfigParams(this));
}
@Override
- public void startUp(FloodlightModuleContext context) {
+ public void startUp(FloodlightModuleContext context)
+ throws FloodlightModuleException {
controller.startupComponents();
}
}