From 5bbd9feb84660d06fe635a0cd4cbdf45b110665c Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Tue, 25 Sep 2018 11:21:09 +0200 Subject: Fix bugs after bumping to Fluorine ODL dependencies (HONEYCOMB-433) Change-Id: I99b630f97144770849679a04efccaf7fc9868cb6 Signed-off-by: Michal Cmarada --- .../lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java | 4 ++-- .../java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java | 2 +- .../java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java | 2 +- .../java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java | 2 +- .../java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java | 2 +- .../java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java | 2 +- .../java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java | 4 ++-- .../io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java | 4 ++-- .../java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java | 2 +- .../io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java | 2 +- .../gpe/translate/read/NativeForwardPathsTableCustomizerTest.java | 2 +- .../io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java | 4 ++-- .../io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java | 2 +- .../io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java | 2 +- .../io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) (limited to 'lisp/lisp2vpp') diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java index 07bc32f4a..a1d6e11c4 100644 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java @@ -90,7 +90,7 @@ public class NativeForwardPathsTableCustomizer extends FutureJVppCustomizer impl cfgKey = InstanceIdentifier.create(NativeForwardPathsTables.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.gpe.rev170801._native.forward.paths.tables.NativeForwardPathsTable.class, new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.gpe.rev170801._native.forward.paths.tables.NativeForwardPathsTableKey( - cfgValue.getKey())); + cfgValue.key())); return Initialized.create(cfgKey, cfgValue); } @@ -136,7 +136,7 @@ public class NativeForwardPathsTableCustomizer extends FutureJVppCustomizer impl if (optionalTable.isPresent()) { final long existingTableId = optionalTable.getAsLong(); builder.setTableId(existingTableId); - builder.setKey(new NativeForwardPathsTableKey(existingTableId)); + builder.withKey(new NativeForwardPathsTableKey(existingTableId)); } } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java index ffedde965..4e0965c88 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java @@ -143,7 +143,7 @@ public class AdjacencyCustomizer extends FutureJVppCustomizer .collect(RWUtils.singleItemCollector()); builder.setId(currentAdjacencyId) - .setKey(new AdjacencyKey(currentAdjacencyId)) + .withKey(new AdjacencyKey(currentAdjacencyId)) .setLocalEid(getArrayAsLocalEid( MappingsDumpParams.EidType.valueOf(currentAdjacency.eidType), currentAdjacency.leid, currentAdjacency.leidPrefixLen, vni)) diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java index bb960fe92..7aa1c08bd 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java @@ -119,7 +119,7 @@ public class InterfaceCustomizer builder.setPriority((short) Byte.toUnsignedInt(details.priority)); builder.setWeight((short) Byte.toUnsignedInt(details.weight)); builder.setInterfaceRef(interfaceRef); - builder.setKey(new InterfaceKey(interfaceRef)); + builder.withKey(new InterfaceKey(interfaceRef)); } @Override diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java index 7d49a8d30..0ced83fa3 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java @@ -133,7 +133,7 @@ public class LocalMappingCustomizer checkState(locatorSetContext.containsName(details.locatorSetIndex, ctx.getMappingContext()), "No Locator Set name found for index %s", details.locatorSetIndex); builder.setLocatorSet(locatorSetContext.getName(details.locatorSetIndex, ctx.getMappingContext())); - builder.setKey(new LocalMappingKey(new MappingId(id.firstKeyOf(LocalMapping.class).getId()))); + builder.withKey(new LocalMappingKey(new MappingId(id.firstKeyOf(LocalMapping.class).getId()))); builder.setEid(getArrayAsEidLocal(valueOf(details.eidType), details.eid, details.eidPrefixLen, details.vni)); if (details.key != null) { diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java index 654360801..6a3782415 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java @@ -94,7 +94,7 @@ public class LocatorSetCustomizer extends CheckedLispCustomizer final String name = toString(details.get().lsName); builder.setName(name); - builder.setKey(new LocatorSetKey(name)); + builder.withKey(new LocatorSetKey(name)); } else { LOG.warn("Locator Set {} not found in dump", id); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java index 4427f6b3a..905f91186 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java @@ -96,7 +96,7 @@ public class MapResolverCustomizer extends CheckedLispCustomizer arrayToIpAddress(byteToBoolean(a.isIpv6), a.ipAddress))) .collect(RWUtils.singleItemCollector()); - builder.setKey(key); + builder.withKey(key); builder.setIpAddress( arrayToIpAddress(byteToBoolean(mapResolverDetails.isIpv6), mapResolverDetails.ipAddress)); } diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java index 043f02f35..f372de068 100644 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java @@ -131,8 +131,8 @@ public class MapServerCustomizer extends CheckedLispCustomizer final IpAddress currentAddress = instanceIdentifier.firstKeyOf(MapServer.class).getIpAddress(); final OneMapServerDetails currentDetail = dump.get().oneMapServerDetails.stream() - .filter(detail -> Arrays.equals(currentAddress.getValue(), - arrayToIpAddress(byteToBoolean(detail.isIpv6), detail.ipAddress).getValue())) + .filter(detail -> currentAddress.stringValue().equalsIgnoreCase( + arrayToIpAddress(byteToBoolean(detail.isIpv6), detail.ipAddress).stringValue())) .collect(RWUtils.singleItemCollector()); mapServerBuilder diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java index 90d4e0ebb..4f731d898 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java @@ -176,7 +176,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer RWUtils.singleItemCollector()); builder.setEid(getArrayAsEidRemote(valueOf(details.eidType), details.eid, details.eidPrefixLen, details.vni)); - builder.setKey(new RemoteMappingKey(new MappingId(id.firstKeyOf(RemoteMapping.class).getId()))); + builder.withKey(new RemoteMappingKey(new MappingId(id.firstKeyOf(RemoteMapping.class).getId()))); builder.setTtl(resolveTtl(details.ttl)); builder.setAuthoritative( new RemoteMapping.Authoritative(byteToBoolean(details.authoritative))); @@ -279,7 +279,7 @@ public class RemoteMappingCustomizer extends FutureJVppCustomizer final IpAddress address = arrayToIpAddress(byteToBoolean(details.isIpv6), details.ipAddress); return new LocatorBuilder() .setAddress(address) - .setKey(new LocatorKey(address)) + .withKey(new LocatorKey(address)) .setPriority((short) details.priority) .setWeight((short) details.weight) .build(); diff --git a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java index 4f497c350..ba3fe948a 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java @@ -135,7 +135,7 @@ public class VniTableCustomizer extends CheckedLispCustomizer .collect(RWUtils.singleItemCollector()); builder.setVirtualNetworkIdentifier((long) details.vni); - builder.setKey(new VniTableKey(Long.valueOf(details.vni))); + builder.withKey(new VniTableKey(Long.valueOf(details.vni))); } @Nonnull diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java index e1bbaad22..34892a3d8 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java @@ -147,7 +147,7 @@ public class AdjacenciesMappingContextTest implements InjectablesProcessor { assertEquals(PARENT_4, key.getKey().getId()); assertEquals(PARENT_4, mapping.getId()); - assertEquals(PARENT_4, mapping.getKey().getId()); + assertEquals(PARENT_4, mapping.key().getId()); final EidIdentificatorPair pair = mapping.getEidIdentificatorPair(); assertEquals(LOCAL_EID_ID_1, pair.getLocalEidId().getValue()); diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizerTest.java index 58e417661..bc55954f7 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizerTest.java @@ -79,7 +79,7 @@ public class NativeForwardPathsTableCustomizerTest extends getCustomizer().readCurrentAttributes(validId, builder, ctx); final long lTableId = TABLE_0_IDX; assertEquals(lTableId, builder.getTableId().intValue()); - assertEquals(lTableId, builder.getKey().getTableId().intValue()); + assertEquals(lTableId, builder.key().getTableId().intValue()); } private IpFibDetailsReplyDump getReplyV4() { diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java index 2135a469b..b36a7d78d 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java @@ -123,7 +123,7 @@ public class AdjacencyCustomizerTest getCustomizer().readCurrentAttributes(identifier, builder, ctx); assertEquals("adj-one", builder.getId()); - assertEquals(new AdjacencyKey("adj-one"), builder.getKey()); + assertEquals(new AdjacencyKey("adj-one"), builder.key()); assertEquals(ADDRESS_ONE.getValue(), Ipv4.class.cast(builder.getLocalEid().getAddress()).getIpv4().getValue()); assertEquals(ADDRESS_THREE.getValue(), Ipv4.class.cast(builder.getRemoteEid().getAddress()).getIpv4().getValue()); @@ -137,7 +137,7 @@ public class AdjacencyCustomizerTest getCustomizer().readCurrentAttributes(identifier, builder, ctx); assertEquals("adj-one", builder.getId()); - assertEquals(new AdjacencyKey("adj-one"), builder.getKey()); + assertEquals(new AdjacencyKey("adj-one"), builder.key()); assertEquals(NORMALIZED_PREFIX_ONE, Ipv4Prefix.class.cast(builder.getLocalEid().getAddress()).getIpv4Prefix().getValue()); assertEquals(NORMALIZED_PREFIX_THREE, diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java index 77b6100c4..0a196277f 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java @@ -106,7 +106,7 @@ public class InterfaceCustomizerTest final Interface iface = builder.build(); assertEquals("interface-1", iface.getInterfaceRef()); - assertEquals("interface-1", iface.getKey().getInterfaceRef()); + assertEquals("interface-1", iface.key().getInterfaceRef()); } diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java index 0326c7f2b..060f03418 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java @@ -89,7 +89,7 @@ public class LocatorSetCustomizerTest assertNotNull(builder); assertEquals("loc-set", builder.getName()); - assertEquals("loc-set", builder.getKey().getName()); + assertEquals("loc-set", builder.key().getName()); } @Test diff --git a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java index 511cad526..fded74606 100644 --- a/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java +++ b/lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java @@ -79,7 +79,7 @@ public class MapResolverCustomizerTest final MapResolverKey key = keys.get(0); assertNotNull(key); - assertEquals("1.2.168.192", new String(key.getIpAddress().getValue())); + assertEquals("1.2.168.192", key.getIpAddress().stringValue()); } -- cgit 1.2.3-korg