moving igmp app to use access device config
Change-Id: I2940b3db9c6da3a3c43c192a2b390c46b40749e7
diff --git a/app/src/main/java/org/onosproject/olt/impl/AccessDeviceConfig.java b/api/src/main/java/org/onosproject/olt/AccessDeviceConfig.java
similarity index 97%
rename from app/src/main/java/org/onosproject/olt/impl/AccessDeviceConfig.java
rename to api/src/main/java/org/onosproject/olt/AccessDeviceConfig.java
index c13ffae..07b73c8 100644
--- a/app/src/main/java/org/onosproject/olt/impl/AccessDeviceConfig.java
+++ b/api/src/main/java/org/onosproject/olt/AccessDeviceConfig.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.olt.impl;
+package org.onosproject.olt;
import com.fasterxml.jackson.databind.JsonNode;
import org.onlab.packet.VlanId;
diff --git a/app/src/main/java/org/onosproject/olt/impl/AccessDeviceData.java b/api/src/main/java/org/onosproject/olt/AccessDeviceData.java
similarity index 98%
rename from app/src/main/java/org/onosproject/olt/impl/AccessDeviceData.java
rename to api/src/main/java/org/onosproject/olt/AccessDeviceData.java
index 1cfc62b..0092cd3 100644
--- a/app/src/main/java/org/onosproject/olt/impl/AccessDeviceData.java
+++ b/api/src/main/java/org/onosproject/olt/AccessDeviceData.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.onosproject.olt.impl;
+package org.onosproject.olt;
import org.onlab.packet.VlanId;
import org.onosproject.net.DeviceId;
diff --git a/app/src/main/java/org/onosproject/olt/impl/Olt.java b/app/src/main/java/org/onosproject/olt/impl/Olt.java
index 95e7693..0a97cca 100644
--- a/app/src/main/java/org/onosproject/olt/impl/Olt.java
+++ b/app/src/main/java/org/onosproject/olt/impl/Olt.java
@@ -24,7 +24,6 @@
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import org.onlab.packet.EthType;
-import org.onlab.packet.IPv4;
import org.onlab.packet.VlanId;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
@@ -54,6 +53,8 @@
import org.onosproject.net.flowobjective.Objective;
import org.onosproject.net.flowobjective.ObjectiveContext;
import org.onosproject.net.flowobjective.ObjectiveError;
+import org.onosproject.olt.AccessDeviceConfig;
+import org.onosproject.olt.AccessDeviceData;
import org.onosproject.olt.AccessDeviceEvent;
import org.onosproject.olt.AccessDeviceListener;
import org.onosproject.olt.AccessDeviceService;
@@ -366,32 +367,8 @@
}
});
-
- FilteringObjective igmp = DefaultFilteringObjective.builder()
- .permit()
- .withKey(Criteria.matchInPort(port.number()))
- .addCondition(Criteria.matchEthType(EthType.EtherType.IPV4.ethType()))
- .addCondition(Criteria.matchIPProtocol(IPv4.PROTOCOL_IGMP))
- .withMeta(DefaultTrafficTreatment.builder()
- .setOutput(PortNumber.CONTROLLER).build())
- .fromApp(appId)
- .withPriority(1000)
- .add(new ObjectiveContext() {
- @Override
- public void onSuccess(Objective objective) {
- log.info("Igmp filter for {} on {} installed.",
- devId, port);
- }
-
- @Override
- public void onError(Objective objective, ObjectiveError error) {
- log.info("Igmp filter for {} on {} failed because {}.",
- devId, port, error);
- }
- });
-
flowObjectiveService.filter(devId, eapol);
- flowObjectiveService.filter(devId, igmp);
+
}
private class InternalDeviceListener implements DeviceListener {