Jonathan Hart | ebba1e1 | 2013-10-29 11:37:02 -0700 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.core.config; |
| 2 | |
| 3 | import java.net.InetAddress; |
Jonathan Hart | e93aed4 | 2013-12-05 18:39:50 -0800 | [diff] [blame] | 4 | import java.util.ArrayList; |
| 5 | import java.util.Collection; |
| 6 | import java.util.HashMap; |
| 7 | import java.util.Map; |
Jonathan Hart | ebba1e1 | 2013-10-29 11:37:02 -0700 | [diff] [blame] | 8 | |
Jonathan Hart | e93aed4 | 2013-12-05 18:39:50 -0800 | [diff] [blame] | 9 | import net.floodlightcontroller.core.module.FloodlightModuleContext; |
| 10 | import net.floodlightcontroller.core.module.FloodlightModuleException; |
| 11 | import net.floodlightcontroller.core.module.IFloodlightModule; |
| 12 | import net.floodlightcontroller.core.module.IFloodlightService; |
Jonathan Hart | ebba1e1 | 2013-10-29 11:37:02 -0700 | [diff] [blame] | 13 | import net.floodlightcontroller.util.MACAddress; |
| 14 | import net.onrc.onos.ofcontroller.bgproute.Interface; |
| 15 | |
| 16 | import org.openflow.util.HexString; |
| 17 | |
Jonathan Hart | e93aed4 | 2013-12-05 18:39:50 -0800 | [diff] [blame] | 18 | public class DefaultConfiguration implements IConfigInfoService, IFloodlightModule { |
Jonathan Hart | ebba1e1 | 2013-10-29 11:37:02 -0700 | [diff] [blame] | 19 | |
| 20 | @Override |
| 21 | public boolean isInterfaceAddress(InetAddress address) { |
| 22 | return false; |
| 23 | } |
| 24 | |
| 25 | @Override |
| 26 | public boolean inConnectedNetwork(InetAddress address) { |
| 27 | return false; |
| 28 | } |
| 29 | |
| 30 | @Override |
| 31 | public boolean fromExternalNetwork(long inDpid, short inPort) { |
| 32 | return false; |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public Interface getOutgoingInterface(InetAddress dstIpAddress) { |
| 37 | return null; |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | public boolean hasLayer3Configuration() { |
| 42 | return false; |
| 43 | } |
| 44 | |
| 45 | @Override |
| 46 | public MACAddress getRouterMacAddress() { |
| 47 | return MACAddress.valueOf(HexString.fromHexString("000000000001")); |
| 48 | } |
| 49 | |
| 50 | @Override |
| 51 | public short getVlan() { |
| 52 | return 0; |
| 53 | } |
| 54 | |
Jonathan Hart | e93aed4 | 2013-12-05 18:39:50 -0800 | [diff] [blame] | 55 | @Override |
| 56 | public Collection<Class<? extends IFloodlightService>> getModuleServices() { |
| 57 | Collection<Class<? extends IFloodlightService>> l |
| 58 | = new ArrayList<Class<? extends IFloodlightService>>(); |
| 59 | l.add(IConfigInfoService.class); |
| 60 | return l; |
| 61 | } |
| 62 | |
| 63 | @Override |
| 64 | public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls() { |
| 65 | Map<Class<? extends IFloodlightService>, IFloodlightService> m |
| 66 | = new HashMap<Class<? extends IFloodlightService>, IFloodlightService>(); |
| 67 | m.put(IConfigInfoService.class, this); |
| 68 | return m; |
| 69 | } |
| 70 | |
| 71 | @Override |
| 72 | public Collection<Class<? extends IFloodlightService>> getModuleDependencies() { |
| 73 | return null; |
| 74 | } |
| 75 | |
| 76 | @Override |
| 77 | public void init(FloodlightModuleContext context) |
| 78 | throws FloodlightModuleException { |
| 79 | // no-op |
| 80 | } |
| 81 | |
| 82 | @Override |
| 83 | public void startUp(FloodlightModuleContext context) { |
| 84 | // no-op |
| 85 | } |
| 86 | |
Jonathan Hart | ebba1e1 | 2013-10-29 11:37:02 -0700 | [diff] [blame] | 87 | } |