summaryrefslogtreecommitdiffstats
path: root/v3po/impl
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/impl')
-rw-r--r--v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poApiRequest.java9
-rw-r--r--v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppPollOperDataImpl.java8
2 files changed, 11 insertions, 6 deletions
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poApiRequest.java b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poApiRequest.java
index 7f614413b..5de4cfdf5 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poApiRequest.java
+++ b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/V3poApiRequest.java
@@ -16,12 +16,14 @@
package io.fd.honeycomb.v3po.impl;
+import com.google.common.base.Preconditions;
import com.google.common.net.InetAddresses;
import com.google.common.primitives.Ints;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
import java.math.BigInteger;
import java.net.InetAddress;
+import javax.annotation.Nonnull;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -173,7 +175,7 @@ public class V3poApiRequest {
}
private Interface buildStateInterface(final int ifIndex,
- final String interfaceName,
+ @Nonnull final String interfaceName,
final int supIfIndex,
final byte[] physAddr,
final byte adminUp, final byte linkUp,
@@ -189,6 +191,7 @@ public class V3poApiRequest {
final int vtrOp, final int vtrPushDot1q,
final int vtrTag1, final int vtrTag2,
final Statistics stats) {
+ Preconditions.checkNotNull(interfaceName, "interfaceName should not be null");
InterfaceBuilder ifBuilder = new InterfaceBuilder();
Class<? extends InterfaceType> ifType;
@@ -232,10 +235,10 @@ public class V3poApiRequest {
if (bd != null) {
bdName = bd.name;
for (vppBridgeDomainInterfaceDetails bdIf : bd.interfaces) {
- if (bdIf.interfaceName != interfaceName) {
+ if (!interfaceName.equals(bdIf.interfaceName)) {
continue;
}
- if (bd.bviInterfaceName == interfaceName) {
+ if (interfaceName.equals(bd.bviInterfaceName)) {
bvi = true;
}
splitHorizonGroup = bdIf.splitHorizonGroup;
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppPollOperDataImpl.java b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppPollOperDataImpl.java
index 64223aaad..e5cb13f81 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppPollOperDataImpl.java
+++ b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/VppPollOperDataImpl.java
@@ -96,9 +96,11 @@ public class VppPollOperDataImpl implements V3poService {
bd.arpTerm, bd.forward, bd.learn);
for (vppBridgeDomainInterfaceDetails bdIf : bd.interfaces) {
- bdBuilder.addInterface(bdIf.interfaceName,
- bd.bviInterfaceName == bdIf.interfaceName,
- bdIf.splitHorizonGroup);
+ if (bdIf.interfaceName != null) {
+ bdBuilder.addInterface(bdIf.interfaceName,
+ bdIf.interfaceName.equals(bd.bviInterfaceName),
+ bdIf.splitHorizonGroup);
+ }
}
vppL2Fib[] bdFibs = l2fibByBdId.get(bdId);