Java Code Examples for org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology#getNode()
The following examples show how to use
org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology#getNode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PCEPTopologyProviderUtil.java From bgpcep with Eclipse Public License 1.0 | 6 votes |
static KeyMapping contructKeys(final @NonNull Topology topology) { final KeyMapping ret = KeyMapping.getKeyMapping(); if (topology.getNode() == null) { return ret; } topology.nonnullNode().values().stream() .filter(Objects::nonNull) .filter(node -> node.augmentation(PcepNodeConfig.class) != null) .filter(node -> node.augmentation(PcepNodeConfig.class).getSessionConfig() != null) .filter(node -> node.augmentation(PcepNodeConfig.class) .getSessionConfig().getPassword() != null) .filter(node -> !node.augmentation(PcepNodeConfig.class) .getSessionConfig().getPassword().getValue().isEmpty()) .forEach(node -> { final PcepNodeConfig config = node.augmentation(PcepNodeConfig.class); final Rfc2385Key rfc2385KeyPassword = config.getSessionConfig().getPassword(); final InetAddress address = InetAddresses.forString(node.getNodeId().getValue()); ret.put(address, rfc2385KeyPassword.getValue().getBytes(StandardCharsets.US_ASCII)); }); return ret; }
Example 2
Source File: PCEPTopologyProviderUtil.java From bgpcep with Eclipse Public License 1.0 | 6 votes |
static SpeakerIdMapping contructSpeakersId(final Topology topology) { final SpeakerIdMapping ret = SpeakerIdMapping.getSpeakerIdMap(); if (topology.getNode() == null) { return ret; } topology.nonnullNode().values().stream() .filter(Objects::nonNull) .filter(node -> node.augmentation(PcepNodeConfig.class) != null) .filter(node -> node.augmentation(PcepNodeConfig.class).getSessionConfig() != null) .filter(node -> node.augmentation(PcepNodeConfig.class).getSessionConfig() .augmentation(PcepNodeSyncConfig.class) != null) .forEach(node -> { final PcepNodeConfig config = node.augmentation(PcepNodeConfig.class); final PcepNodeSyncConfig nodeSyncConfig = config.getSessionConfig() .augmentation(PcepNodeSyncConfig.class); final InetAddress address = InetAddresses.forString(node.getNodeId().getValue()); ret.put(address, nodeSyncConfig.getSpeakerEntityIdValue()); }); return ret; }
Example 3
Source File: SouthboundUtils.java From ovsdb with Eclipse Public License 1.0 | 5 votes |
/** * Get all OVSDB nodes from topology. * @return a list of nodes or null if the topology could not found */ public Map<NodeKey, Node> getOvsdbNodes() { InstanceIdentifier<Topology> inst = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class, new TopologyKey(OVSDB_TOPOLOGY_ID)); Topology topology = provider.read(LogicalDatastoreType.OPERATIONAL, inst); return topology != null ? topology.getNode() : null; }