Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 1 | package net.onrc.onos.flow; |
| 2 | |
| 3 | import java.util.ArrayList; |
| 4 | import java.util.List; |
| 5 | import java.util.Map; |
| 6 | |
| 7 | import net.floodlightcontroller.core.INetMapTopologyObjects.IFlowEntry; |
| 8 | import net.floodlightcontroller.core.INetMapTopologyObjects.IFlowPath; |
| 9 | import net.floodlightcontroller.core.INetMapTopologyObjects.IPortObject; |
| 10 | import net.floodlightcontroller.core.IOFSwitch; |
| 11 | import net.floodlightcontroller.util.FlowEntry; |
| 12 | import net.floodlightcontroller.util.FlowPath; |
| 13 | |
| 14 | public class FlowManagerImpl implements IFlowManager { |
| 15 | |
| 16 | @Override |
| 17 | public void createFlow(IPortObject src_port, IPortObject dest_port) { |
| 18 | // TODO Auto-generated method stub |
| 19 | |
| 20 | } |
| 21 | |
| 22 | @Override |
| 23 | public Iterable<FlowPath> getFlows(IPortObject src_port, |
| 24 | IPortObject dest_port) { |
| 25 | // TODO Auto-generated method stub |
| 26 | return null; |
| 27 | } |
| 28 | |
| 29 | @Override |
| 30 | public Iterable<FlowPath> getOutFlows(IPortObject port) { |
| 31 | // TODO Auto-generated method stub |
| 32 | List<FlowPath> flowPaths = new ArrayList<FlowPath> (); |
| 33 | Iterable<IFlowEntry> flowEntries = port.getOutFlowEntries(); |
| 34 | |
| 35 | for(IFlowEntry fe: flowEntries) { |
Pankaj Berde | b4bdf70 | 2013-03-28 13:37:24 -0700 | [diff] [blame] | 36 | IFlowPath flow = fe.getFlow(); |
Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 37 | FlowPath flowPath = new FlowPath(flow); |
| 38 | flowPaths.add(flowPath); |
| 39 | } |
| 40 | return flowPaths; |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public void reconcileFlows(IPortObject src_port) { |
| 45 | // TODO Auto-generated method stub |
| 46 | |
| 47 | Iterable<IFlowEntry> flowEntries = src_port.getOutFlowEntries(); |
| 48 | |
| 49 | for(IFlowEntry fe: flowEntries) { |
| 50 | IFlowPath flow = fe.getFlow(); |
| 51 | reconcileFlow(flow); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | private void reconcileFlow(IFlowPath flow) { |
| 56 | // TODO Auto-generated method stub |
| 57 | |
| 58 | } |
| 59 | |
| 60 | @Override |
| 61 | public void reconcileFlow(IPortObject src_port, IPortObject dest_port) { |
| 62 | // TODO Auto-generated method stub |
| 63 | |
| 64 | } |
| 65 | |
| 66 | @Override |
| 67 | public FlowPath computeFlowPath(IPortObject src_port, IPortObject dest_port) { |
| 68 | // TODO Auto-generated method stub |
| 69 | return null; |
| 70 | } |
| 71 | |
| 72 | @Override |
| 73 | public Iterable<FlowEntry> getFlowEntries(FlowPath flow) { |
| 74 | // TODO Auto-generated method stub |
| 75 | return null; |
| 76 | } |
Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 77 | |
Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 78 | |
Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 79 | @Override |
Pavlin Radoslavov | 2b8e622 | 2013-04-03 11:05:01 -0700 | [diff] [blame] | 80 | public boolean installRemoteFlowEntry(FlowPath flowPath, |
| 81 | FlowEntry entry) { |
Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 82 | // TODO Auto-generated method stub |
| 83 | return false; |
| 84 | } |
| 85 | |
| 86 | @Override |
Pavlin Radoslavov | 2b8e622 | 2013-04-03 11:05:01 -0700 | [diff] [blame] | 87 | public boolean removeRemoteFlowEntry(FlowPath flowPath, |
| 88 | FlowEntry entry) { |
Pankaj Berde | 83d8338 | 2013-03-28 13:55:34 -0700 | [diff] [blame] | 89 | return false; |
Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 90 | // TODO Auto-generated method stub |
| 91 | |
| 92 | } |
| 93 | |
Pankaj Berde | b4bdf70 | 2013-03-28 13:37:24 -0700 | [diff] [blame] | 94 | @Override |
Pavlin Radoslavov | 2b8e622 | 2013-04-03 11:05:01 -0700 | [diff] [blame] | 95 | public boolean installFlowEntry(IOFSwitch mySwitch, |
| 96 | FlowPath flowPath, |
| 97 | FlowEntry flowEntry) { |
Pankaj Berde | b4bdf70 | 2013-03-28 13:37:24 -0700 | [diff] [blame] | 98 | // TODO Auto-generated method stub |
| 99 | return false; |
| 100 | } |
| 101 | |
| 102 | @Override |
Pavlin Radoslavov | 2b8e622 | 2013-04-03 11:05:01 -0700 | [diff] [blame] | 103 | public boolean removeFlowEntry(IOFSwitch mySwitch, |
| 104 | FlowPath flowPath, |
| 105 | FlowEntry flowEntry) { |
Pankaj Berde | b4bdf70 | 2013-03-28 13:37:24 -0700 | [diff] [blame] | 106 | // TODO Auto-generated method stub |
| 107 | return false; |
| 108 | } |
| 109 | |
Pankaj Berde | fc30d3f | 2013-03-28 13:34:44 -0700 | [diff] [blame] | 110 | } |