blob: d2e810959f8bf2bb9f3c3ab4eafa1295c580cac0 [file] [log] [blame]
Pankaj Berde85016ab2013-06-21 11:34:53 -07001package net.onrc.onos.graph;
2
Toshio Koide3f233542014-01-07 14:19:09 -08003import java.util.Map;
4
Toshio Koide3fcebc12014-01-09 22:40:11 -08005import com.tinkerpop.blueprints.Vertex;
6
Pankaj Berde85016ab2013-06-21 11:34:53 -07007import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IDeviceObject;
8import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowEntry;
9import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowPath;
10import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IPortObject;
11import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.ISwitchObject;
12import net.onrc.onos.ofcontroller.util.FlowEntryId;
13import net.onrc.onos.ofcontroller.util.FlowId;
14
15public interface IDBOperation {
Yuta HIGUCHI2cef9ba2014-01-09 19:33:22 -080016 public static final String PORT_ID_DELIM = "@";
17
Pankaj Berde85016ab2013-06-21 11:34:53 -070018 public ISwitchObject newSwitch(String dpid);
19 public ISwitchObject searchSwitch(String dpid);
20 public ISwitchObject searchActiveSwitch(String dpid);
21 public Iterable<ISwitchObject> getActiveSwitches();
22 public Iterable<ISwitchObject> getAllSwitches();
23 public Iterable<ISwitchObject> getInactiveSwitches();
24 public Iterable<IFlowEntry> getAllSwitchNotUpdatedFlowEntries();
25 public void removeSwitch(ISwitchObject sw);
Yuta HIGUCHI2cef9ba2014-01-09 19:33:22 -080026
Pankaj Berdebbd38612013-06-22 05:59:12 -070027 @Deprecated
Pankaj Berde85016ab2013-06-21 11:34:53 -070028 public IPortObject newPort(Short portNumber);
Pankaj Berdebbd38612013-06-22 05:59:12 -070029 public IPortObject newPort(String dpid, Short portNum);
30 public IPortObject searchPort(String dpid, Short number);
Pankaj Berde85016ab2013-06-21 11:34:53 -070031 public void removePort(IPortObject port);
Yuta HIGUCHI2cef9ba2014-01-09 19:33:22 -080032
Pankaj Berde85016ab2013-06-21 11:34:53 -070033 public IDeviceObject newDevice();
34 public IDeviceObject searchDevice(String macAddr);
35 public Iterable<IDeviceObject> getDevices();
36 public void removeDevice(IDeviceObject dev);
37
38 public IFlowPath newFlowPath();
39 public IFlowPath searchFlowPath(FlowId flowId);
40 public IFlowPath getFlowPathByFlowEntry(IFlowEntry flowEntry);
41 public Iterable<IFlowPath> getAllFlowPaths();
42 public void removeFlowPath(IFlowPath flowPath);
43
44 public IFlowEntry newFlowEntry();
45 public IFlowEntry searchFlowEntry(FlowEntryId flowEntryId);
46 public Iterable<IFlowEntry> getAllFlowEntries();
47 public void removeFlowEntry(IFlowEntry flowEntry);
Toshio Koide3f233542014-01-07 14:19:09 -080048
Toshio Koide3fcebc12014-01-09 22:40:11 -080049 public void setVertexProperties(Vertex vertex, Map<String, Object> map);
Toshio Koide3f233542014-01-07 14:19:09 -080050
Yuta HIGUCHI2cef9ba2014-01-09 19:33:22 -080051 public IDBConnection getDBConnection();
Pankaj Berde85016ab2013-06-21 11:34:53 -070052 public void commit();
53 public void rollback();
54 public void close();
Yuta HIGUCHI2cef9ba2014-01-09 19:33:22 -080055
56 public Iterable<IPortObject> getAllPorts();
Pankaj Berde85016ab2013-06-21 11:34:53 -070057}