Changes to ONOS app to make it compatible with latest ONOS. This would break now with any ONOS container/image before April or with 1.5. In that case, use the 1.5 oar
diff --git a/src/test/apps/ciena-cordigmp-1.0-SNAPSHOT.oar b/src/test/apps/ciena-cordigmp-1.0-SNAPSHOT.oar
new file mode 100644
index 0000000..31b83b4
--- /dev/null
+++ b/src/test/apps/ciena-cordigmp-1.0-SNAPSHOT.oar
Binary files differ
diff --git a/src/test/apps/ciena-cordigmp/pom.xml b/src/test/apps/ciena-cordigmp/pom.xml
index 1776949..058b8f8 100644
--- a/src/test/apps/ciena-cordigmp/pom.xml
+++ b/src/test/apps/ciena-cordigmp/pom.xml
@@ -27,9 +27,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <onos.version>1.5.0</onos.version>
+ <onos.version>1.6.0-SNAPSHOT</onos.version>
<onos.app.name>org.ciena.cordigmp</onos.app.name>
- <onos.app.requires>org.onosproject.olt</onos.app.requires>
<onos.app.title>Ciena IGMP for OVS</onos.app.title>
<onos.app.origin>Ciena Inc.</onos.app.origin>
<onos.app.category>default</onos.app.category>
@@ -51,6 +50,12 @@
</dependency>
<dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-cord-config</artifactId>
+ <version>${onos.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
diff --git a/src/test/apps/ciena-cordigmp/src/main/java/org/ciena/cordigmp/CordIgmp.java b/src/test/apps/ciena-cordigmp/src/main/java/org/ciena/cordigmp/CordIgmp.java
index 586854d..2029a4a 100644
--- a/src/test/apps/ciena-cordigmp/src/main/java/org/ciena/cordigmp/CordIgmp.java
+++ b/src/test/apps/ciena-cordigmp/src/main/java/org/ciena/cordigmp/CordIgmp.java
@@ -15,9 +15,6 @@
*/
package org.ciena.cordigmp;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Multiset;
@@ -33,7 +30,6 @@
import org.onlab.packet.Ethernet;
import org.onlab.packet.IpAddress;
import org.onosproject.cfg.ComponentConfigService;
-import org.onosproject.codec.CodecService;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.net.ConnectPoint;
@@ -65,9 +61,8 @@
import org.onosproject.net.mcast.McastRoute;
import org.onosproject.net.mcast.McastRouteInfo;
import org.onosproject.net.mcast.MulticastRouteService;
-import org.onosproject.olt.AccessDeviceConfig;
-import org.onosproject.olt.AccessDeviceData;
-import org.onosproject.rest.AbstractWebResource;
+import org.onosproject.cordconfig.access.AccessDeviceConfig;
+import org.onosproject.cordconfig.access.AccessDeviceData;
import org.osgi.service.component.ComponentContext;
import org.onosproject.net.PortNumber;
import org.onlab.packet.IPv4;
@@ -97,13 +92,9 @@
public class CordIgmp {
- private static final int DEFAULT_REST_TIMEOUT_MS = 2000;
private static final int DEFAULT_PRIORITY = 500;
private static final short DEFAULT_MCAST_VLAN = 4000;
- private static final String DEFAULT_SYNC_HOST = "localhost:8181";
- private static final String DEFAULT_USER = "karaf";
- private static final String DEFAULT_PASSWORD = "karaf";
- private static final boolean DEFAULT_VLAN_ENABLED = true;
+ private static final boolean DEFAULT_VLAN_ENABLED = false;
private static final short DEFAULT_INPUT_PORT = 2;
private static final short DEFAULT_OUTPUT_PORT = 1;
private final Logger log = getLogger(getClass());
@@ -118,9 +109,6 @@
protected CoreService coreService;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected CodecService codecService;
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected ComponentConfigService componentConfigService;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
@@ -160,18 +148,6 @@
label = "Priority for multicast rules")
private int priority = DEFAULT_PRIORITY;
- @Property(name = "syncHost", value = DEFAULT_SYNC_HOST,
- label = "host:port to synchronize routes to")
- private String syncHost = DEFAULT_SYNC_HOST;
-
- @Property(name = "username", value = DEFAULT_USER,
- label = "Username for REST password authentication")
- private String user = DEFAULT_USER;
-
- @Property(name = "password", value = DEFAULT_PASSWORD,
- label = "Password for REST authentication")
- private String password = DEFAULT_PASSWORD;
-
@Property(name = "inputPort", intValue = DEFAULT_INPUT_PORT,
label = "Input port for OVS multicast traffic")
private int inputPort = DEFAULT_INPUT_PORT;
@@ -180,8 +156,6 @@
label = "Output port for OVS multicast traffic")
private int outputPort = DEFAULT_OUTPUT_PORT;
- private String fabricOnosUrl;
-
private Map<DeviceId, AccessDeviceData> oltData = new ConcurrentHashMap<>();
private Map<DeviceId, Boolean> deviceAvailability = new ConcurrentHashMap<>();
@@ -258,13 +232,7 @@
Dictionary<?, ?> properties = context != null ? context.getProperties() : new Properties();
try {
- String s = get(properties, "username");
- user = isNullOrEmpty(s) ? DEFAULT_USER : s.trim();
-
- s = get(properties, "password");
- password = isNullOrEmpty(s) ? DEFAULT_PASSWORD : s.trim();
-
- s = get(properties, "mcastVlan");
+ String s = get(properties, "mcastVlan");
mcastVlan = isNullOrEmpty(s) ? DEFAULT_MCAST_VLAN : Short.parseShort(s.trim());
s = get(properties, "vlanEnabled");
@@ -273,10 +241,6 @@
s = get(properties, "priority");
priority = isNullOrEmpty(s) ? DEFAULT_PRIORITY : Integer.parseInt(s.trim());
- s = get(properties, "syncHost");
- syncHost = isNullOrEmpty(s) ? DEFAULT_SYNC_HOST : s.trim();
- log.warn("Sync Host = " + syncHost);
-
s = get(properties, "inputPort");
inputPort = isNullOrEmpty(s) ? DEFAULT_INPUT_PORT : Short.parseShort(s.trim());
@@ -284,20 +248,12 @@
outputPort = isNullOrEmpty(s) ? DEFAULT_OUTPUT_PORT : Short.parseShort(s.trim());
} catch (Exception e) {
- user = DEFAULT_USER;
- password = DEFAULT_PASSWORD;
- syncHost = DEFAULT_SYNC_HOST;
mcastVlan = DEFAULT_MCAST_VLAN;
vlanEnabled = false;
priority = DEFAULT_PRIORITY;
inputPort = DEFAULT_INPUT_PORT;
outputPort = DEFAULT_OUTPUT_PORT;
}
- fabricOnosUrl = createRemoteUrl(syncHost);
- }
-
- private static String createRemoteUrl(String remoteHost) {
- return "http://" + remoteHost + "/onos/v1/mcast";
}
private class InternalMulticastListener implements McastListener {