blob: 4aa8168a2408a34519caf5b09dcae446b7806cfe [file] [log] [blame]
Pankaj Berdeda809572013-02-22 15:31:20 -08001package net.onrc.onos.util;
2
3import net.floodlightcontroller.core.INetMapTopologyObjects.IDeviceObject;
Pavlin Radoslavovb6f53542013-03-01 16:02:14 -08004import net.floodlightcontroller.core.INetMapTopologyObjects.IFlowEntry;
5import net.floodlightcontroller.core.INetMapTopologyObjects.IFlowPath;
Pankaj Berdeda809572013-02-22 15:31:20 -08006import net.floodlightcontroller.core.INetMapTopologyObjects.IPortObject;
7import net.floodlightcontroller.core.INetMapTopologyObjects.ISwitchObject;
Pavlin Radoslavovb6f53542013-03-01 16:02:14 -08008import net.floodlightcontroller.util.FlowEntryId;
9import net.floodlightcontroller.util.FlowId;
Pankaj Berdeda809572013-02-22 15:31:20 -080010
11public interface IDBUtils {
12 public ISwitchObject searchSwitch(GraphDBConnection conn, String dpid);
Pavlin Radoslavovf6fa7f02013-03-28 16:40:48 -070013 public ISwitchObject searchActiveSwitch(GraphDBConnection conn, String dpid);
Pankaj Berde15193092013-03-21 17:30:14 -070014 public Iterable<ISwitchObject> getActiveSwitches(GraphDBConnection conn);
15 public Iterable<ISwitchObject> getAllSwitches(GraphDBConnection conn);
16 public Iterable<ISwitchObject> getInactiveSwitches(GraphDBConnection conn);
17
18
Pankaj Berdeda809572013-02-22 15:31:20 -080019 public IDeviceObject searchDevice(GraphDBConnection conn, String macAddr);
20 public IDeviceObject newDevice(GraphDBConnection conn);
21 public void removeDevice(GraphDBConnection conn, IDeviceObject dev);
22 public IPortObject searchPort(GraphDBConnection conn, String dpid, short number);
Pankaj Berdeac1a8c32013-02-26 17:45:57 -080023 public Iterable<IDeviceObject> getDevices(GraphDBConnection conn);
Pavlin Radoslavovb6f53542013-03-01 16:02:14 -080024 public IFlowPath searchFlowPath(GraphDBConnection conn, FlowId flowId);
25 public IFlowPath newFlowPath(GraphDBConnection conn);
26 public void removeFlowPath(GraphDBConnection conn, IFlowPath flowPath);
27 public IFlowPath getFlowPathByFlowEntry(GraphDBConnection conn,
28 IFlowEntry flowEntry);
Pavlin Radoslavov706df052013-03-06 10:49:07 -080029 public Iterable<IFlowPath> getAllFlowPaths(GraphDBConnection conn);
Pavlin Radoslavovb6f53542013-03-01 16:02:14 -080030 public IFlowEntry searchFlowEntry(GraphDBConnection conn,
31 FlowEntryId flowEntryId);
32 public IFlowEntry newFlowEntry(GraphDBConnection conn);
33 public void removeFlowEntry(GraphDBConnection conn,
34 IFlowEntry flowEntry);
35 public Iterable<IFlowEntry> getAllFlowEntries(GraphDBConnection conn);
Pankaj Berde15193092013-03-21 17:30:14 -070036 public IPortObject newPort(GraphDBConnection conn);
37 ISwitchObject newSwitch(GraphDBConnection conn);
38 void removePort(GraphDBConnection conn, IPortObject port);
39 void removeSwitch(GraphDBConnection conn, ISwitchObject sw);
Pankaj Berded1c38592013-04-10 22:46:40 -070040 Iterable<IFlowEntry> getAllSwitchNotUpdatedFlowEntries(
41 GraphDBConnection conn);
Pankaj Berdeda809572013-02-22 15:31:20 -080042}