andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.netconf.ctl; |
| 18 | |
| 19 | import org.apache.felix.scr.annotations.Activate; |
| 20 | import org.apache.felix.scr.annotations.Component; |
| 21 | import org.apache.felix.scr.annotations.Deactivate; |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 22 | import org.apache.felix.scr.annotations.Modified; |
| 23 | import org.apache.felix.scr.annotations.Property; |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 24 | import org.apache.felix.scr.annotations.Reference; |
| 25 | import org.apache.felix.scr.annotations.ReferenceCardinality; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 26 | import org.apache.felix.scr.annotations.Service; |
| 27 | import org.onlab.packet.IpAddress; |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 28 | import org.onosproject.cfg.ComponentConfigService; |
Himanshu Ranjan | 7c2ee3c | 2017-02-13 05:10:08 -0600 | [diff] [blame^] | 29 | import org.onosproject.net.AnnotationKeys; |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 30 | import org.onosproject.net.Device; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 31 | import org.onosproject.net.DeviceId; |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 32 | import org.onosproject.net.device.DeviceService; |
Himanshu Ranjan | 7c2ee3c | 2017-02-13 05:10:08 -0600 | [diff] [blame^] | 33 | import org.onosproject.net.key.DeviceKey; |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 34 | import org.onosproject.net.key.DeviceKeyId; |
| 35 | import org.onosproject.net.key.DeviceKeyService; |
| 36 | import org.onosproject.net.key.UsernamePassword; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 37 | import org.onosproject.netconf.NetconfController; |
| 38 | import org.onosproject.netconf.NetconfDevice; |
Andrea Campanella | 950310c | 2016-02-12 18:14:38 -0800 | [diff] [blame] | 39 | import org.onosproject.netconf.NetconfDeviceFactory; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 40 | import org.onosproject.netconf.NetconfDeviceInfo; |
| 41 | import org.onosproject.netconf.NetconfDeviceListener; |
Andrea Campanella | 2464dc3 | 2016-02-17 17:54:53 -0800 | [diff] [blame] | 42 | import org.onosproject.netconf.NetconfDeviceOutputEvent; |
| 43 | import org.onosproject.netconf.NetconfDeviceOutputEventListener; |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 44 | import org.onosproject.netconf.NetconfException; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 45 | import org.osgi.service.component.ComponentContext; |
| 46 | import org.slf4j.Logger; |
| 47 | import org.slf4j.LoggerFactory; |
| 48 | |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 49 | import java.util.Arrays; |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 50 | import java.util.Dictionary; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 51 | import java.util.Map; |
| 52 | import java.util.Set; |
| 53 | import java.util.concurrent.ConcurrentHashMap; |
| 54 | import java.util.concurrent.CopyOnWriteArraySet; |
| 55 | |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 56 | import static com.google.common.base.Strings.isNullOrEmpty; |
| 57 | import static org.onlab.util.Tools.get; |
| 58 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 59 | /** |
| 60 | * The implementation of NetconfController. |
| 61 | */ |
| 62 | @Component(immediate = true) |
| 63 | @Service |
| 64 | public class NetconfControllerImpl implements NetconfController { |
Sean Condon | 334ad69 | 2016-12-13 17:56:56 +0000 | [diff] [blame] | 65 | private static final int DEFAULT_CONNECT_TIMEOUT_SECONDS = 5; |
| 66 | private static final String PROP_NETCONF_CONNECT_TIMEOUT = "netconfConnectTimeout"; |
| 67 | @Property(name = PROP_NETCONF_CONNECT_TIMEOUT, intValue = DEFAULT_CONNECT_TIMEOUT_SECONDS, |
| 68 | label = "Time (in seconds) to wait for a NETCONF connect.") |
| 69 | protected static int netconfConnectTimeout = DEFAULT_CONNECT_TIMEOUT_SECONDS; |
| 70 | |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 71 | private static final String PROP_NETCONF_REPLY_TIMEOUT = "netconfReplyTimeout"; |
| 72 | private static final int DEFAULT_REPLY_TIMEOUT_SECONDS = 5; |
| 73 | @Property(name = PROP_NETCONF_REPLY_TIMEOUT, intValue = DEFAULT_REPLY_TIMEOUT_SECONDS, |
| 74 | label = "Time (in seconds) waiting for a NetConf reply") |
| 75 | protected static int netconfReplyTimeout = DEFAULT_REPLY_TIMEOUT_SECONDS; |
| 76 | |
| 77 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
| 78 | protected ComponentConfigService cfgService; |
| 79 | |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 80 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
| 81 | protected DeviceService deviceService; |
| 82 | |
| 83 | @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) |
| 84 | protected DeviceKeyService deviceKeyService; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 85 | |
| 86 | public static final Logger log = LoggerFactory |
| 87 | .getLogger(NetconfControllerImpl.class); |
| 88 | |
Andrea Campanella | 8b1cb67 | 2016-01-25 13:58:58 -0800 | [diff] [blame] | 89 | private Map<DeviceId, NetconfDevice> netconfDeviceMap = new ConcurrentHashMap<>(); |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 90 | |
Andrea Campanella | 2464dc3 | 2016-02-17 17:54:53 -0800 | [diff] [blame] | 91 | private final NetconfDeviceOutputEventListener downListener = new DeviceDownEventListener(); |
| 92 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 93 | protected Set<NetconfDeviceListener> netconfDeviceListeners = new CopyOnWriteArraySet<>(); |
Andrea Campanella | 950310c | 2016-02-12 18:14:38 -0800 | [diff] [blame] | 94 | protected NetconfDeviceFactory deviceFactory = new DefaultNetconfDeviceFactory(); |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 95 | |
| 96 | @Activate |
| 97 | public void activate(ComponentContext context) { |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 98 | cfgService.registerProperties(getClass()); |
| 99 | modified(context); |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 100 | log.info("Started"); |
| 101 | } |
| 102 | |
| 103 | @Deactivate |
| 104 | public void deactivate() { |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 105 | cfgService.unregisterProperties(getClass(), false); |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 106 | netconfDeviceMap.clear(); |
| 107 | log.info("Stopped"); |
| 108 | } |
| 109 | |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 110 | @Modified |
| 111 | public void modified(ComponentContext context) { |
| 112 | if (context == null) { |
| 113 | netconfReplyTimeout = DEFAULT_REPLY_TIMEOUT_SECONDS; |
Sean Condon | 334ad69 | 2016-12-13 17:56:56 +0000 | [diff] [blame] | 114 | netconfConnectTimeout = DEFAULT_CONNECT_TIMEOUT_SECONDS; |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 115 | log.info("No component configuration"); |
| 116 | return; |
| 117 | } |
| 118 | |
| 119 | Dictionary<?, ?> properties = context.getProperties(); |
| 120 | |
| 121 | int newNetconfReplyTimeout; |
Sean Condon | 334ad69 | 2016-12-13 17:56:56 +0000 | [diff] [blame] | 122 | int newNetconfConnectTimeout; |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 123 | try { |
| 124 | String s = get(properties, PROP_NETCONF_REPLY_TIMEOUT); |
| 125 | newNetconfReplyTimeout = isNullOrEmpty(s) ? |
| 126 | netconfReplyTimeout : Integer.parseInt(s.trim()); |
Sean Condon | 334ad69 | 2016-12-13 17:56:56 +0000 | [diff] [blame] | 127 | |
| 128 | s = get(properties, PROP_NETCONF_CONNECT_TIMEOUT); |
| 129 | newNetconfConnectTimeout = isNullOrEmpty(s) ? |
| 130 | netconfConnectTimeout : Integer.parseInt(s.trim()); |
| 131 | |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 132 | } catch (NumberFormatException e) { |
| 133 | log.warn("Component configuration had invalid value", e); |
| 134 | return; |
| 135 | } |
| 136 | |
Sean Condon | 334ad69 | 2016-12-13 17:56:56 +0000 | [diff] [blame] | 137 | if (newNetconfConnectTimeout < 0) { |
| 138 | log.warn("netconfConnectTimeout is invalid - less than 0"); |
| 139 | return; |
| 140 | } else if (newNetconfReplyTimeout <= 0) { |
| 141 | log.warn("netconfReplyTimeout is invalid - 0 or less."); |
| 142 | return; |
| 143 | } |
| 144 | |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 145 | netconfReplyTimeout = newNetconfReplyTimeout; |
Sean Condon | 334ad69 | 2016-12-13 17:56:56 +0000 | [diff] [blame] | 146 | netconfConnectTimeout = newNetconfConnectTimeout; |
| 147 | log.info("Settings: {} = {}, {} = {}", |
| 148 | PROP_NETCONF_REPLY_TIMEOUT, netconfReplyTimeout, PROP_NETCONF_CONNECT_TIMEOUT, netconfConnectTimeout); |
Andreas Papazois | 4752cfa | 2016-04-25 14:52:12 +0300 | [diff] [blame] | 149 | } |
| 150 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 151 | @Override |
| 152 | public void addDeviceListener(NetconfDeviceListener listener) { |
| 153 | if (!netconfDeviceListeners.contains(listener)) { |
| 154 | netconfDeviceListeners.add(listener); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | @Override |
| 159 | public void removeDeviceListener(NetconfDeviceListener listener) { |
| 160 | netconfDeviceListeners.remove(listener); |
| 161 | } |
| 162 | |
| 163 | @Override |
| 164 | public NetconfDevice getNetconfDevice(DeviceId deviceInfo) { |
| 165 | return netconfDeviceMap.get(deviceInfo); |
| 166 | } |
| 167 | |
| 168 | @Override |
| 169 | public NetconfDevice getNetconfDevice(IpAddress ip, int port) { |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 170 | for (DeviceId info : netconfDeviceMap.keySet()) { |
Andrea Campanella | 57efbb2 | 2016-02-11 14:21:41 -0800 | [diff] [blame] | 171 | if (info.uri().getSchemeSpecificPart().equals(ip.toString() + ":" + port)) { |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 172 | return netconfDeviceMap.get(info); |
| 173 | } |
| 174 | } |
Andrea Campanella | 1cd641b | 2015-12-07 17:28:34 -0800 | [diff] [blame] | 175 | return null; |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | @Override |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 179 | public NetconfDevice connectDevice(DeviceId deviceId) throws NetconfException { |
| 180 | if (netconfDeviceMap.containsKey(deviceId)) { |
| 181 | log.debug("Device {} is already present", deviceId); |
| 182 | return netconfDeviceMap.get(deviceId); |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 183 | } else { |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 184 | log.debug("Creating NETCONF device {}", deviceId); |
| 185 | Device device = deviceService.getDevice(deviceId); |
| 186 | String ip; |
| 187 | int port; |
| 188 | if (device != null) { |
| 189 | ip = device.annotations().value("ipaddress"); |
| 190 | port = Integer.parseInt(device.annotations().value("port")); |
| 191 | } else { |
| 192 | String[] info = deviceId.toString().split(":"); |
| 193 | if (info.length == 3) { |
| 194 | ip = info[1]; |
| 195 | port = Integer.parseInt(info[2]); |
| 196 | } else { |
| 197 | ip = Arrays.asList(info).stream().filter(el -> !el.equals(info[0]) |
| 198 | && !el.equals(info[info.length - 1])) |
| 199 | .reduce((t, u) -> t + ":" + u) |
| 200 | .get(); |
| 201 | log.debug("ip v6 {}", ip); |
| 202 | port = Integer.parseInt(info[info.length - 1]); |
| 203 | } |
| 204 | } |
| 205 | try { |
Himanshu Ranjan | 7c2ee3c | 2017-02-13 05:10:08 -0600 | [diff] [blame^] | 206 | DeviceKey deviceKey = deviceKeyService.getDeviceKey( |
| 207 | DeviceKeyId.deviceKeyId(deviceId.toString())); |
| 208 | NetconfDeviceInfo deviceInfo = null; |
| 209 | if (deviceKey.type() == DeviceKey.Type.USERNAME_PASSWORD) { |
| 210 | UsernamePassword usernamepasswd = deviceKey.asUsernamePassword(); |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 211 | |
Himanshu Ranjan | 7c2ee3c | 2017-02-13 05:10:08 -0600 | [diff] [blame^] | 212 | deviceInfo = new NetconfDeviceInfo(usernamepasswd.username(), |
| 213 | usernamepasswd.password(), |
| 214 | IpAddress.valueOf(ip), |
| 215 | port); |
| 216 | |
| 217 | } else if (deviceKey.type() == DeviceKey.Type.SSL_KEY) { |
| 218 | String username = deviceKey.annotations().value(AnnotationKeys.USERNAME); |
| 219 | String password = deviceKey.annotations().value(AnnotationKeys.PASSWORD); |
| 220 | String sshkey = deviceKey.annotations().value(AnnotationKeys.SSHKEY); |
| 221 | |
| 222 | deviceInfo = new NetconfDeviceInfo(username, |
| 223 | password, |
| 224 | IpAddress.valueOf(ip), |
| 225 | port, |
| 226 | sshkey); |
| 227 | } else { |
| 228 | log.error("Unknown device key for device {}", deviceId); |
| 229 | } |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 230 | NetconfDevice netconfDevicedevice = createDevice(deviceInfo); |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 231 | netconfDevicedevice.getSession().addDeviceOutputListener(downListener); |
| 232 | return netconfDevicedevice; |
| 233 | } catch (NullPointerException e) { |
| 234 | throw new NetconfException("No Device Key for device " + deviceId, e); |
| 235 | } |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 236 | } |
| 237 | } |
| 238 | |
| 239 | @Override |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 240 | public void disconnectDevice(DeviceId deviceId, boolean remove) { |
| 241 | if (!netconfDeviceMap.containsKey(deviceId)) { |
| 242 | log.warn("Device {} is not present", deviceId); |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 243 | } else { |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 244 | stopDevice(deviceId, remove); |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 245 | } |
| 246 | } |
| 247 | |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 248 | private void stopDevice(DeviceId deviceId, boolean remove) { |
| 249 | netconfDeviceMap.get(deviceId).disconnect(); |
| 250 | netconfDeviceMap.remove(deviceId); |
| 251 | if (remove) { |
Andrea Campanella | 86294db | 2016-03-07 11:42:49 -0800 | [diff] [blame] | 252 | for (NetconfDeviceListener l : netconfDeviceListeners) { |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 253 | l.deviceRemoved(deviceId); |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | @Override |
| 259 | public void removeDevice(DeviceId deviceId) { |
| 260 | if (!netconfDeviceMap.containsKey(deviceId)) { |
| 261 | log.warn("Device {} is not present", deviceId); |
| 262 | for (NetconfDeviceListener l : netconfDeviceListeners) { |
| 263 | l.deviceRemoved(deviceId); |
| 264 | } |
| 265 | } else { |
| 266 | netconfDeviceMap.remove(deviceId); |
| 267 | for (NetconfDeviceListener l : netconfDeviceListeners) { |
| 268 | l.deviceRemoved(deviceId); |
Andrea Campanella | 86294db | 2016-03-07 11:42:49 -0800 | [diff] [blame] | 269 | } |
| 270 | } |
| 271 | } |
| 272 | |
Andrea Campanella | 101417d | 2015-12-11 17:58:07 -0800 | [diff] [blame] | 273 | private NetconfDevice createDevice(NetconfDeviceInfo deviceInfo) throws NetconfException { |
Andrea Campanella | 950310c | 2016-02-12 18:14:38 -0800 | [diff] [blame] | 274 | NetconfDevice netconfDevice = deviceFactory.createNetconfDevice(deviceInfo); |
Andrea Campanella | 087ceb9 | 2015-12-07 09:58:34 -0800 | [diff] [blame] | 275 | netconfDeviceMap.put(deviceInfo.getDeviceId(), netconfDevice); |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 276 | for (NetconfDeviceListener l : netconfDeviceListeners) { |
| 277 | l.deviceAdded(deviceInfo.getDeviceId()); |
| 278 | } |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 279 | return netconfDevice; |
| 280 | } |
| 281 | |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 282 | |
| 283 | @Override |
| 284 | public Map<DeviceId, NetconfDevice> getDevicesMap() { |
| 285 | return netconfDeviceMap; |
| 286 | } |
Andrea Campanella | 950310c | 2016-02-12 18:14:38 -0800 | [diff] [blame] | 287 | |
Andrea Campanella | 86294db | 2016-03-07 11:42:49 -0800 | [diff] [blame] | 288 | @Override |
| 289 | public Set<DeviceId> getNetconfDevices() { |
| 290 | return netconfDeviceMap.keySet(); |
| 291 | } |
| 292 | |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 293 | |
| 294 | |
Andrea Campanella | 950310c | 2016-02-12 18:14:38 -0800 | [diff] [blame] | 295 | //Device factory for the specific NetconfDeviceImpl |
| 296 | private class DefaultNetconfDeviceFactory implements NetconfDeviceFactory { |
| 297 | |
| 298 | @Override |
| 299 | public NetconfDevice createNetconfDevice(NetconfDeviceInfo netconfDeviceInfo) throws NetconfException { |
| 300 | return new DefaultNetconfDevice(netconfDeviceInfo); |
| 301 | } |
| 302 | } |
Andrea Campanella | 2464dc3 | 2016-02-17 17:54:53 -0800 | [diff] [blame] | 303 | |
| 304 | //Listener for closed session with devices, gets triggered whe devices goes down |
| 305 | // or sends the endpattern ]]>]]> |
| 306 | private class DeviceDownEventListener implements NetconfDeviceOutputEventListener { |
| 307 | |
| 308 | @Override |
| 309 | public void event(NetconfDeviceOutputEvent event) { |
| 310 | if (event.type().equals(NetconfDeviceOutputEvent.Type.DEVICE_UNREGISTERED)) { |
Andrea Campanella | 7e6200a | 2016-03-21 09:48:40 -0700 | [diff] [blame] | 311 | removeDevice(event.getDeviceInfo().getDeviceId()); |
Andrea Campanella | 2464dc3 | 2016-02-17 17:54:53 -0800 | [diff] [blame] | 312 | } |
| 313 | } |
| 314 | |
| 315 | @Override |
| 316 | public boolean isRelevant(NetconfDeviceOutputEvent event) { |
| 317 | return getDevicesMap().containsKey(event.getDeviceInfo().getDeviceId()); |
| 318 | } |
| 319 | } |
andrea | eb70a94 | 2015-10-16 21:34:46 -0700 | [diff] [blame] | 320 | } |