HIGUCHI Yuta | 2051490 | 2013-06-12 11:24:16 -0700 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.core; |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 2 | |
Pankaj Berde | bbd3861 | 2013-06-22 05:59:12 -0700 | [diff] [blame] | 3 | import net.floodlightcontroller.core.IOFSwitch; |
| 4 | |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 5 | import org.openflow.protocol.OFPhysicalPort; |
| 6 | |
| 7 | public interface ISwitchStorage extends INetMapStorage { |
| 8 | |
Pankaj Berde | 28cc61c | 2013-01-08 18:19:33 -0800 | [diff] [blame] | 9 | public enum SwitchState { |
Pankaj Berde | 8557a46 | 2013-01-07 08:59:31 -0800 | [diff] [blame] | 10 | INACTIVE, |
| 11 | ACTIVE |
| 12 | } |
| 13 | |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 14 | /* |
Naoki Shiota | b2d17e8 | 2013-10-18 18:08:16 -0700 | [diff] [blame] | 15 | * Initialize |
| 16 | */ |
| 17 | public void init(String conf); |
| 18 | /* |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 19 | * Update the switch details |
| 20 | */ |
Pankaj Berde | 8557a46 | 2013-01-07 08:59:31 -0800 | [diff] [blame] | 21 | public void update(String dpid,SwitchState state, DM_OPERATION op); |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 22 | /* |
| 23 | * Associate a port on switch |
| 24 | */ |
Pankaj Berde | 4dea346 | 2013-01-03 18:02:38 -0800 | [diff] [blame] | 25 | public void addPort(String dpid, OFPhysicalPort port); |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 26 | /* |
Naoki Shiota | b2d17e8 | 2013-10-18 18:08:16 -0700 | [diff] [blame] | 27 | * Delete a port on a switch by num |
| 28 | */ |
| 29 | public void deletePort(String dpid, short port); |
| 30 | /* |
Pankaj Berde | bbd3861 | 2013-06-22 05:59:12 -0700 | [diff] [blame] | 31 | * Add a switch and all its associated ports |
| 32 | */ |
| 33 | public void addSwitch(IOFSwitch sw); |
| 34 | /* |
| 35 | * Add a switch |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 36 | */ |
Pankaj Berde | 4dea346 | 2013-01-03 18:02:38 -0800 | [diff] [blame] | 37 | public void addSwitch(String dpid); |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 38 | /* |
| 39 | * Delete switch and associated ports |
| 40 | */ |
Pankaj Berde | 4dea346 | 2013-01-03 18:02:38 -0800 | [diff] [blame] | 41 | public void deleteSwitch(String dpid); |
Pankaj Berde | d1259e8 | 2013-01-23 14:10:00 -0800 | [diff] [blame] | 42 | |
| 43 | |
Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 44 | } |