blob: f873f270822f56ec942735514645e8deea8a6397 [file] [log] [blame]
Pankaj Berde85016ab2013-06-21 11:34:53 -07001package net.onrc.onos.graph;
2
3import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IDeviceObject;
4import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowEntry;
5import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowPath;
6import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IPortObject;
7import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.ISwitchObject;
8import net.onrc.onos.ofcontroller.util.FlowEntryId;
9import net.onrc.onos.ofcontroller.util.FlowId;
10
11public interface IDBOperation {
12 public ISwitchObject newSwitch(String dpid);
13 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();
18 public Iterable<IFlowEntry> getAllSwitchNotUpdatedFlowEntries();
19 public void removeSwitch(ISwitchObject sw);
20
Pankaj Berdebbd38612013-06-22 05:59:12 -070021 @Deprecated
Pankaj Berde85016ab2013-06-21 11:34:53 -070022 public IPortObject newPort(Short portNumber);
Pankaj Berdebbd38612013-06-22 05:59:12 -070023 public IPortObject newPort(String dpid, Short portNum);
24 public IPortObject searchPort(String dpid, Short number);
Pankaj Berde85016ab2013-06-21 11:34:53 -070025 public void removePort(IPortObject port);
26
27 public IDeviceObject newDevice();
28 public IDeviceObject searchDevice(String macAddr);
29 public Iterable<IDeviceObject> getDevices();
30 public void removeDevice(IDeviceObject dev);
31
32 public IFlowPath newFlowPath();
33 public IFlowPath searchFlowPath(FlowId flowId);
34 public IFlowPath getFlowPathByFlowEntry(IFlowEntry flowEntry);
35 public Iterable<IFlowPath> getAllFlowPaths();
36 public void removeFlowPath(IFlowPath flowPath);
37
38 public IFlowEntry newFlowEntry();
39 public IFlowEntry searchFlowEntry(FlowEntryId flowEntryId);
40 public Iterable<IFlowEntry> getAllFlowEntries();
41 public void removeFlowEntry(IFlowEntry flowEntry);
42
43 public IDBConnection getDBConnection();
44 public void commit();
45 public void rollback();
46 public void close();
Pankaj Berdebbd38612013-06-22 05:59:12 -070047
Pankaj Berde85016ab2013-06-21 11:34:53 -070048}