[WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
diff --git a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java
index bcf9edf..3e9b802b 100644
--- a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java
+++ b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java
@@ -18,14 +18,6 @@
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multimap;
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Modified;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.Service;
import org.onosproject.cfg.ComponentConfigService;
import org.onosproject.core.CoreService;
import org.onosproject.net.DeviceId;
@@ -48,6 +40,12 @@
import org.onosproject.openflow.controller.RoleState;
import org.onosproject.openflow.controller.driver.OpenFlowAgent;
import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Modified;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
import org.projectfloodlight.openflow.protocol.OFCalientFlowStatsEntry;
import org.projectfloodlight.openflow.protocol.OFCalientFlowStatsReply;
import org.projectfloodlight.openflow.protocol.OFCircuitPortStatus;
@@ -95,8 +93,7 @@
import static org.onlab.util.Tools.groupedThreads;
-@Component(immediate = true)
-@Service
+@Component(immediate = true, service = OpenFlowController.class)
public class OpenFlowControllerImpl implements OpenFlowController {
private static final String APP_ID = "org.onosproject.openflow-base";
private static final String DEFAULT_OFPORT = "6633,6653";
@@ -106,44 +103,44 @@
private static final Logger log =
LoggerFactory.getLogger(OpenFlowControllerImpl.class);
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ @Reference(cardinality = ReferenceCardinality.MANDATORY)
protected CoreService coreService;
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ @Reference(cardinality = ReferenceCardinality.MANDATORY)
protected DriverService driverService;
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ @Reference(cardinality = ReferenceCardinality.MANDATORY)
protected ComponentConfigService cfgService;
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ @Reference(cardinality = ReferenceCardinality.MANDATORY)
protected NetworkConfigRegistry netCfgService;
- @Property(name = "openflowPorts", value = DEFAULT_OFPORT,
- label = "Port numbers (comma separated) used by OpenFlow protocol; default is 6633,6653")
+ //@Property(name = "openflowPorts", value = DEFAULT_OFPORT,
+ // label = "Port numbers (comma separated) used by OpenFlow protocol; default is 6633,6653")
private String openflowPorts = DEFAULT_OFPORT;
- @Property(name = "workerThreads", intValue = DEFAULT_WORKER_THREADS,
- label = "Number of controller worker threads")
+ //@Property(name = "workerThreads", intValue = DEFAULT_WORKER_THREADS,
+ // label = "Number of controller worker threads")
private int workerThreads = DEFAULT_WORKER_THREADS;
- @Property(name = "tlsMode", value = "",
- label = "TLS mode for OpenFlow channel; options are: disabled [default], enabled, strict")
+ //@Property(name = "tlsMode", value = "",
+ // label = "TLS mode for OpenFlow channel; options are: disabled [default], enabled, strict")
private String tlsModeString;
- @Property(name = "keyStore", value = "",
- label = "File path to key store for TLS connections")
+ //@Property(name = "keyStore", value = "",
+ // label = "File path to key store for TLS connections")
private String keyStore;
- @Property(name = "keyStorePassword", value = "",
- label = "Key store password")
+ //@Property(name = "keyStorePassword", value = "",
+ // label = "Key store password")
private String keyStorePassword;
- @Property(name = "trustStore", value = "",
- label = "File path to trust store for TLS connections")
+ //@Property(name = "trustStore", value = "",
+ // label = "File path to trust store for TLS connections")
private String trustStore;
- @Property(name = "trustStorePassword", value = "",
- label = "Trust store password")
+ //@Property(name = "trustStorePassword", value = "",
+ // label = "Trust store password")
private String trustStorePassword;
protected ExecutorService executorMsgs =