blob: d795d611abee5b783ba1f4e9932c9e95d77c929c [file] [log] [blame]
Sangho Shin177e64f2014-10-28 17:49:23 -07001package net.onrc.onos.apps.segmentrouting;
2
3import net.onrc.onos.core.matchaction.match.PacketMatch;
4
5public class SegmentRoutingPolicy {
6
7 /**
8 * Enums for policy type
9 *
10 */
11 public enum PolicyType{
12 TUNNEL_FLOW,
13 LOADBALANCE,
14 AVOID,
15 DENY
16 }
17
18 protected SegmentRoutingManager srManager;
19 protected String policyId;
20 protected PacketMatch match;
21 protected int priority;
22 protected PolicyType type;
23
24 public SegmentRoutingPolicy(SegmentRoutingManager srm, String pid,
25 PolicyType type, PacketMatch match, int priority) {
26 this.srManager = srm;
27 this.policyId = pid;
28 this.match = match;
29 this.priority = priority;
30 this.type = type;
31 }
32
33 public SegmentRoutingPolicy(String pid, PacketMatch match, int priority) {
34 this.policyId = pid;
35 this.match = match;
36 this.priority = priority;
37 this.type = PolicyType.TUNNEL_FLOW;
38 }
39
40 public String getPolicyId(){
41 return this.policyId;
42 }
43
44 public PacketMatch getMatch(){
45 return this.match;
46 }
47
48 public int getPriority(){
49 return this.priority;
50 }
51
52 public PolicyType getType(){
53 return this.type;
54 }
55
56 public boolean createPolicy() {
57 return false;
58 }
59
60 public boolean removePolicy() {
61 return false;
62 }
63
64}