blob: d544fc58d16ebe97963ad17a9d180eff90c644f8 [file] [log] [blame]
Srikanth Vavilapallifb38ed62014-10-20 13:34:01 -07001package net.onrc.onos.apps.segmentrouting;
2
3import java.util.List;
4
5import net.floodlightcontroller.core.module.IFloodlightService;
6import net.floodlightcontroller.util.MACAddress;
7import net.onrc.onos.core.util.Dpid;
8import net.onrc.onos.core.util.IPv4Net;
9
10/**
11 * The API exported by the main SDN-IP class. This is the interface between the
12 * REST handlers and the SDN-IP module.
13 */
14public interface ISegmentRoutingService extends IFloodlightService {
15
16 /**
17 * Create a tunnel for policy routing.
18 *
19 * @param tunnelId ID for the tunnel
20 * @param Ids Node IDs for the tunnel
21 *
22 * @return "true/false" depending tunnel creation status
23 */
24 public boolean createTunnel(String tunnelId, List<Dpid> Ids);
25
26 /**
27 * Remove a Segment Routing tunnel given a tunnel Id.
28 *
29 * @param tunnelId ID for the tunnel
30 *
31 * @return "true/false" depending tunnel deletion status
32 */
33 public boolean removeTunnel(String tunnelId);
34
35 /**
36 * Create a policy for policy based segment routing
37 *
38 * @param pid Unique Policy Identifier
39 * @param srcIP Source IP address in CIDR format
40 * @param dstIP Destination IP address in CIDR format
41 * @param ipProto IP protocol type
42 * @param srcPort Source L4 port
43 * @param dstPort Destination L4 port
44 * @param priority Priority of the policy
45 * @param tid SR Tunnel Id to be associated with this policy
46 *
47 * @return "true/false" depending tunnel creation status
48 */
49 public boolean createPolicy(String pid, MACAddress srcMac, MACAddress dstMac,
50 Short etherType, IPv4Net srcIp, IPv4Net dstIp, Byte ipProto,
51 Short srcPort, Short dstPort, int priority, String tid);
52
53 /**
54 * Remove a policy given policy Id
55 *
56 * @param pid Unique Policy Identifier
57 *
58 * @return "true/false" depending tunnel deletion status
59 */
60 public boolean removePolicy(String pid);
61}