Fixed ECMP demo pipeconf
Change-Id: I944ccceecb0053b2b421213b844912036a72c4c6
diff --git a/apps/pi-demo/ecmp/BUCK b/apps/pi-demo/ecmp/BUCK
index d33ac207..ebe97de 100644
--- a/apps/pi-demo/ecmp/BUCK
+++ b/apps/pi-demo/ecmp/BUCK
@@ -3,6 +3,7 @@
'//lib:minimal-json',
'//incubator/bmv2/model:onos-incubator-bmv2-model',
'//apps/pi-demo/common:onos-apps-pi-demo-common',
+ '//drivers/default:onos-drivers-default',
]
osgi_jar (
@@ -12,6 +13,7 @@
BUNDLES = [
'//apps/pi-demo/ecmp:onos-apps-pi-demo-ecmp',
'//apps/pi-demo/common:onos-apps-pi-demo-common',
+ '//drivers/default:onos-drivers-default',
]
onos_app (
diff --git a/apps/pi-demo/ecmp/src/main/java/org/onosproject/pi/demo/app/ecmp/EcmpFabricApp.java b/apps/pi-demo/ecmp/src/main/java/org/onosproject/pi/demo/app/ecmp/EcmpFabricApp.java
index 7caa8e9..1817997 100644
--- a/apps/pi-demo/ecmp/src/main/java/org/onosproject/pi/demo/app/ecmp/EcmpFabricApp.java
+++ b/apps/pi-demo/ecmp/src/main/java/org/onosproject/pi/demo/app/ecmp/EcmpFabricApp.java
@@ -21,6 +21,8 @@
import org.apache.commons.lang3.tuple.Pair;
import org.apache.felix.scr.annotations.Component;
import org.onlab.util.ImmutableByteSequence;
+import org.onosproject.driver.pipeline.DefaultSingleTablePipeline;
+import org.onosproject.net.behaviour.Pipeliner;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.criteria.Criterion;
import org.onosproject.net.flow.criteria.PiCriterion;
@@ -73,13 +75,14 @@
private static final String APP_NAME = "org.onosproject.pi-ecmp-fabric";
private static final String MODEL_NAME = "ECMP";
private static final String PIPECONF_ID = "org.project.pipeconf.ecmp";
- private static final URL P4INFO_URL = EcmpFabricApp.class.getResource("ecmp.p4info");
- private static final URL JSON_URL = EcmpFabricApp.class.getResource("ecmp.json");
+ private static final URL P4INFO_URL = EcmpFabricApp.class.getResource("/ecmp.p4info");
+ private static final URL JSON_URL = EcmpFabricApp.class.getResource("/ecmp.json");
private static final PiPipeconf ECMP_PIPECONF = DefaultPiPipeconf.builder()
.withId(new PiPipeconfId(PIPECONF_ID))
.withPipelineModel(Bmv2PipelineModelParser.parse(JSON_URL))
.addBehaviour(PiPipelineInterpreter.class, EcmpInterpreter.class)
+ .addBehaviour(Pipeliner.class, DefaultSingleTablePipeline.class)
.addExtension(P4_INFO_TEXT, P4INFO_URL)
.addExtension(BMV2_JSON, JSON_URL)
.build();