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