+ //allNodes.entrySet().stream().map(entry -> entry);
+ allNodes.entrySet().stream()
+ .filter(entry -> entry.getValue().augmentation(HwvtepGlobalAugmentation.class) != null)
+ .filter(entry ->
+ entry.getValue().augmentation(HwvtepGlobalAugmentation.class).getRemoteMcastMacs() != null)
+ .forEach(entry -> {
+ entry.getValue().augmentation(HwvtepGlobalAugmentation.class).getRemoteMcastMacs().values().stream()
+ .forEach(mac -> {
+ configMcastCache.added(getMacIid(entry.getKey(), mac), mac);
+ });
+ });
+ }
+
+ private InstanceIdentifier<RemoteMcastMacs> getMacIid(InstanceIdentifier<Node> nodeIid, RemoteMcastMacs mac) {
+ return nodeIid.augmentation(HwvtepGlobalAugmentation.class).child(RemoteMcastMacs.class, mac.key());
+ }
+
+ public void loadL2GwConnectionCache(TypedReadTransaction<Configuration> tx) {
+ InstanceIdentifier<L2gatewayConnections> parentIid = InstanceIdentifier
+ .create(Neutron.class)
+ .child(L2gatewayConnections.class);
+ Optional<L2gatewayConnections> optional = Optional.empty();
+ try {
+ optional = tx.read(parentIid).get();
+ } catch (ExecutionException | InterruptedException e) {
+ LOG.error("Exception while reading l2gwconnecton for populating Cache");
+ }
+ if (optional.isPresent() && optional.get().getL2gatewayConnection() != null) {
+ LOG.trace("Found some connections to fill in l2gw connection cache");
+ optional.get().getL2gatewayConnection().values()
+ .forEach(connection -> {
+ add(parentIid.child(L2gatewayConnection.class, connection.key()), connection);
+ });
+ }
+ }
+
+ private void loadL2GwDeviceCache(TypedReadTransaction tx) {
+ allNodes = (Map<InstanceIdentifier<Node>, Node>) readAllConfigNodes(tx)