blob: 99f291da9a9c591c311b24612e87cf137d3420fc [file] [log] [blame]
Pankaj Berded1259e82013-01-23 14:10:00 -08001package net.floodlightcontroller.core.internal;
2
3import java.util.List;
4
5import net.floodlightcontroller.core.INetMapTopologyService.ITopoSwitchService;
6
7public class TopoSwitchServiceImpl implements ITopoSwitchService {
8
9 ThreadLocal<SwitchStorageImpl> store = new ThreadLocal<SwitchStorageImpl>() {
10 @Override
11 protected SwitchStorageImpl initialValue() {
12 SwitchStorageImpl swStore = new SwitchStorageImpl();
13 //TODO: Get the file path from global properties
14 swStore.init("/tmp/cassandra.titan");
15 return swStore;
16 }
17 };
18
19 SwitchStorageImpl swStore = store.get();
20
21 @Override
22 public List<String> GetActiveSwitches() {
23 // TODO Auto-generated method stub
24 return swStore.getActiveSwitches();
25 }
26
27 @Override
28 public List<String> GetAllSwitches() {
29 // TODO Auto-generated method stub
30 return swStore.getAllSwitches();
31 }
32
33 @Override
34 public List<String> GetInactiveSwitches() {
35 // TODO Auto-generated method stub
36 return swStore.getInactiveSwitches();
37 }
38
39 @Override
40 public List<String> GetPortsOnSwitch(String dpid) {
41 // TODO Auto-generated method stub
42 return null;
43 }
44
45}