Using nonNull API's in ELAN
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / l2gw / utils / StaleVlanBindingsCleaner.java
index f5a76c9db23a55840e970c37c9a6a15ce68ccd4d..48c7c2ef54d9f94356bbd37d83adf7d9909dfd27 100644 (file)
@@ -159,7 +159,7 @@ public class StaleVlanBindingsCleaner {
 
     private static Map<String, List<InstanceIdentifier<VlanBindings>>> getVlansByLogicalSwitchOnDevice(
             final Node configPsNode) {
-        Map<TerminationPointKey, TerminationPoint> ports = configPsNode.getTerminationPoint();
+        Map<TerminationPointKey, TerminationPoint> ports = configPsNode.nonnullTerminationPoint();
         if (ports == null) {
             return Collections.emptyMap();
         }
@@ -167,7 +167,7 @@ public class StaleVlanBindingsCleaner {
         ports.values().stream()
                 .filter(CONTAINS_VLANBINDINGS)
                 .forEach((port) -> port.augmentation(HwvtepPhysicalPortAugmentation.class)
-                        .getVlanBindings().values()
+                        .nonnullVlanBindings().values()
                         .forEach((binding) -> putVlanBindingVsLogicalSwitch(configPsNode, vlans, port, binding)));
         return vlans;
     }
@@ -211,7 +211,7 @@ public class StaleVlanBindingsCleaner {
             return Collections.emptyList();
         }
         return augmentation
-                .getLogicalSwitches().values()
+                .nonnullLogicalSwitches().values()
                 .stream()
                 .map((ls) -> ls.getHwvtepNodeName().getValue())
                 .collect(Collectors.toList());