@Override public boolean updateTunnelInfo(TunnelId tunnelId, ResourceConsumer tunnelConsumerId) { checkNotNull(tunnelId, TUNNEL_ID_NULL); checkNotNull(tunnelConsumerId, TUNNEL_CONSUMER_ID_NULL); if (!tunnelInfoMap.containsKey((tunnelId))) { log.debug("Tunnel info does not exist whose tunnel id is {}.", tunnelId.toString()); return false; } PceccTunnelInfo tunnelInfo = tunnelInfoMap.get(tunnelId).value(); tunnelInfo.tunnelConsumerId(tunnelConsumerId); tunnelInfoMap.put(tunnelId, tunnelInfo); return true; }
@Override public boolean updateTunnelInfo(TunnelId tunnelId, List<LspLocalLabelInfo> lspLocalLabelInfoList) { checkNotNull(tunnelId, TUNNEL_ID_NULL); checkNotNull(lspLocalLabelInfoList, LSP_LOCAL_LABEL_INFO_NULL); if (!tunnelInfoMap.containsKey((tunnelId))) { log.debug("Tunnel info does not exist whose tunnel id is {}.", tunnelId.toString()); return false; } PceccTunnelInfo tunnelInfo = tunnelInfoMap.get(tunnelId).value(); tunnelInfo.lspLocalLabelInfoList(lspLocalLabelInfoList); tunnelInfoMap.put(tunnelId, tunnelInfo); return true; }
private Port getExPort(DeviceId deviceId) { List<Port> ports = deviceService.getPorts(deviceId); Port exPort = null; for (Port port : ports) { String portName = port.annotations().value(AnnotationKeys.PORT_NAME); Versioned<String> exPortVersioned = exPortMap.get(EX_PORT_KEY); if (portName != null && exPortVersioned != null && portName. equals(exPortVersioned.value())) { exPort = port; break; } } return exPort; }
configService.applyConfig(deviceId, BasicDeviceConfig.class, config.node()); Versioned<String> exPortVersioned = exPortMap.get(EX_PORT_KEY); if (exPortVersioned != null) { VtnConfig.applyBridgeConfig(handler, dpid, exPortVersioned.value());