Added new class files
Change-Id: Iaf24992560e59e7552e39fd4610d5c669d0afaa7
diff --git a/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingPolicy.java b/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingPolicy.java
new file mode 100644
index 0000000..d795d61
--- /dev/null
+++ b/src/main/java/net/onrc/onos/apps/segmentrouting/SegmentRoutingPolicy.java
@@ -0,0 +1,64 @@
+package net.onrc.onos.apps.segmentrouting;
+
+import net.onrc.onos.core.matchaction.match.PacketMatch;
+
+public class SegmentRoutingPolicy {
+
+ /**
+ * Enums for policy type
+ *
+ */
+ public enum PolicyType{
+ TUNNEL_FLOW,
+ LOADBALANCE,
+ AVOID,
+ DENY
+ }
+
+ protected SegmentRoutingManager srManager;
+ protected String policyId;
+ protected PacketMatch match;
+ protected int priority;
+ protected PolicyType type;
+
+ public SegmentRoutingPolicy(SegmentRoutingManager srm, String pid,
+ PolicyType type, PacketMatch match, int priority) {
+ this.srManager = srm;
+ this.policyId = pid;
+ this.match = match;
+ this.priority = priority;
+ this.type = type;
+ }
+
+ public SegmentRoutingPolicy(String pid, PacketMatch match, int priority) {
+ this.policyId = pid;
+ this.match = match;
+ this.priority = priority;
+ this.type = PolicyType.TUNNEL_FLOW;
+ }
+
+ public String getPolicyId(){
+ return this.policyId;
+ }
+
+ public PacketMatch getMatch(){
+ return this.match;
+ }
+
+ public int getPriority(){
+ return this.priority;
+ }
+
+ public PolicyType getType(){
+ return this.type;
+ }
+
+ public boolean createPolicy() {
+ return false;
+ }
+
+ public boolean removePolicy() {
+ return false;
+ }
+
+}