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