use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.sync.optimizations.config.rev171025.PcepNodeSyncConfig in project bgpcep by opendaylight.
the class PCEPTopologyProviderUtil method contructSpeakersId.
static SpeakerIdMapping contructSpeakersId(final Topology topology) {
final SpeakerIdMapping ret = SpeakerIdMapping.getSpeakerIdMap();
topology.getNode().stream().filter(Objects::nonNull).filter(node -> node.getAugmentation(PcepNodeConfig.class) != null).filter(node -> node.getAugmentation(PcepNodeConfig.class).getSessionConfig() != null).filter(node -> node.getAugmentation(PcepNodeConfig.class).getSessionConfig().getAugmentation(PcepNodeSyncConfig.class) != null).forEach(node -> {
final PcepNodeConfig config = node.getAugmentation(PcepNodeConfig.class);
final PcepNodeSyncConfig nodeSyncConfig = config.getSessionConfig().getAugmentation(PcepNodeSyncConfig.class);
final InetAddress address = InetAddresses.forString(node.getNodeId().getValue());
ret.put(address, nodeSyncConfig.getSpeakerEntityIdValue());
});
return ret;
}
Aggregations