List<PhysAddress> result = new ArrayList<>();
for (String interfaceName : lstElanInterfaceNames) {
ElanInterfaceMac elanInterfaceMac = ElanUtils.getElanInterfaceMacByInterfaceName(broker, interfaceName);
- if (elanInterfaceMac != null && elanInterfaceMac.getMacEntry() != null) {
- for (MacEntry macEntry : new ArrayList<>(elanInterfaceMac.getMacEntry().values())) {
+ if (elanInterfaceMac != null && elanInterfaceMac.nonnullMacEntry() != null) {
+ for (MacEntry macEntry : new ArrayList<>(elanInterfaceMac.nonnullMacEntry().values())) {
result.add(macEntry.getMacAddress());
}
}
if (configNode != null && configNode.isPresent()) {
HwvtepGlobalAugmentation augmentation = configNode.get().augmentation(
HwvtepGlobalAugmentation.class);
- if (augmentation != null && augmentation.getLocalUcastMacs() != null) {
+ if (augmentation != null && augmentation.nonnullLocalUcastMacs() != null) {
macs.addAll(new ArrayList<>(augmentation
- .getLocalUcastMacs().values()).stream()
+ .nonnullLocalUcastMacs().values()).stream()
.filter(mac -> getLogicalSwitchName(mac).equals(elanName))
.map(HwvtepMacTableGenericAttributes::getMacEntryKey)
.collect(Collectors.toSet()));
if (hwvtepNode != null) {
Map<RemoteUcastMacsKey, RemoteUcastMacs> keyRemoteUcastMacsMap
= hwvtepNode.augmentation(HwvtepGlobalAugmentation.class)
- .getRemoteUcastMacs();
+ .nonnullRemoteUcastMacs();
if (keyRemoteUcastMacsMap != null && !keyRemoteUcastMacsMap.isEmpty()) {
// Filtering keyRemoteUcastMacsMap based on the logical switch and
// forming a list of MacAddress
return lstRemoteUcastMacs;
}
- for (MacEntry macEntry : new ArrayList<>(macTable.getMacEntry().values())) {
+ for (MacEntry macEntry : new ArrayList<>(macTable.nonnullMacEntry().values())) {
Uint64 dpnId = getDpidFromInterface(macEntry.getInterface());
if (dpnId == null) {
LOG.error("DPN ID not found for interface {}", macEntry.getInterface());
return txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
for (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712
.l2gateway.attributes.devices.Interfaces deviceInterface : new ArrayList<>(hwVtepDevice
- .getInterfaces().values())) {
+ .nonnullInterfaces().values())) {
//Removed the check for checking terminationPoint present in OP or not
//for coniguring vlan bindings
//As we are not any more dependent on it , plugin takes care of this
return txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
for (org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712
.l2gateway.attributes.devices.Interfaces deviceInterface : new ArrayList<>(hwVtepDevice
- .getInterfaces().values())) {
+ .nonnullInterfaces().values())) {
String phyPortName = deviceInterface.getInterfaceName();
if (deviceInterface.getSegmentationIds() != null && !deviceInterface.getSegmentationIds().isEmpty()) {
for (Integer vlanId : deviceInterface.getSegmentationIds()) {
String psNodeId = globalNodeId + HwvtepHAUtil.PHYSICALSWITCH + psName;
tzonesoptional.get().nonnullTransportZone().stream()
.filter(zone -> zone.getDeviceVteps() != null)
- .flatMap(zone -> new ArrayList<>(zone.getDeviceVteps().values()).stream())
+ .flatMap(zone -> new ArrayList<>(zone.nonnullDeviceVteps().values()).stream())
.filter(deviceVteps -> Objects.equals(getPsName(deviceVteps), psName)) //get device with same ps name
.filter(deviceVteps -> !Objects.equals(psNodeId, deviceVteps.getNodeId())
|| !Objects.equals(tunnelIp, deviceVteps.getIpAddress()))//node id or tunnel ip is changed
if (configNode.isPresent()) {
HwvtepGlobalAugmentation augmentation = configNode.get().augmentation(HwvtepGlobalAugmentation.class);
if (augmentation != null && augmentation.getLocalUcastMacs() != null) {
- macs.addAll(augmentation.getLocalUcastMacs().values().stream()
+ macs.addAll(augmentation.nonnullLocalUcastMacs().values().stream()
.filter(mac -> getLogicalSwitchName(mac).equals(elanName))
.map(HwvtepMacTableGenericAttributes::getMacEntryKey)
.collect(Collectors.toSet()));