Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
| 5 | * the License. You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
| 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
| 11 | * specific language governing permissions and limitations under the License. |
| 12 | */ |
| 13 | |
| 14 | package org.onosproject.provider.bgp.topology.impl; |
| 15 | |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 16 | import static org.onosproject.bgp.controller.BgpDpid.uri; |
| 17 | import static org.onosproject.net.DeviceId.deviceId; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 18 | import static org.onosproject.net.Device.Type.ROUTER; |
| 19 | import static org.onosproject.net.Device.Type.VIRTUAL; |
| 20 | |
| 21 | import java.util.List; |
| 22 | import java.util.Set; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 23 | |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 24 | import org.onlab.packet.ChassisId; |
| 25 | import org.apache.felix.scr.annotations.Activate; |
| 26 | import org.apache.felix.scr.annotations.Component; |
| 27 | import org.apache.felix.scr.annotations.Deactivate; |
| 28 | import org.apache.felix.scr.annotations.Reference; |
| 29 | import org.apache.felix.scr.annotations.ReferenceCardinality; |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 30 | import org.onosproject.bgp.controller.BgpController; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 31 | import org.onosproject.bgp.controller.BgpDpid; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 32 | import org.onosproject.bgp.controller.BgpLinkListener; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 33 | import org.onosproject.bgp.controller.BgpNodeListener; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 34 | import org.onosproject.bgpio.exceptions.BgpParseException; |
| 35 | import org.onosproject.bgpio.protocol.linkstate.BgpLinkLSIdentifier; |
| 36 | import org.onosproject.bgpio.protocol.linkstate.BgpLinkLsNlriVer4; |
| 37 | import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSIdentifier; |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 38 | import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 39 | import org.onosproject.bgpio.protocol.linkstate.NodeDescriptors; |
| 40 | import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails; |
| 41 | import org.onosproject.bgpio.types.AutonomousSystemTlv; |
| 42 | import org.onosproject.bgpio.types.BgpLSIdentifierTlv; |
| 43 | import org.onosproject.bgpio.types.BgpValueType; |
| 44 | import org.onosproject.bgpio.types.IPv4AddressTlv; |
| 45 | import org.onosproject.bgpio.types.IsIsNonPseudonode; |
| 46 | import org.onosproject.bgpio.types.IsIsPseudonode; |
| 47 | import org.onosproject.bgpio.types.LinkLocalRemoteIdentifiersTlv; |
| 48 | import org.onosproject.bgpio.types.OspfNonPseudonode; |
| 49 | import org.onosproject.bgpio.types.OspfPseudonode; |
| 50 | import org.onosproject.core.CoreService; |
| 51 | import org.onosproject.net.AnnotationKeys; |
| 52 | import org.onosproject.net.ConnectPoint; |
| 53 | import org.onosproject.net.DefaultAnnotations; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 54 | import org.onosproject.net.Device; |
| 55 | import org.onosproject.net.DeviceId; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 56 | import org.onosproject.net.Link; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 57 | import org.onosproject.net.MastershipRole; |
Saurav Das | a2d3750 | 2016-03-25 17:50:40 -0700 | [diff] [blame] | 58 | import org.onosproject.net.PortNumber; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 59 | import org.onosproject.net.device.DefaultDeviceDescription; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 60 | import org.onosproject.net.device.DeviceDescription; |
| 61 | import org.onosproject.net.device.DeviceProvider; |
| 62 | import org.onosproject.net.device.DeviceProviderRegistry; |
| 63 | import org.onosproject.net.device.DeviceProviderService; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 64 | import org.onosproject.net.device.DeviceService; |
| 65 | import org.onosproject.net.link.DefaultLinkDescription; |
| 66 | import org.onosproject.net.link.LinkDescription; |
| 67 | import org.onosproject.net.link.LinkProvider; |
| 68 | import org.onosproject.net.link.LinkProviderRegistry; |
| 69 | import org.onosproject.net.link.LinkProviderService; |
| 70 | import org.onosproject.net.link.LinkService; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 71 | import org.onosproject.net.provider.AbstractProvider; |
| 72 | import org.onosproject.net.provider.ProviderId; |
| 73 | import org.slf4j.Logger; |
| 74 | import org.slf4j.LoggerFactory; |
| 75 | |
| 76 | /** |
| 77 | * Provider which uses an BGP controller to detect network infrastructure topology. |
| 78 | */ |
| 79 | @Component(immediate = true) |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 80 | public class BgpTopologyProvider extends AbstractProvider implements DeviceProvider, LinkProvider { |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 81 | |
| 82 | public BgpTopologyProvider() { |
| 83 | super(new ProviderId("bgp", "org.onosproject.provider.bgp")); |
| 84 | } |
| 85 | |
| 86 | private static final Logger log = LoggerFactory.getLogger(BgpTopologyProvider.class); |
| 87 | |
| 88 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 89 | protected DeviceProviderRegistry deviceProviderRegistry; |
| 90 | |
| 91 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 92 | protected LinkProviderRegistry linkProviderRegistry; |
| 93 | |
| 94 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 95 | protected BgpController controller; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 96 | |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 97 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
| 98 | protected LinkService linkService; |
| 99 | |
| 100 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
| 101 | protected DeviceService deviceService; |
| 102 | |
| 103 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
| 104 | protected CoreService coreService; |
| 105 | |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 106 | private DeviceProviderService deviceProviderService; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 107 | private LinkProviderService linkProviderService; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 108 | |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 109 | private InternalBgpProvider listener = new InternalBgpProvider(); |
| 110 | private static final String UNKNOWN = "unknown"; |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 111 | public static final long IDENTIFIER_SET = 0x100000000L; |
| 112 | public static final String AS_NUMBER = "asNumber"; |
| 113 | public static final String DOMAIN_IDENTIFIER = "domainIdentifier"; |
| 114 | public static final String ROUTING_UNIVERSE = "routingUniverse"; |
| 115 | public static final long PSEUDO_PORT = 0xffffffff; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 116 | |
| 117 | @Activate |
| 118 | public void activate() { |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 119 | log.debug("BgpTopologyProvider activate"); |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 120 | deviceProviderService = deviceProviderRegistry.register(this); |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 121 | linkProviderService = linkProviderRegistry.register(this); |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 122 | controller.addListener(listener); |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 123 | controller.addLinkListener(listener); |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | @Deactivate |
| 127 | public void deactivate() { |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 128 | log.debug("BgpTopologyProvider deactivate"); |
| 129 | deviceProviderRegistry.unregister(this); |
| 130 | deviceProviderService = null; |
| 131 | linkProviderRegistry.unregister(this); |
| 132 | linkProviderService = null; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 133 | controller.removeListener(listener); |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 134 | controller.removeLinkListener(listener); |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | /* |
| 138 | * Implements device and link update. |
| 139 | */ |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 140 | private class InternalBgpProvider implements BgpNodeListener, BgpLinkListener { |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 141 | |
| 142 | @Override |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 143 | public void addNode(BgpNodeLSNlriVer4 nodeNlri, PathAttrNlriDetails details) { |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 144 | log.debug("Add node {}", nodeNlri.toString()); |
| 145 | |
| 146 | if (deviceProviderService == null) { |
| 147 | return; |
| 148 | } |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 149 | Device.Type deviceType = ROUTER; |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 150 | BgpDpid nodeUri = new BgpDpid(nodeNlri); |
| 151 | DeviceId deviceId = deviceId(uri(nodeUri.toString())); |
| 152 | ChassisId cId = new ChassisId(); |
| 153 | |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 154 | DefaultAnnotations.Builder newBuilder = DefaultAnnotations.builder(); |
| 155 | |
| 156 | newBuilder.set(AnnotationKeys.TYPE, "L3"); |
| 157 | newBuilder.set(ROUTING_UNIVERSE, Long.toString(nodeNlri.getIdentifier())); |
| 158 | |
| 159 | List<BgpValueType> tlvs = nodeNlri.getLocalNodeDescriptors().getNodedescriptors().getSubTlvs(); |
| 160 | for (BgpValueType tlv : tlvs) { |
| 161 | if (tlv instanceof AutonomousSystemTlv) { |
| 162 | newBuilder.set(AS_NUMBER, Integer.toString(((AutonomousSystemTlv) tlv).getAsNum())); |
| 163 | } else if (tlv instanceof BgpLSIdentifierTlv) { |
| 164 | newBuilder.set(DOMAIN_IDENTIFIER, |
| 165 | Integer.toString(((BgpLSIdentifierTlv) tlv).getBgpLsIdentifier())); |
| 166 | } |
| 167 | if (tlv.getType() == NodeDescriptors.IGP_ROUTERID_TYPE) { |
| 168 | if (tlv instanceof IsIsPseudonode) { |
| 169 | deviceType = VIRTUAL; |
| 170 | newBuilder.set(AnnotationKeys.ROUTER_ID, new String(((IsIsPseudonode) tlv).getIsoNodeId())); |
| 171 | } else if (tlv instanceof OspfPseudonode) { |
| 172 | deviceType = VIRTUAL; |
| 173 | newBuilder |
| 174 | .set(AnnotationKeys.ROUTER_ID, Integer.toString(((OspfPseudonode) tlv).getrouterID())); |
| 175 | } else if (tlv instanceof IsIsNonPseudonode) { |
| 176 | newBuilder.set(AnnotationKeys.ROUTER_ID, new String(((IsIsNonPseudonode) tlv).getIsoNodeId())); |
| 177 | } else if (tlv instanceof OspfNonPseudonode) { |
| 178 | newBuilder.set(AnnotationKeys.ROUTER_ID, |
| 179 | Integer.toString(((OspfNonPseudonode) tlv).getrouterID())); |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | DeviceDescription description = new DefaultDeviceDescription(uri(nodeUri.toString()), deviceType, UNKNOWN, |
| 185 | UNKNOWN, UNKNOWN, UNKNOWN, cId, newBuilder.build()); |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 186 | deviceProviderService.deviceConnected(deviceId, description); |
| 187 | |
| 188 | } |
| 189 | |
| 190 | @Override |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 191 | public void deleteNode(BgpNodeLSNlriVer4 nodeNlri) { |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 192 | log.debug("Delete node {}", nodeNlri.toString()); |
| 193 | |
| 194 | if (deviceProviderService == null) { |
| 195 | return; |
| 196 | } |
| 197 | |
Priyanka B | fc51c95 | 2016-03-26 14:30:33 +0530 | [diff] [blame] | 198 | BgpDpid deviceUri = new BgpDpid(nodeNlri); |
| 199 | DeviceId deviceId = deviceId(uri(deviceUri.toString())); |
| 200 | deviceProviderService.deviceDisconnected(deviceId); |
| 201 | } |
| 202 | |
| 203 | @Override |
| 204 | public void addLink(BgpLinkLsNlriVer4 linkNlri, PathAttrNlriDetails details) throws BgpParseException { |
| 205 | log.debug("Addlink {}", linkNlri.toString()); |
| 206 | |
| 207 | if (linkProviderService == null) { |
| 208 | return; |
| 209 | } |
| 210 | LinkDescription linkDes = buildLinkDes(linkNlri, details, true); |
| 211 | linkProviderService.linkDetected(linkDes); |
| 212 | } |
| 213 | |
| 214 | //Build link description. |
| 215 | private LinkDescription buildLinkDes(BgpLinkLsNlriVer4 linkNlri, PathAttrNlriDetails details, boolean isAddLink) |
| 216 | throws BgpParseException { |
| 217 | long srcAddress = 0; |
| 218 | long dstAddress = 0; |
| 219 | boolean localPseduo = false; |
| 220 | boolean remotePseduo = false; |
| 221 | |
| 222 | List<BgpValueType> localTlvs = linkNlri.getLinkIdentifier().localNodeDescriptors().getSubTlvs(); |
| 223 | for (BgpValueType localTlv : localTlvs) { |
| 224 | if (localTlv instanceof IsIsPseudonode || localTlv instanceof OspfPseudonode) { |
| 225 | localPseduo = true; |
| 226 | } |
| 227 | } |
| 228 | List<BgpValueType> remoteTlvs = linkNlri.getLinkIdentifier().remoteNodeDescriptors().getSubTlvs(); |
| 229 | for (BgpValueType remoteTlv : remoteTlvs) { |
| 230 | if (remoteTlv instanceof IsIsPseudonode || remoteTlv instanceof OspfPseudonode) { |
| 231 | remotePseduo = true; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | List<BgpValueType> tlvs = linkNlri.getLinkIdentifier().linkDescriptors(); |
| 236 | for (BgpValueType tlv : tlvs) { |
| 237 | if (tlv instanceof LinkLocalRemoteIdentifiersTlv) { |
| 238 | srcAddress = ((LinkLocalRemoteIdentifiersTlv) tlv).getLinkLocalIdentifier(); |
| 239 | //Set 32nd bit. |
| 240 | srcAddress = srcAddress | IDENTIFIER_SET; |
| 241 | dstAddress = ((LinkLocalRemoteIdentifiersTlv) tlv).getLinkRemoteIdentifier(); |
| 242 | dstAddress = dstAddress | IDENTIFIER_SET; |
| 243 | } else if (tlv instanceof IPv4AddressTlv) { |
| 244 | if (tlv.getType() == BgpLinkLSIdentifier.IPV4_INTERFACE_ADDRESS_TYPE) { |
| 245 | srcAddress = ((IPv4AddressTlv) tlv).address().toInt(); |
| 246 | } else { |
| 247 | dstAddress = ((IPv4AddressTlv) tlv).address().toInt(); |
| 248 | } |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | DeviceId srcId = deviceId(uri(new BgpDpid(linkNlri, BgpDpid.NODE_DESCRIPTOR_LOCAL).toString())); |
| 253 | DeviceId dstId = deviceId(uri(new BgpDpid(linkNlri, BgpDpid.NODE_DESCRIPTOR_REMOTE).toString())); |
| 254 | |
| 255 | if (localPseduo && srcAddress == 0) { |
| 256 | srcAddress = PSEUDO_PORT; |
| 257 | } else if (remotePseduo && dstAddress == 0) { |
| 258 | dstAddress = PSEUDO_PORT; |
| 259 | } |
| 260 | |
| 261 | ConnectPoint src = new ConnectPoint(srcId, PortNumber.portNumber(srcAddress)); |
| 262 | ConnectPoint dst = new ConnectPoint(dstId, PortNumber.portNumber(dstAddress)); |
| 263 | BgpNodeLSNlriVer4 srcNodeNlri = new BgpNodeLSNlriVer4(linkNlri.getIdentifier(), linkNlri.getProtocolId() |
| 264 | .getType(), new BgpNodeLSIdentifier(linkNlri.getLinkIdentifier().localNodeDescriptors()), false, |
| 265 | linkNlri.getRouteDistinguisher()); |
| 266 | |
| 267 | BgpNodeLSNlriVer4 dstNodeNlri = new BgpNodeLSNlriVer4(linkNlri.getIdentifier(), linkNlri.getProtocolId() |
| 268 | .getType(), new BgpNodeLSIdentifier(linkNlri.getLinkIdentifier().remoteNodeDescriptors()), false, |
| 269 | linkNlri.getRouteDistinguisher()); |
| 270 | |
| 271 | addOrDeletePseudoNode(isAddLink, localPseduo, remotePseduo, srcNodeNlri, |
| 272 | dstNodeNlri, srcId, dstId, details); |
| 273 | return new DefaultLinkDescription(src, dst, Link.Type.DIRECT, false); |
| 274 | } |
| 275 | |
| 276 | private void addOrDeletePseudoNode(boolean isAddLink, boolean localPseduo, boolean remotePseduo, |
| 277 | BgpNodeLSNlriVer4 srcNodeNlri, BgpNodeLSNlriVer4 dstNodeNlri, DeviceId srcId, DeviceId dstId, |
| 278 | PathAttrNlriDetails details) { |
| 279 | if (isAddLink) { |
| 280 | if (localPseduo) { |
| 281 | if (deviceService.getDevice(srcId) == null) { |
| 282 | for (BgpNodeListener l : controller.listener()) { |
| 283 | l.addNode(srcNodeNlri, details); |
| 284 | } |
| 285 | } |
| 286 | } else if (remotePseduo) { |
| 287 | if (deviceService.getDevice(dstId) == null) { |
| 288 | for (BgpNodeListener l : controller.listener()) { |
| 289 | l.addNode(dstNodeNlri, details); |
| 290 | } |
| 291 | } |
| 292 | } |
| 293 | } else { |
| 294 | if (localPseduo) { |
| 295 | Set<Link> links = linkService.getDeviceLinks(srcId); |
| 296 | if (links == null || links.isEmpty()) { |
| 297 | for (BgpNodeListener l : controller.listener()) { |
| 298 | l.deleteNode(srcNodeNlri); |
| 299 | } |
| 300 | } |
| 301 | } else if (remotePseduo) { |
| 302 | log.info("Remote pseudo delete link "); |
| 303 | Set<Link> links = linkService.getDeviceLinks(dstId); |
| 304 | if (links == null || links.isEmpty()) { |
| 305 | for (BgpNodeListener l : controller.listener()) { |
| 306 | l.deleteNode(dstNodeNlri); |
| 307 | } |
| 308 | } |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | @Override |
| 314 | public void deleteLink(BgpLinkLsNlriVer4 linkNlri) throws BgpParseException { |
| 315 | log.debug("Delete link {}", linkNlri.toString()); |
| 316 | |
| 317 | if (linkProviderService == null) { |
| 318 | return; |
| 319 | } |
| 320 | |
| 321 | LinkDescription linkDes = buildLinkDes(linkNlri, null, false); |
| 322 | linkProviderService.linkVanished(linkDes); |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 323 | } |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 324 | } |
| 325 | |
| 326 | @Override |
| 327 | public void triggerProbe(DeviceId deviceId) { |
| 328 | // TODO Auto-generated method stub |
| 329 | } |
| 330 | |
| 331 | @Override |
| 332 | public void roleChanged(DeviceId deviceId, MastershipRole newRole) { |
| 333 | } |
| 334 | |
| 335 | @Override |
| 336 | public boolean isReachable(DeviceId deviceId) { |
| 337 | // TODO Auto-generated method stub |
| 338 | return true; |
| 339 | } |
Saurav Das | a2d3750 | 2016-03-25 17:50:40 -0700 | [diff] [blame] | 340 | |
| 341 | @Override |
| 342 | public void changePortState(DeviceId deviceId, PortNumber portNumber, |
| 343 | boolean enable) { |
| 344 | } |
Shashikanth VH | 1ca26ce | 2015-11-20 23:19:49 +0530 | [diff] [blame] | 345 | } |