HIGUCHI Yuta | 80c3ab8 | 2013-06-12 13:17:05 -0700 | [diff] [blame^] | 1 | package net.onrc.onos.ofcontroller.linkdiscovery; |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 2 | |
| 3 | import java.util.List; |
| 4 | |
HIGUCHI Yuta | 80c3ab8 | 2013-06-12 13:17:05 -0700 | [diff] [blame^] | 5 | import net.floodlightcontroller.linkdiscovery.LinkInfo; |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 6 | import net.floodlightcontroller.routing.Link; |
HIGUCHI Yuta | 2051490 | 2013-06-12 11:24:16 -0700 | [diff] [blame] | 7 | import net.onrc.onos.ofcontroller.core.INetMapStorage; |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 8 | |
| 9 | public interface ILinkStorage extends INetMapStorage { |
| 10 | |
| 11 | /* |
| 12 | * Link creation |
| 13 | */ |
| 14 | public void update(Link link, DM_OPERATION op); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 15 | public void update(Link link, LinkInfo linkinfo, DM_OPERATION op); |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 16 | public void update(List<Link> List, DM_OPERATION op); |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 17 | |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 18 | /* |
| 19 | * Add Linkinfo |
| 20 | */ |
Pankaj Berde | 4887133 | 2013-06-10 21:14:35 -0700 | [diff] [blame] | 21 | public void updateLink (Link link, LinkInfo linkinfo, DM_OPERATION op); |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 22 | |
| 23 | /* |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 24 | * Delete a single link |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 25 | */ |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 26 | public void deleteLink(Link link); |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 27 | |
| 28 | /* |
| 29 | * Delete links associated with dpid and port |
| 30 | * If only dpid is used, All links associated for switch are removed |
| 31 | * Useful for port up/down and also switch join/remove events |
| 32 | */ |
Umesh Krishnaswamy | f962d64 | 2013-01-23 19:04:23 -0800 | [diff] [blame] | 33 | public void deleteLinksOnPort(Long dpid, short port); |
| 34 | |
| 35 | /* |
| 36 | * Delete a list of links |
| 37 | */ |
| 38 | public void deleteLinks(List<Link> links); |
| 39 | |
| 40 | /* |
| 41 | * Get Links from Storage |
| 42 | * If dpid and port both are specified specific link is retrieved |
| 43 | * If only dpid is set all links associated with Switch are retrieved |
| 44 | */ |
| 45 | public List<Link> getLinks(Long dpid, short port); |
Pankaj Berde | ff42180 | 2013-01-29 20:28:52 -0800 | [diff] [blame] | 46 | public List<Link> getLinks(String dpid); |
| 47 | public List<Link> getActiveLinks(); |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 48 | |
| 49 | /* |
| 50 | * Init with Storage conf |
| 51 | */ |
| 52 | public void init(String conf); |
Pankaj Berde | ff42180 | 2013-01-29 20:28:52 -0800 | [diff] [blame] | 53 | |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 54 | } |