Added new Action classes and Match classes to use MatchAction Framework to set up the routing rules for Segment Routing
Change-Id: I214691cd8ea38c991a14f93af3bed0238a8c8f4b
diff --git a/src/main/java/net/onrc/onos/core/matchaction/match/IpPacketMatch.java b/src/main/java/net/onrc/onos/core/matchaction/match/IpPacketMatch.java
new file mode 100644
index 0000000..58d7546
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/matchaction/match/IpPacketMatch.java
@@ -0,0 +1,17 @@
+package net.onrc.onos.core.matchaction.match;
+
+import net.onrc.onos.core.util.IPv4Net;
+
+public class IpPacketMatch implements Match {
+
+ IPv4Net dstIp;
+
+ public IpPacketMatch(String ipAddressSlash) {
+ this.dstIp = new IPv4Net(ipAddressSlash);
+ }
+
+ public IPv4Net getDestination() {
+ return dstIp;
+ }
+
+}
diff --git a/src/main/java/net/onrc/onos/core/matchaction/match/MplsPacketMatch.java b/src/main/java/net/onrc/onos/core/matchaction/match/MplsPacketMatch.java
new file mode 100644
index 0000000..cf4e8d4
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/matchaction/match/MplsPacketMatch.java
@@ -0,0 +1,15 @@
+package net.onrc.onos.core.matchaction.match;
+
+public class MplsPacketMatch implements Match {
+
+ private final int mplsLabel;
+
+ public MplsPacketMatch(int label) {
+ this.mplsLabel = label;
+ }
+
+ public int getMplsLabel() {
+ return mplsLabel;
+ }
+
+}