blob: 1a8571d90da2c2e00424e5d03d933430318ac364 [file] [log] [blame]
Toshio Koide507c04a2013-06-12 16:39:47 -07001package net.onrc.onos.util;
2
3import net.floodlightcontroller.core.INetMapTopologyObjects.IDeviceObject;
4import net.floodlightcontroller.core.INetMapTopologyObjects.IFlowEntry;
5import net.floodlightcontroller.core.INetMapTopologyObjects.IFlowPath;
6import net.floodlightcontroller.core.INetMapTopologyObjects.IPortObject;
7import net.floodlightcontroller.core.INetMapTopologyObjects.ISwitchObject;
8import net.floodlightcontroller.util.FlowEntryId;
9import net.floodlightcontroller.util.FlowId;
10
11public interface IDBOperation {
Toshio Koide12004e62013-06-12 18:17:53 -070012 public ISwitchObject newSwitch(String dpid);
Toshio Koide507c04a2013-06-12 16:39:47 -070013 public ISwitchObject searchSwitch(String dpid);
14 public ISwitchObject searchActiveSwitch(String dpid);
15 public Iterable<ISwitchObject> getActiveSwitches();
16 public Iterable<ISwitchObject> getAllSwitches();
17 public Iterable<ISwitchObject> getInactiveSwitches();
Toshio Koide12004e62013-06-12 18:17:53 -070018 public Iterable<IFlowEntry> getAllSwitchNotUpdatedFlowEntries();
19 public void removeSwitch(ISwitchObject sw);
20
21 public IPortObject newPort(Short portNumber);
Toshio Koide507c04a2013-06-12 16:39:47 -070022 public IPortObject searchPort(String dpid, short number);
Toshio Koide12004e62013-06-12 18:17:53 -070023 public void removePort(IPortObject port);
24
25 public IDeviceObject newDevice();
26 public IDeviceObject searchDevice(String macAddr);
Toshio Koide507c04a2013-06-12 16:39:47 -070027 public Iterable<IDeviceObject> getDevices();
Toshio Koide12004e62013-06-12 18:17:53 -070028 public void removeDevice(IDeviceObject dev);
29
Toshio Koide507c04a2013-06-12 16:39:47 -070030 public IFlowPath newFlowPath();
Toshio Koide12004e62013-06-12 18:17:53 -070031 public IFlowPath searchFlowPath(FlowId flowId);
Toshio Koide507c04a2013-06-12 16:39:47 -070032 public IFlowPath getFlowPathByFlowEntry(IFlowEntry flowEntry);
33 public Iterable<IFlowPath> getAllFlowPaths();
Toshio Koide12004e62013-06-12 18:17:53 -070034 public void removeFlowPath(IFlowPath flowPath);
35
Toshio Koide507c04a2013-06-12 16:39:47 -070036 public IFlowEntry newFlowEntry();
Toshio Koide12004e62013-06-12 18:17:53 -070037 public IFlowEntry searchFlowEntry(FlowEntryId flowEntryId);
Toshio Koide507c04a2013-06-12 16:39:47 -070038 public Iterable<IFlowEntry> getAllFlowEntries();
Toshio Koide12004e62013-06-12 18:17:53 -070039 public void removeFlowEntry(IFlowEntry flowEntry);
Toshio Koidea41950a2013-06-13 13:09:19 -070040
Toshio Koidef20a5072013-06-13 13:18:22 -070041 public IDBConnection getDBConnection();
42 public void commit();
43 public void rollback();
44 public void close();
Toshio Koide507c04a2013-06-12 16:39:47 -070045}