blob: 864e22773c5aa6234d435daf3769d3bc3f49cb70 [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);
Pankaj Berde15193092013-03-21 17:30:14 -070013 public Iterable<ISwitchObject> getActiveSwitches(GraphDBConnection conn);
14 public Iterable<ISwitchObject> getAllSwitches(GraphDBConnection conn);
15 public Iterable<ISwitchObject> getInactiveSwitches(GraphDBConnection conn);
16
17
Pankaj Berdeda809572013-02-22 15:31:20 -080018 public IDeviceObject searchDevice(GraphDBConnection conn, String macAddr);
19 public IDeviceObject newDevice(GraphDBConnection conn);
20 public void removeDevice(GraphDBConnection conn, IDeviceObject dev);
21 public IPortObject searchPort(GraphDBConnection conn, String dpid, short number);
Pankaj Berdeac1a8c32013-02-26 17:45:57 -080022 public Iterable<IDeviceObject> getDevices(GraphDBConnection conn);
Pavlin Radoslavovb6f53542013-03-01 16:02:14 -080023 public IFlowPath searchFlowPath(GraphDBConnection conn, FlowId flowId);
24 public IFlowPath newFlowPath(GraphDBConnection conn);
25 public void removeFlowPath(GraphDBConnection conn, IFlowPath flowPath);
26 public IFlowPath getFlowPathByFlowEntry(GraphDBConnection conn,
27 IFlowEntry flowEntry);
Pavlin Radoslavov706df052013-03-06 10:49:07 -080028 public Iterable<IFlowPath> getAllFlowPaths(GraphDBConnection conn);
Pavlin Radoslavovb6f53542013-03-01 16:02:14 -080029 public IFlowEntry searchFlowEntry(GraphDBConnection conn,
30 FlowEntryId flowEntryId);
31 public IFlowEntry newFlowEntry(GraphDBConnection conn);
32 public void removeFlowEntry(GraphDBConnection conn,
33 IFlowEntry flowEntry);
34 public Iterable<IFlowEntry> getAllFlowEntries(GraphDBConnection conn);
Pankaj Berde15193092013-03-21 17:30:14 -070035 public IPortObject newPort(GraphDBConnection conn);
36 ISwitchObject newSwitch(GraphDBConnection conn);
37 void removePort(GraphDBConnection conn, IPortObject port);
38 void removeSwitch(GraphDBConnection conn, ISwitchObject sw);
Pankaj Berdeda809572013-02-22 15:31:20 -080039}