summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/ace/AceConverter.java4
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/acl/AclDataExtractor.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/VppAclValidator.java4
-rw-r--r--acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/read/AclCustomizerTest.java8
-rw-r--r--bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java12
-rw-r--r--bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/IpRouteRequestProducer.java8
-rw-r--r--bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/MplsRouteRequestProducer.java20
-rw-r--r--bgp/bgp-prefix-sid/src/test/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriterTest.java56
-rw-r--r--bgp/inet/bgp_inet_postman_collection.json6
-rw-r--r--bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java16
-rw-r--r--bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java16
-rw-r--r--bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv4WriterTest.java38
-rw-r--r--bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv6WriterTest.java38
-rw-r--r--common/api-parent/pom.xml10
-rw-r--r--dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizerTest.java10
-rw-r--r--ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamPotWriterCustomizerTest.java2
-rw-r--r--ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizerTest.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java2
-rw-r--r--l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizer.java4
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocalMappingCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizer.java2
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/MapServerCustomizer.java4
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/RemoteMappingCustomizer.java4
-rwxr-xr-xlisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/read/VniTableCustomizer.java2
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/context/util/AdjacenciesMappingContextTest.java2
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/gpe/translate/read/NativeForwardPathsTableCustomizerTest.java2
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/AdjacencyCustomizerTest.java4
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/InterfaceCustomizerTest.java2
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/LocatorSetCustomizerTest.java2
-rw-r--r--lisp/lisp2vpp/src/test/java/io/fd/hc2vpp/lisp/translate/read/MapResolverCustomizerTest.java2
-rw-r--r--mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java2
-rw-r--r--mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java2
-rw-r--r--mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java2
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java6
-rw-r--r--nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java2
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java6
-rw-r--r--nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java2
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java4
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java2
-rwxr-xr-xnsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java2
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java2
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java2
-rw-r--r--nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java8
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv4RouteNamesFactory.java4
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java4
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/PrefixCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizer.java2
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java24
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java10
-rw-r--r--routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/TableLookupRequestFactory.java6
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java6
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizerTest.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizerTest.java10
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizerTest.java12
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java4
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java4
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java4
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java8
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizerTest.java4
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java4
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java8
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java2
-rw-r--r--routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java6
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java6
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java2
-rw-r--r--srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java4
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/NamedSegmentCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/PolicyCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/LocatorCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequestTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/InterfaceCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/PrefixCustomizerTest.java2
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java4
-rw-r--r--srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java2
-rw-r--r--v3po/postman_rest_collection.json10
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RewriteCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceCustomizer.java4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java4
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java2
-rw-r--r--v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java2
-rw-r--r--vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java2
-rw-r--r--vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java2
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java2
-rw-r--r--vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java2
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java2
-rw-r--r--vpp-integration/api-docs/core/pom.xml4
-rw-r--r--vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java2
-rw-r--r--vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java11
117 files changed, 305 insertions, 288 deletions
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java
index c1d52b6f8..0ebc938ea 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/AclCustomizer.java
@@ -148,7 +148,7 @@ public class AclCustomizer extends FutureJVppAclCustomizer
public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final AclBuilder builder,
@Nonnull final ReadContext ctx) throws ReadFailedException {
final AclKey key = id.firstKeyOf(Acl.class);
- builder.setKey(key);
+ builder.withKey(key);
final Class<? extends AclBase> aclType = key.getAclType();
final String name = key.getAclName();
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/ace/AceConverter.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/ace/AceConverter.java
index 228fbfc68..db5efb4d6 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/ace/AceConverter.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/ace/AceConverter.java
@@ -119,7 +119,7 @@ public interface AceConverter extends MacIpAceDataExtractor, StandardAceDataExtr
final String aceName = macipAclContext.getAceName(aclName, i++, mappingContext);
ace.setRuleName(aceName);
- ace.setKey(new AceKey(aceName));
+ ace.withKey(new AceKey(aceName));
aces.add(ace.build());
}
@@ -144,7 +144,7 @@ public interface AceConverter extends MacIpAceDataExtractor, StandardAceDataExtr
final String aceName = standardAclContext.getAceName(aclName, i++, mappingContext);
ace.setRuleName(aceName);
- ace.setKey(new AceKey(aceName));
+ ace.withKey(new AceKey(aceName));
aces.add(ace.build());
}
return aces;
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/acl/AclDataExtractor.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/acl/AclDataExtractor.java
index bae699109..5f75ae306 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/acl/AclDataExtractor.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/acl/AclDataExtractor.java
@@ -66,7 +66,7 @@ public interface AclDataExtractor {
* Convert {@link Acl} tag to byte array in US_ASCII
*/
default byte[] getAclTag(@Nonnull final Acl acl) {
- final VppAclAugmentation augmentation = acl.getAugmentation(VppAclAugmentation.class);
+ final VppAclAugmentation augmentation = acl.augmentation(VppAclAugmentation.class);
if (augmentation != null && augmentation.getTag() != null) {
return augmentation.getTag().getBytes(StandardCharsets.US_ASCII);
}
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/VppAclValidator.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/VppAclValidator.java
index e1f4c8dc0..942d3bcb3 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/VppAclValidator.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/VppAclValidator.java
@@ -150,7 +150,7 @@ public final class VppAclValidator implements Validator<Acl>, AclDataExtractor {
if (aclType.equals(VppAcl.class)) {
return interfaces.stream()
- .filter(iface -> ofNullable(iface.getAugmentation(VppAclInterfaceAugmentation.class))
+ .filter(iface -> ofNullable(iface.augmentation(VppAclInterfaceAugmentation.class))
.map(InterfaceAclAttributes::getAcl)
.filter(references ->
checkVppAcls(references.getIngress(), aclName) ||
@@ -158,7 +158,7 @@ public final class VppAclValidator implements Validator<Acl>, AclDataExtractor {
).collect(Collectors.toList());
} else if (aclType.equals(VppMacipAcl.class)) {
return interfaces.stream()
- .filter(iface -> ofNullable(iface.getAugmentation(VppAclInterfaceAugmentation.class))
+ .filter(iface -> ofNullable(iface.augmentation(VppAclInterfaceAugmentation.class))
.map(InterfaceAclAttributes::getAcl)
.map(aclAttr -> aclAttr.getIngress())
.map(VppMacipAclsBaseAttributes::getVppMacipAcl)
diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/read/AclCustomizerTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/read/AclCustomizerTest.java
index 52def55a4..1b4403b2d 100644
--- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/read/AclCustomizerTest.java
+++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/read/AclCustomizerTest.java
@@ -121,11 +121,11 @@ public class AclCustomizerTest extends InitializingListReaderCustomizerTest<Acl,
public void testReadStandardAcl() throws ReadFailedException {
final AclBuilder builder = new AclBuilder();
getCustomizer().readCurrentAttributes(ACL_IID, builder, ctx);
- assertEquals(ACL_IID.getKey(), builder.getKey());
+ assertEquals(ACL_IID.getKey(), builder.key());
final List<Ace> aces = builder.getAccessListEntries().getAce();
assertEquals(1, aces.size());
final Ace ace = aces.get(0);
- assertEquals(ACE_NAME, ace.getKey().getRuleName());
+ assertEquals(ACE_NAME, ace.key().getRuleName());
assertTrue(ace.getActions().getPacketHandling() instanceof Deny);
final VppAceNodes nodes = ((VppAce) (ace.getMatches().getAceType())).getVppAceNodes();
assertEquals(PROTOCOL, ((Other) nodes.getIpProtocol()).getOtherNodes().getProtocol().shortValue());
@@ -136,11 +136,11 @@ public class AclCustomizerTest extends InitializingListReaderCustomizerTest<Acl,
public void testReadMacipAcl() throws ReadFailedException {
final AclBuilder builder = new AclBuilder();
getCustomizer().readCurrentAttributes(MACIP_ACL_IID, builder, ctx);
- assertEquals(MACIP_ACL_IID.getKey(), builder.getKey());
+ assertEquals(MACIP_ACL_IID.getKey(), builder.key());
final List<Ace> aces = builder.getAccessListEntries().getAce();
assertEquals(1, aces.size());
final Ace ace = aces.get(0);
- assertEquals(MACIP_ACE_NAME, ace.getKey().getRuleName());
+ assertEquals(MACIP_ACE_NAME, ace.key().getRuleName());
assertTrue(ace.getActions().getPacketHandling() instanceof Deny);
}
} \ No newline at end of file
diff --git a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java
index f62e03576..4d8039417 100644
--- a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java
+++ b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriter.java
@@ -24,12 +24,12 @@ import io.fd.honeycomb.translate.write.WriteFailedException;
import io.fd.vpp.jvpp.core.dto.MplsRouteAddDel;
import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.LabeledUnicastRoutes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRoute;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.rib.LocRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.LabeledUnicastRoutes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.list.LabeledUnicastRoute;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.BgpRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.Rib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.rib.LocRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/IpRouteRequestProducer.java b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/IpRouteRequestProducer.java
index bd73fa067..bd082ff8b 100644
--- a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/IpRouteRequestProducer.java
+++ b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/IpRouteRequestProducer.java
@@ -28,10 +28,10 @@ import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.LabelStack;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRoute;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.CNextHop;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.list.LabeledUnicastRoute;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.CNextHop;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv4NextHopCase;
interface IpRouteRequestProducer {
/**
diff --git a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/MplsRouteRequestProducer.java b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/MplsRouteRequestProducer.java
index 0d2c8a8c2..3282eea5d 100644
--- a/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/MplsRouteRequestProducer.java
+++ b/bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/MplsRouteRequestProducer.java
@@ -25,16 +25,16 @@ import io.fd.vpp.jvpp.core.types.FibMplsLabel;
import java.util.List;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.LabelIndexTlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.OriginatorSrgbTlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.LabelStack;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRoute;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.originator.srgb.tlv.SrgbValue;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.BgpPrefixSid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.bgp.prefix.sid.BgpPrefixSidTlvs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.BgpPrefixSidTlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.CNextHop;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabelIndexTlv;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.OriginatorSrgbTlv;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.list.LabeledUnicastRoute;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.originator.srgb.tlv.SrgbValue;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.BgpPrefixSid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.bgp.prefix.sid.BgpPrefixSidTlvs;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.BgpPrefixSidTlv;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.CNextHop;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv4NextHopCase;
import org.slf4j.Logger;
interface MplsRouteRequestProducer extends Ipv4Translator {
diff --git a/bgp/bgp-prefix-sid/src/test/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriterTest.java b/bgp/bgp-prefix-sid/src/test/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriterTest.java
index ccf8b462b..8be535adf 100644
--- a/bgp/bgp-prefix-sid/src/test/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriterTest.java
+++ b/bgp/bgp-prefix-sid/src/test/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidMplsWriterTest.java
@@ -44,33 +44,33 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.LabeledUnicastRoutes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.Srgb;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.LabelStackBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRoute;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRouteBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRouteKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.labeled.unicast.route.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.bgp.prefix.sid.tlv.LuOriginatorSrgbTlvBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.originator.srgb.tlv.SrgbValueBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.update.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.bgp.prefix.sid.tlv.LuLabelIndexTlvBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.BgpPrefixSid;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.BgpPrefixSidBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.bgp.prefix.sid.BgpPrefixSidTlvs;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.bgp.prefix.sid.BgpPrefixSidTlvsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.RibId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.RibKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.rib.LocRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.TablesKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHopBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.LabeledUnicastRoutes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.Srgb;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStackBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.list.LabeledUnicastRoute;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.list.LabeledUnicastRouteBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.list.LabeledUnicastRouteKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.routes.list.labeled.unicast.route.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.bgp.prefix.sid.tlv.LuOriginatorSrgbTlvBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.originator.srgb.tlv.SrgbValueBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.update.attributes.bgp.prefix.sid.bgp.prefix.sid.tlvs.bgp.prefix.sid.tlv.LuLabelIndexTlvBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.PathId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.AttributesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.BgpPrefixSid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.BgpPrefixSidBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.bgp.prefix.sid.BgpPrefixSidTlvs;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.bgp.prefix.sid.BgpPrefixSidTlvsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.BgpRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.RibId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.Rib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.RibKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.rib.LocRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv4AddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.UnicastSubsequentAddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv4NextHopCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv4NextHopCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHopBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -105,7 +105,7 @@ public class BgpPrefixSidMplsWriterTest implements FutureProducer, ByteDataTrans
.build();
final IpPrefix prefix = new IpPrefix(new Ipv4Prefix("1.2.3.4/24"));
return new LabeledUnicastRouteBuilder()
- .setKey(new LabeledUnicastRouteKey(pathId, routeKey))
+ .withKey(new LabeledUnicastRouteKey(pathId, routeKey))
.setPathId(pathId)
.setPrefix(prefix)
.setAttributes(new AttributesBuilder()
diff --git a/bgp/inet/bgp_inet_postman_collection.json b/bgp/inet/bgp_inet_postman_collection.json
index a0d845840..03f8fdba9 100644
--- a/bgp/inet/bgp_inet_postman_collection.json
+++ b/bgp/inet/bgp_inet_postman_collection.json
@@ -264,7 +264,7 @@
],
"body": {
"mode": "raw",
- "raw": "<ipv4-route xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp-inet\">\n <path-id>0</path-id>\n <prefix>10.0.0.11/32</prefix>\n <attributes>\n <as-path></as-path>\n <origin>\n <value>igp</value>\n </origin>\n <local-pref>\n <pref>100</pref>\n </local-pref>\n <ipv4-next-hop>\n <global>10.11.1.1</global>\n </ipv4-next-hop>\n </attributes>\n</ipv4-route>"
+ "raw": "<ipv4-route xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp-inet\">\n <route-key>10.0.0.11/32</route-key>\n <path-id>0</path-id>\n <prefix>10.0.0.11/32</prefix>\n <attributes>\n <as-path></as-path>\n <origin>\n <value>igp</value>\n </origin>\n <local-pref>\n <pref>100</pref>\n </local-pref>\n <ipv4-next-hop>\n <global>10.11.1.1</global>\n </ipv4-next-hop>\n </attributes>\n</ipv4-route>"
},
"url": {
"raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0",
@@ -389,7 +389,7 @@
],
"body": {
"mode": "raw",
- "raw": "<ipv4-route xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp-inet\">\n <path-id>0</path-id>\n <prefix>10.0.0.12/32</prefix>\n <attributes>\n <as-path></as-path>\n <origin>\n <value>igp</value>\n </origin>\n <local-pref>\n <pref>100</pref>\n </local-pref>\n <ipv4-next-hop>\n <global>10.11.1.1</global>\n </ipv4-next-hop>\n </attributes>\n</ipv4-route>"
+ "raw": "<ipv4-route xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp-inet\">\n <route-key>10.0.0.12/32</route-key>\n <path-id>0</path-id>\n <prefix>10.0.0.12/32</prefix>\n <attributes>\n <as-path></as-path>\n <origin>\n <value>igp</value>\n </origin>\n <local-pref>\n <pref>100</pref>\n </local-pref>\n <ipv4-next-hop>\n <global>10.11.1.1</global>\n </ipv4-next-hop>\n </attributes>\n</ipv4-route>"
},
"url": {
"raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0",
@@ -474,7 +474,7 @@
],
"body": {
"mode": "raw",
- "raw": "<ipv4-route xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp-inet\">\n <path-id>0</path-id>\n <prefix>10.0.0.12/32</prefix>\n <attributes>\n <as-path></as-path>\n <origin>\n <value>igp</value>\n </origin>\n <local-pref>\n <pref>102</pref>\n </local-pref>\n <ipv4-next-hop>\n <global>10.11.1.1</global>\n </ipv4-next-hop>\n </attributes>\n</ipv4-route>"
+ "raw": "<ipv4-route xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp-inet\">\n <route-key>10.0.0.12/32</route-key>\n <path-id>0</path-id>\n <prefix>10.0.0.12/32</prefix>\n <attributes>\n <as-path></as-path>\n <origin>\n <value>igp</value>\n </origin>\n <local-pref>\n <pref>102</pref>\n </local-pref>\n <ipv4-next-hop>\n <global>10.11.1.1</global>\n </ipv4-next-hop>\n </attributes>\n</ipv4-route>"
},
"url": {
"raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0",
diff --git a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java
index c628d3844..8180763f0 100644
--- a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java
+++ b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv4Writer.java
@@ -28,14 +28,14 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.Ipv4Routes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4Route;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.rib.LocRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.CNextHop;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.routes.Ipv4Routes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.routes.ipv4.routes.Ipv4Route;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.BgpRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.Rib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.rib.LocRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.CNextHop;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv4NextHopCase;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java
index f3712e2f4..6a6f5410a 100644
--- a/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java
+++ b/bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/Ipv6Writer.java
@@ -28,14 +28,14 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore;
import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.Ipv6Routes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.ipv6.routes.Ipv6Route;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.rib.LocRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.CNextHop;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv6.routes.Ipv6Routes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv6.routes.ipv6.routes.Ipv6Route;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.BgpRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.Rib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.rib.LocRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.CNextHop;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv6NextHopCase;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv4WriterTest.java b/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv4WriterTest.java
index 4ac02fce2..889b845ed 100644
--- a/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv4WriterTest.java
+++ b/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv4WriterTest.java
@@ -35,24 +35,24 @@ import org.mockito.Mock;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.Ipv4Routes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4Route;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4RouteBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4RouteKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.RibId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.RibKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.rib.LocRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.TablesKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv4NextHopCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHopBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.routes.Ipv4Routes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.routes.ipv4.routes.Ipv4Route;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.routes.ipv4.routes.Ipv4RouteBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv4.routes.ipv4.routes.Ipv4RouteKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.AttributesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.PathId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.BgpRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.RibId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.Rib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.RibKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.rib.LocRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv4AddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.UnicastSubsequentAddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv4NextHopCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv4NextHopCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHopBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class Ipv4WriterTest implements FutureProducer, ByteDataTranslator {
@@ -74,7 +74,7 @@ public class Ipv4WriterTest implements FutureProducer, ByteDataTranslator {
@SuppressWarnings("unchecked")
private static InstanceIdentifier<Ipv4Route> id(final Ipv4Prefix destination, final PathId pathId) {
return TABLE_ID.child((Class) Ipv4Routes.class)
- .child(Ipv4Route.class, new Ipv4RouteKey(pathId, destination));
+ .child(Ipv4Route.class, new Ipv4RouteKey(pathId, destination.getValue()));
}
private static Ipv4Route route(final Ipv4Prefix destination, final PathId pathId,
diff --git a/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv6WriterTest.java b/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv6WriterTest.java
index 37720dce2..8b2169302 100644
--- a/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv6WriterTest.java
+++ b/bgp/inet/src/test/java/io/fd/hc2vpp/bgp/inet/Ipv6WriterTest.java
@@ -35,24 +35,24 @@ import org.mockito.Mock;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6AddressNoZone;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.Ipv6Routes;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.ipv6.routes.Ipv6Route;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.ipv6.routes.Ipv6RouteBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.ipv6.routes.Ipv6RouteKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.AttributesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.BgpRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.RibId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.Rib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.RibKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.bgp.rib.rib.LocRib;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.Tables;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.TablesKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.UnicastSubsequentAddressFamily;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCase;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCaseBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.ipv6.next.hop._case.Ipv6NextHopBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv6.routes.Ipv6Routes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv6.routes.ipv6.routes.Ipv6Route;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv6.routes.ipv6.routes.Ipv6RouteBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev180329.ipv6.routes.ipv6.routes.Ipv6RouteKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.PathId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.AttributesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.BgpRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.RibId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.Rib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.RibKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.bgp.rib.rib.LocRib;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv6AddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.UnicastSubsequentAddressFamily;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv6NextHopCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.Ipv6NextHopCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.next.hop.c.next.hop.ipv6.next.hop._case.Ipv6NextHopBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class Ipv6WriterTest implements FutureProducer, ByteDataTranslator {
@@ -74,7 +74,7 @@ public class Ipv6WriterTest implements FutureProducer, ByteDataTranslator {
@SuppressWarnings("unchecked")
private static InstanceIdentifier<Ipv6Route> id(final Ipv6Prefix destination, final PathId pathId) {
return TABLE_ID.child((Class) Ipv6Routes.class)
- .child(Ipv6Route.class, new Ipv6RouteKey(pathId, destination));
+ .child(Ipv6Route.class, new Ipv6RouteKey(pathId, destination.getValue()));
}
private static Ipv6Route route(final Ipv6Prefix destination, final PathId pathId,
diff --git a/common/api-parent/pom.xml b/common/api-parent/pom.xml
index ddaef9067..25566ee9e 100644
--- a/common/api-parent/pom.xml
+++ b/common/api-parent/pom.xml
@@ -17,6 +17,10 @@
<version>1.18.10-SNAPSHOT</version>
<packaging>pom</packaging>
+ <properties>
+ <javax.annotations.version>3.0.0</javax.annotations.version>
+ </properties>
+
<build>
<pluginManagement>
<plugins>
@@ -106,5 +110,11 @@
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-common</artifactId>
</dependency>
+ <!-- Generated yang model classes use annotations -->
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>annotations</artifactId>
+ <version>${javax.annotations.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizerTest.java b/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizerTest.java
index 500063d5a..437093815 100644
--- a/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizerTest.java
+++ b/dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/read/DhcpRelayCustomizerTest.java
@@ -107,13 +107,13 @@ public class DhcpRelayCustomizerTest extends InitializingListReaderCustomizerTes
getCustomizer().readCurrentAttributes(IP4_IID, builder, ctx);
assertEquals(IP4_IID.getKey().getAddressFamily(), builder.getAddressFamily());
assertEquals(IP4_IID.getKey().getRxVrfId(), builder.getRxVrfId());
- assertArrayEquals("1.2.3.4".toCharArray(), builder.getGatewayAddress().getValue());
+ assertEquals("1.2.3.4", builder.getGatewayAddress().stringValue());
final List<Server> server = builder.getServer();
assertEquals(2, server.size());
assertEquals(11L, server.get(0).getVrfId().longValue());
- assertArrayEquals("8.8.8.8".toCharArray(), server.get(0).getAddress().getValue());
+ assertEquals("8.8.8.8", server.get(0).getAddress().stringValue());
assertEquals(12L, server.get(1).getVrfId().longValue());
- assertArrayEquals("8.8.8.4".toCharArray(), server.get(1).getAddress().getValue());
+ assertEquals("8.8.8.4", server.get(1).getAddress().stringValue());
}
@Test
@@ -123,8 +123,8 @@ public class DhcpRelayCustomizerTest extends InitializingListReaderCustomizerTes
assertEquals(IP6_IID.getKey().getAddressFamily(), builder.getAddressFamily());
assertEquals(IP6_IID.getKey().getRxVrfId(), builder.getRxVrfId());
assertEquals(22L, builder.getServer().get(0).getVrfId().longValue());
- assertArrayEquals("2001:db8:a0b:12f0::1".toCharArray(), builder.getGatewayAddress().getValue());
- assertArrayEquals("2001:db8:a0b:12f0::2".toCharArray(), builder.getServer().get(0).getAddress().getValue());
+ assertEquals("2001:db8:a0b:12f0::1", builder.getGatewayAddress().stringValue());
+ assertEquals("2001:db8:a0b:12f0::2", builder.getServer().get(0).getAddress().stringValue());
}
@Test
diff --git a/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamPotWriterCustomizerTest.java b/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamPotWriterCustomizerTest.java
index fa4c959c3..261a6a39e 100644
--- a/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamPotWriterCustomizerTest.java
+++ b/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamPotWriterCustomizerTest.java
@@ -62,7 +62,7 @@ public class IoamPotWriterCustomizerTest extends WriterCustomizerTest {
final PotProfileListBuilder builder= new PotProfileListBuilder();
builder.setIndex(new ProfileIndexRange(1));
builder.setNumberOfBits((short)56);
- builder.setKey(new PotProfileListKey(new ProfileIndexRange(1)));
+ builder.withKey(new PotProfileListKey(new ProfileIndexRange(1)));
builder.setLpc(new BigInteger("1233"));
builder.setPrimeNumber(new BigInteger("1001"));
builder.setPublicPolynomial(new BigInteger("1234"));
diff --git a/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizerTest.java b/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizerTest.java
index 9e9f9f144..1f867b2d4 100644
--- a/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizerTest.java
+++ b/ioam/impl/src/test/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizerTest.java
@@ -50,7 +50,7 @@ public class IoamTraceWriterCustomizerTest extends WriterCustomizerTest {
private static TraceConfig generateTraceConfig(final String name) {
final TraceConfigBuilder builder = new TraceConfigBuilder();
builder.setTraceConfigName(name);
- builder.setKey(new TraceConfigKey(name));
+ builder.withKey(new TraceConfigKey(name));
builder.setAclName(name);
builder.setTraceType(Short.valueOf("31"));
builder.setTraceNumElt(Short.valueOf("4"));
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
index 993fb75f8..48a2d5aed 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/Ipv4NeighbourCustomizer.java
@@ -77,7 +77,7 @@ public class Ipv4NeighbourCustomizer extends IpNeighbourReader
.filter(ipNeighborDetails -> ip.equals(arrayToIpv4AddressNoZone(ipNeighborDetails.ipAddress)))
.findFirst()
.ifPresent(ipNeighborDetails -> builder.setIp(arrayToIpv4AddressNoZone(ipNeighborDetails.ipAddress))
- .setKey(keyMapper().apply(ipNeighborDetails))
+ .withKey(keyMapper().apply(ipNeighborDetails))
.setLinkLayerAddress(toPhysAddress(ipNeighborDetails.macAddress))
.setOrigin(ipNeighborDetails.isStatic == 0
? Dynamic
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
index 0d2cbae48..0c820c47e 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java
@@ -70,7 +70,7 @@ public class SubInterfaceIpv4NeighbourCustomizer extends IpNeighbourReader
.filter(ipNeighborDetails -> ip.equals(arrayToIpv4AddressNoZone(ipNeighborDetails.ipAddress)))
.findFirst()
.ifPresent(ipNeighborDetails -> builder.setIp(arrayToIpv4AddressNoZone(ipNeighborDetails.ipAddress))
- .setKey(keyMapper().apply(ipNeighborDetails))
+ .withKey(keyMapper().apply(ipNeighborDetails))
.setLinkLayerAddress(toPhysAddress(ipNeighborDetails.macAddress)));
}
}
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
index 1b277b4a8..7d7578777 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/Ipv6NeighbourCustomizer.java
@@ -72,7 +72,7 @@ public class Ipv6NeighbourCustomizer extends IpNeighbourReader
.filter(ipNeighborDetails -> ip.equals(arrayToIpv6AddressNoZone(ipNeighborDetails.ipAddress)))
.findFirst()
.ifPresent(ipNeighborDetails -> builder.setIp(arrayToIpv6AddressNoZone(ipNeighborDetails.ipAddress))
- .setKey(keyMapper().apply(ipNeighborDetails))
+ .withKey(keyMapper().apply(ipNeighborDetails))
.setLinkLayerAddress(toPhysAddress(ipNeighborDetails.macAddress))
.setOrigin(ipNeighborDetails.isStatic == 0
? Dynamic
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java
index 3ca6a14e3..ba34dcf82 100644
--- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java
+++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/read/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java
@@ -70,7 +70,7 @@ public class SubInterfaceIpv6NeighbourCustomizer extends IpNeighbourReader
.filter(ipNeighborDetails -> ip.equals(arrayToIpv6AddressNoZone(ipNeighborDetails.ipAddress)))
.findFirst()
.ifPresent(ipNeighborDetails -> builder.setIp(arrayToIpv6AddressNoZone(ipNeighborDetails.ipAddress))
- .setKey(keyMapper().apply(ipNeighborDetails))
+ .withKey(keyMapper().apply(ipNeighborDetails))
.setLinkLayerAddress(toPhysAddress(ipNeighborDetails.macAddress)));
}
}
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());
}
diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java
index 3b0be1fed..591e74019 100644
--- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java
+++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java
@@ -54,7 +54,7 @@ final class Ipv4LookupWriter implements LspWriter, MplsInSegmentTranslator {
request.mrIsAdd = booleanToByte(isAdd);
translate(config.getInSegment(), request);
- translate(config.getAugmentation(StaticLspVppLookupAugmentation.class), request);
+ translate(config.augmentation(StaticLspVppLookupAugmentation.class), request);
// default values based on inspecting VPP's CLI and make test code
request.mrClassifyTableIndex = -1;
diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java
index c42aedd27..6425998f7 100644
--- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java
+++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java
@@ -55,7 +55,7 @@ final class MplsLookupWriter implements LspWriter, MplsInSegmentTranslator {
request.mrIsAdd = booleanToByte(isAdd);
translate(config.getInSegment(), request);
- translate(config.getAugmentation(StaticLspVppLookupAugmentation.class), request);
+ translate(config.augmentation(StaticLspVppLookupAugmentation.class), request);
// default values based on inspecting VPP's CLI and make test code
request.mrClassifyTableIndex = -1;
diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java
index b97a36974..c77972e4d 100644
--- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java
+++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java
@@ -98,7 +98,7 @@ final class StaticLspCustomizer implements ListWriterCustomizer<StaticLsp, Stati
if (ImposeAndForward.equals(operation)) {
imposeAndForward.write(id, data, ctx, isAdd);
} else if (PopAndLookup.equals(operation)) {
- final VppLabelLookupAttributes vppAttributes = config.getAugmentation(StaticLspVppLookupAugmentation.class);
+ final VppLabelLookupAttributes vppAttributes = config.augmentation(StaticLspVppLookupAugmentation.class);
checkArgument(vppAttributes != null && vppAttributes.getLabelLookup() != null,
"Configuring pop-and-lookup operation but label-lookup leaf is missing");
final LookupType type = vppAttributes.getLabelLookup().getType();
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
index 4b0c030e4..4472a4953 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/util/MappingEntryContext.java
@@ -146,21 +146,21 @@ public class MappingEntryContext implements Ipv4Translator, Ipv6Translator {
@Nonnull final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev180628.nat.instances.instance.mapping.table.MappingEntry entry,
final long entryId) {
return new MappingEntryBuilder()
- .setKey(entryToKey(entry))
+ .withKey(entryToKey(entry))
.setIndex(entryId)
.build();
}
private MappingEntry toCtxMapEntry(@Nonnull final Nat44StaticMappingDetails details, final long entryId) {
return new MappingEntryBuilder()
- .setKey(entryToKey(details))
+ .withKey(entryToKey(details))
.setIndex(entryId)
.build();
}
private MappingEntry toCtxMapEntry(@Nonnull final Nat64BibDetails details, final long entryId) {
return new MappingEntryBuilder()
- .setKey(entryToKey(details))
+ .withKey(entryToKey(details))
.setIndex(entryId)
.build();
}
diff --git a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java
index 0e60481d2..ceede4244 100644
--- a/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java
+++ b/nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/write/ExternalIpPoolCustomizer.java
@@ -74,7 +74,7 @@ final class ExternalIpPoolCustomizer implements ListWriterCustomizer<ExternalIpA
final boolean isAdd) throws WriteFailedException {
boolean isNat64 = false;
final ExternalIpAddressPoolAugmentation augmentation =
- addressPool.getAugmentation(ExternalIpAddressPoolAugmentation.class);
+ addressPool.augmentation(ExternalIpAddressPoolAugmentation.class);
if (augmentation != null) {
isNat64 = Nat64.equals(augmentation.getPoolType());
}
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java
index 901aea10b..c80b5a3c0 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/read/ExternalIpPoolCustomizerTest.java
@@ -84,7 +84,7 @@ public class ExternalIpPoolCustomizerTest
assertEquals("192.168.44.3/32", builder.getExternalIpPool().getValue());
assertEquals(poolId, builder.getPoolId().longValue());
- assertEquals(Nat44, builder.getAugmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
+ assertEquals(Nat44, builder.augmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
}
@Test
@@ -98,7 +98,7 @@ public class ExternalIpPoolCustomizerTest
assertEquals("192.168.64.3/32", builder.getExternalIpPool().getValue());
assertEquals(poolId, builder.getPoolId().longValue());
- assertEquals(Nat64, builder.getAugmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
+ assertEquals(Nat64, builder.augmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
}
@Test
@@ -112,7 +112,7 @@ public class ExternalIpPoolCustomizerTest
assertEquals("192.168.64.3/32", builder.getExternalIpPool().getValue());
assertEquals(poolId, builder.getPoolId().longValue());
- assertEquals(Nat64, builder.getAugmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
+ assertEquals(Nat64, builder.augmentation(ExternalIpAddressPoolAugmentation.class).getPoolType());
}
@Test
diff --git a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
index d79dfed1e..f6c4434bf 100644
--- a/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
+++ b/nat/nat2vpp/src/test/java/io/fd/hc2vpp/nat/util/MappingEntryContextTest.java
@@ -188,7 +188,7 @@ public class MappingEntryContextTest implements Ipv4Translator {
private static MappingEntry getEntry(final long id, final String longernalIpv4, final String externalIpv4) {
return new MappingEntryBuilder()
- .setKey(new MappingEntryKey(id))
+ .withKey(new MappingEntryKey(id))
.setType(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.nat.rev180628.MappingEntry.Type.Static)
.setInternalSrcAddress(new IpPrefix(new Ipv4Prefix(longernalIpv4)))
.setExternalSrcAddress(new IpPrefix(new Ipv4Prefix(externalIpv4)))
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java
index 3e70ec686..3c3fa3b88 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizer.java
@@ -105,7 +105,7 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
private void getNshEntryMdType1Request(@Nonnull final NshEntry entry,
@Nonnull NshAddDelEntry request) {
- final NshMdType1Augment nshMdType1Augment = entry.getAugmentation(NshMdType1Augment.class);
+ final NshMdType1Augment nshMdType1Augment = entry.augmentation(NshMdType1Augment.class);
if (nshMdType1Augment != null) {
request.c1 = (int) nshMdType1Augment.getC1().longValue();
request.c2 = (int) nshMdType1Augment.getC2().longValue();
@@ -115,7 +115,7 @@ public class NshEntryWriterCustomizer extends FutureJVppNshCustomizer
}
private void getNshEntryMdType2Request(@Nonnull final NshEntry entry, @Nonnull NshAddDelEntry request) {
- final List<Md2Data> md2Datas = entry.getAugmentation(NshMdType2Augment.class).getMd2Data();
+ final List<Md2Data> md2Datas = entry.augmentation(NshMdType2Augment.class).getMd2Data();
final byte md2_len = (byte) (entry.getLength() * 4 - 8);
byte cur_len = 0;
byte option_len;
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java
index e5fcef6c2..f5ecf9bc1 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizer.java
@@ -156,7 +156,7 @@ public class NshEntryReaderCustomizer extends FutureJVppNshCustomizer
final NshEntryDetails nshEntryDetails = reply.nshEntryDetails.get(0);
builder.setName(entryName);
- builder.setKey(key);
+ builder.withKey(key);
builder.setVersion((short) nshEntryDetails.verOC);
builder.setLength((short) nshEntryDetails.length);
diff --git a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java
index e3fcad0b6..ec8591004 100755
--- a/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java
+++ b/nsh/impl/src/main/java/io/fd/hc2vpp/vppnsh/impl/oper/NshMapReaderCustomizer.java
@@ -115,7 +115,7 @@ implements InitializingListReaderCustomizer<NshMap, NshMapKey, NshMapBuilder>, J
final NshMapDetails nshMapDetails = reply.nshMapDetails.get(0);
builder.setName(mapName);
- builder.setKey(key);
+ builder.withKey(key);
builder.setNsp((long) ((nshMapDetails.nspNsi >> 8) & 0xFFFFFF));
builder.setNsi((short) (nshMapDetails.nspNsi & 0xFF));
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java
index 8b2320b76..95160f18b 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshEntryWriterCustomizerTest.java
@@ -57,7 +57,7 @@ public class NshEntryWriterCustomizerTest extends WriterCustomizerTest {
private static NshEntry generateNshEntry(final String name) {
final NshEntryBuilder builder = new NshEntryBuilder();
builder.setName(name);
- builder.setKey(new NshEntryKey(name));
+ builder.withKey(new NshEntryKey(name));
builder.setVersion((short) 0);
builder.setLength((short) 6);
builder.setMdType(MdType1.class);
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java
index e46c21926..11953e6c3 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/config/NshMapWriterCustomizerTest.java
@@ -61,7 +61,7 @@ public class NshMapWriterCustomizerTest extends WriterCustomizerTest {
private static NshMap generateNshMap(final String name) {
final NshMapBuilder builder = new NshMapBuilder();
builder.setName(name);
- builder.setKey(new NshMapKey(name));
+ builder.withKey(new NshMapKey(name));
builder.setNsp(184L);
builder.setNsi((short) 255);
builder.setMappedNsp(183L);
diff --git a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java
index 78f90e821..ca947fc41 100644
--- a/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java
+++ b/nsh/impl/src/test/java/io/fd/hc2vpp/vppnsh/impl/oper/NshEntryReaderCustomizerTest.java
@@ -106,10 +106,10 @@ public class NshEntryReaderCustomizerTest extends
assertEquals(Ethernet.class, builder.getNextProtocol());
assertEquals(123, builder.getNsp().intValue());
assertEquals(4, builder.getNsi().intValue());
- assertEquals(1, builder.getAugmentation(NshMdType1StateAugment.class).getC1().intValue());
- assertEquals(2, builder.getAugmentation(NshMdType1StateAugment.class).getC2().intValue());
- assertEquals(3, builder.getAugmentation(NshMdType1StateAugment.class).getC3().intValue());
- assertEquals(4, builder.getAugmentation(NshMdType1StateAugment.class).getC4().intValue());
+ assertEquals(1, builder.augmentation(NshMdType1StateAugment.class).getC1().intValue());
+ assertEquals(2, builder.augmentation(NshMdType1StateAugment.class).getC2().intValue());
+ assertEquals(3, builder.augmentation(NshMdType1StateAugment.class).getC3().intValue());
+ assertEquals(4, builder.augmentation(NshMdType1StateAugment.class).getC4().intValue());
verify(jvppNsh).nshEntryDump(any(NshEntryDump.class));
}
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv4RouteNamesFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv4RouteNamesFactory.java
index 1205ffa6b..996f781b6 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv4RouteNamesFactory.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv4RouteNamesFactory.java
@@ -79,8 +79,8 @@ public final class Ipv4RouteNamesFactory implements RouteMapper, RouteRequestPro
public String uniqueRouteHopName(@Nonnull final NextHop hop) {
return bindName(hop.getOutgoingInterface(),
- dotlessAddress(hop.getAugmentation(NextHop1.class).getNextHopAddress()),
- String.valueOf(hop.getAugmentation(VppIpv4NextHopAugmentation.class).getWeight()));
+ dotlessAddress(hop.augmentation(NextHop1.class).getNextHopAddress()),
+ String.valueOf(hop.augmentation(VppIpv4NextHopAugmentation.class).getWeight()));
}
public String uniqueRouteHopName(@Nonnull final FibPath path, @Nonnull final MappingContext mappingContext) {
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java
index 91370c7fd..297964418 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/naming/Ipv6RouteNamesFactory.java
@@ -84,8 +84,8 @@ public final class Ipv6RouteNamesFactory implements RouteMapper, RouteRequestPro
public String uniqueRouteHopName(@Nonnull final NextHop hop) {
return bindName(hop.getOutgoingInterface(),
- doubleDotlessAddress(hop.getAugmentation(NextHop1.class).getNextHopAddress()),
- String.valueOf(hop.getAugmentation(VppIpv6NextHopAugmentation.class).getWeight()));
+ doubleDotlessAddress(hop.augmentation(NextHop1.class).getNextHopAddress()),
+ String.valueOf(hop.augmentation(VppIpv6NextHopAugmentation.class).getWeight()));
}
public String uniqueRouteHopName(@Nonnull final FibPath path, @Nonnull final MappingContext mappingContext) {
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
index deb32d382..cf4909181 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizer.java
@@ -125,7 +125,7 @@ final class ControlPlaneProtocolCustomizer
final ControlPlaneProtocolKey key = instanceIdentifier.firstKeyOf(ControlPlaneProtocol.class);
routingProtocolBuilder
.setName(key.getName())
- .setKey(key)
+ .withKey(key)
.setType(Static.class)
.addAugmentation(RoutingProtocolVppAttr.class, new RoutingProtocolVppAttrBuilder().setVppProtocolAttributes(
new VppProtocolAttributesBuilder()
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
index 1c5665839..fcc2758a6 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizer.java
@@ -157,7 +157,7 @@ final class Ipv4RouteCustomizer
routeBuilder.setNextHop(
resolveHopType(mappedName, Arrays.asList(detail.path), interfaceContext, routeHopContext,
readContext.getMappingContext(), namesFactory))
- .setKey(key)
+ .withKey(key)
.setDestinationPrefix(toIpv4Prefix(detail.address, toJavaByte(detail.addressLength)))
.addAugmentation(VppIpv4RouteAttributesAugmentation.class,
new VppIpv4RouteAttributesAugmentationBuilder()
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
index 6003cf88b..daa3e29aa 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizer.java
@@ -154,7 +154,7 @@ final class Ipv6RouteCustomizer
routeBuilder.setNextHop(
resolveHopType(mappedName, Arrays.asList(detail.path), interfaceContext, routeHopContext,
readContext.getMappingContext(), namesFactory))
- .setKey(key)
+ .withKey(key)
.setDestinationPrefix(key.getDestinationPrefix())
.setDestinationPrefix(toIpv6Prefix(detail.address, toJavaByte(detail.addressLength)))
.addAugmentation(VppIpv6RouteAttributesAugmentation.class,
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizer.java
index 67a907326..6521845c8 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizer.java
@@ -50,7 +50,7 @@ final class ControlPlaneProtocolCustomizer
}
static Long extractTableId(final ControlPlaneProtocol protocol) {
- final RoutingProtocolVppAttr vppAttr = protocol.getAugmentation(RoutingProtocolVppAttr.class);
+ final RoutingProtocolVppAttr vppAttr = protocol.augmentation(RoutingProtocolVppAttr.class);
checkState(vppAttr != null && vppAttr.getVppProtocolAttributes() != null,
"Vpp routing protocol attributes not defined");
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/PrefixCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/PrefixCustomizer.java
index ee34ee9fa..cb8dcd040 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/PrefixCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/PrefixCustomizer.java
@@ -88,7 +88,7 @@ final class PrefixCustomizer extends FutureJVppCustomizer
if (isDelete) {
request.isNo = 1;
} else {
- parseControlAdvPrefixes(request, prefix.getControlAdvPrefixes(), prefix.getAugmentation(
+ parseControlAdvPrefixes(request, prefix.getControlAdvPrefixes(), prefix.augmentation(
ControlAdvPrefixesVppAugmentation.class));
}
LOG.debug("Setting Prefix for interface {}(id={}): {}", ifcName, ifcIndex, request);
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizer.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizer.java
index 3d43afbd4..ff89e6a06 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizer.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizer.java
@@ -97,7 +97,7 @@ final class RouterAdvertisementsCustomizer extends FutureJVppCustomizer
request.managed = booleanToByte(dataAfter.isManagedFlag());
request.other = booleanToByte(dataAfter.isOtherConfigFlag());
final Ipv6RouterAdvertisementsVppAugmentation vppAugmentation =
- dataAfter.getAugmentation(Ipv6RouterAdvertisementsVppAugmentation.class);
+ dataAfter.augmentation(Ipv6RouterAdvertisementsVppAugmentation.class);
if (vppAugmentation != null) {
request.llOption = booleanToByte(vppAugmentation.isSuppressLinkLayer());
request.sendUnicast = booleanToByte(vppAugmentation.isSendUnicast());
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java
index 62e4f4525..160b3c949 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/MultipathHopRequestFactory.java
@@ -61,8 +61,8 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement
@Nonnull final NextHop hop,
@Nonnull final MappingContext mappingContext) {
- final VppIpv4Route routingAttributes = route.getAugmentation(VppIpv4RouteAttributesAugmentation.class) != null ?
- route.getAugmentation(VppIpv4RouteAttributesAugmentation.class).getVppIpv4Route() : null;
+ final VppIpv4Route routingAttributes = route.augmentation(VppIpv4RouteAttributesAugmentation.class) != null ?
+ route.augmentation(VppIpv4RouteAttributesAugmentation.class).getVppIpv4Route() : null;
final int nextHopInterfaceIndex =
getInterfaceNamingContext().getIndex(hop.getOutgoingInterface(), mappingContext);
@@ -72,8 +72,8 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement
return getMultipathHopRequest(add,
route.getDestinationPrefix(),
nextHopInterfaceIndex,
- hop.getAugmentation(NextHop1.class).getNextHopAddress(),
- hop.getAugmentation(VppIpv4NextHopAugmentation.class).getWeight().byteValue(),
+ hop.augmentation(NextHop1.class).getNextHopAddress(),
+ hop.augmentation(VppIpv4NextHopAugmentation.class).getWeight().byteValue(),
getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext),
DEFAULT_VNI,
classifyTableIndex(routingAttributes.getClassifyTable(), getVppClassifierContextManager(),
@@ -83,8 +83,8 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement
return getMultipathHopRequest(add,
route.getDestinationPrefix(),
nextHopInterfaceIndex,
- hop.getAugmentation(NextHop1.class).getNextHopAddress(),
- hop.getAugmentation(VppIpv4NextHopAugmentation.class).getWeight().byteValue(),
+ hop.augmentation(NextHop1.class).getNextHopAddress(),
+ hop.augmentation(VppIpv4NextHopAugmentation.class).getWeight().byteValue(),
getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext),
DEFAULT_VNI,
0,
@@ -97,8 +97,8 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement
@Nonnull final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.Route route,
@Nonnull final NextHop hop,
@Nonnull final MappingContext mappingContext) {
- final VppIpv6Route routingAttributes = route.getAugmentation(VppIpv6RouteAttributesAugmentation.class) != null ?
- route.getAugmentation(VppIpv6RouteAttributesAugmentation.class).getVppIpv6Route() : null;
+ final VppIpv6Route routingAttributes = route.augmentation(VppIpv6RouteAttributesAugmentation.class) != null ?
+ route.augmentation(VppIpv6RouteAttributesAugmentation.class).getVppIpv6Route() : null;
final int nextHopInterfaceIndex =
getInterfaceNamingContext().getIndex(hop.getOutgoingInterface(), mappingContext);
@@ -108,8 +108,8 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement
return getMultipathHopRequest(add,
route.getDestinationPrefix(),
nextHopInterfaceIndex,
- hop.getAugmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.route.next.hop.NextHop1.class).getNextHopAddress(),
- hop.getAugmentation(VppIpv6NextHopAugmentation.class).getWeight().byteValue(),
+ hop.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.route.next.hop.NextHop1.class).getNextHopAddress(),
+ hop.augmentation(VppIpv6NextHopAugmentation.class).getWeight().byteValue(),
getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext),
DEFAULT_VNI,
classifyTableIndex(routingAttributes.getClassifyTable(), getVppClassifierContextManager(),
@@ -119,8 +119,8 @@ public class MultipathHopRequestFactory extends BasicHopRequestFactory implement
return getMultipathHopRequest(add,
route.getDestinationPrefix(),
nextHopInterfaceIndex,
- hop.getAugmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.route.next.hop.NextHop1.class).getNextHopAddress(),
- hop.getAugmentation(VppIpv6NextHopAugmentation.class).getWeight().byteValue(),
+ hop.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.route.next.hop.NextHop1.class).getNextHopAddress(),
+ hop.augmentation(VppIpv6NextHopAugmentation.class).getWeight().byteValue(),
getRoutingProtocolContext().getIndex(parentProtocolName, mappingContext),
DEFAULT_VNI,
0,
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java
index 079c953a3..076d9acce 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactory.java
@@ -58,14 +58,14 @@ public class SimpleHopRequestFactory extends BasicHopRequestFactory implements R
@Nonnull final Route route,
@Nonnull final MappingContext mappingContext) {
SimpleNextHop simpleNextHop = (SimpleNextHop) route.getNextHop().getNextHopOptions();
- SimpleNextHop1 hop = simpleNextHop.getAugmentation(SimpleNextHop1.class);
+ SimpleNextHop1 hop = simpleNextHop.augmentation(SimpleNextHop1.class);
final int nextHopInterfaceIndex =
getInterfaceNamingContext().getIndex(simpleNextHop.getOutgoingInterface(), mappingContext);
final VppIpv4Route routingAttributes =
- route.getAugmentation(VppIpv4RouteAttributesAugmentation.class) != null ?
- route.getAugmentation(VppIpv4RouteAttributesAugmentation.class).getVppIpv4Route() : null;
+ route.augmentation(VppIpv4RouteAttributesAugmentation.class) != null ?
+ route.augmentation(VppIpv4RouteAttributesAugmentation.class).getVppIpv4Route() : null;
if (routingAttributes != null &&
classifyTablePresent(routingAttributes.getClassifyTable(), getVppClassifierContextManager(),
@@ -97,12 +97,12 @@ public class SimpleHopRequestFactory extends BasicHopRequestFactory implements R
@Nonnull final MappingContext mappingContext) {
SimpleNextHop simpleNextHop = (SimpleNextHop) route.getNextHop().getNextHopOptions();
final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.route.next.hop.SimpleNextHop1
- hop = simpleNextHop.getAugmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.route.next.hop.SimpleNextHop1.class);
+ hop = simpleNextHop.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.route.next.hop.SimpleNextHop1.class);
final int nextHopInterfaceIndex =
getInterfaceNamingContext().getIndex(simpleNextHop.getOutgoingInterface(), mappingContext);
VppIpv6Route routingAttributes =
- route.getAugmentation(VppIpv6RouteAttributesAugmentation.class) != null ? route.getAugmentation(
+ route.augmentation(VppIpv6RouteAttributesAugmentation.class) != null ? route.augmentation(
VppIpv6RouteAttributesAugmentation.class).getVppIpv6Route() : null;
if (routingAttributes != null &&
diff --git a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/TableLookupRequestFactory.java b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/TableLookupRequestFactory.java
index 99b2b1f10..89b0bc3ea 100644
--- a/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/TableLookupRequestFactory.java
+++ b/routing/routing-impl/src/main/java/io/fd/hc2vpp/routing/write/factory/TableLookupRequestFactory.java
@@ -77,7 +77,7 @@ public class TableLookupRequestFactory extends BasicHopRequestFactory implements
}
VppIpv4Route vppIpv4Route =
- route.getAugmentation(VppIpv4RouteAttributesAugmentation.class) != null ? route.getAugmentation(
+ route.augmentation(VppIpv4RouteAttributesAugmentation.class) != null ? route.augmentation(
VppIpv4RouteAttributesAugmentation.class).getVppIpv4Route() : null;
final Optional<String> optClassifyTable = Optional.ofNullable(vppIpv4Route)
@@ -118,8 +118,8 @@ public class TableLookupRequestFactory extends BasicHopRequestFactory implements
String.format("Lookup table: %s not found for route: %s", secondaryTableId, route));
}
- VppIpv6Route vppIpv6Route = route.getAugmentation(VppIpv6RouteAttributesAugmentation.class) != null
- ? route.getAugmentation(VppIpv6RouteAttributesAugmentation.class).getVppIpv6Route() : null;
+ VppIpv6Route vppIpv6Route = route.augmentation(VppIpv6RouteAttributesAugmentation.class) != null
+ ? route.augmentation(VppIpv6RouteAttributesAugmentation.class).getVppIpv6Route() : null;
final Optional<String> optClassifyTable = Optional.ofNullable(vppIpv6Route)
.map(VppRouteAttributes::getClassifyTable);
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java
index fa166cb44..052a7f2ec 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/RoutingRequestTestHelper.java
@@ -141,7 +141,7 @@ public interface RoutingRequestTestHelper extends ByteDataTranslator, FutureProd
}
default Route getIpv4RouteWithId(final StaticRoutes staticRoutes, final Ipv4Prefix id) {
- return staticRoutes.getAugmentation(StaticRoutes1.class)
+ return staticRoutes.augmentation(StaticRoutes1.class)
.getIpv4()
.getRoute()
.stream()
@@ -155,13 +155,13 @@ public interface RoutingRequestTestHelper extends ByteDataTranslator, FutureProd
.cast(route.getNextHop().getNextHopOptions())
.getNextHopList().getNextHop()
.stream()
- .filter(nextHop -> Integer.valueOf(nextHop.getKey().getIndex()) == id)
+ .filter(nextHop -> Integer.valueOf(nextHop.key().getIndex()) == id)
.collect(RWUtils.singleItemCollector());
}
default org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.routing.control.plane.protocols.control.plane.protocol._static.routes.ipv6.Route getIpv6RouteWithId(
final StaticRoutes staticRoutes, final Ipv6Prefix id) {
- return staticRoutes.getAugmentation(
+ return staticRoutes.augmentation(
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv6.unicast.routing.rev180313.StaticRoutes1.class)
.getIpv6()
.getRoute()
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizerTest.java
index 43ec73bd1..61338e1e6 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/ControlPlaneProtocolCustomizerTest.java
@@ -111,7 +111,7 @@ public class ControlPlaneProtocolCustomizerTest
getCustomizer().readCurrentAttributes(identifier, builder, ctx);
assertEquals(ROUTE_PROTOCOL_NAME, builder.getName());
- assertEquals(ROUTE_PROTOCOL_NAME, builder.getKey().getName());
+ assertEquals(ROUTE_PROTOCOL_NAME, builder.key().getName());
assertEquals(Static.class, builder.getType());
}
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizerTest.java
index 0ba1fe576..f64fac7ca 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv4RouteCustomizerTest.java
@@ -229,7 +229,7 @@ public class Ipv4RouteCustomizerTest extends ListReaderCustomizerTest<Route, Rou
assertTrue(hopOptions instanceof SimpleNextHop);
SimpleNextHop hop = SimpleNextHop.class.cast(hopOptions);
- assertEquals("192.168.2.1", hop.getAugmentation(SimpleNextHop1.class).getNextHopAddress().getValue());
+ assertEquals("192.168.2.1", hop.augmentation(SimpleNextHop1.class).getNextHopAddress().getValue());
assertEquals("iface-1", hop.getOutgoingInterface());
}
@@ -255,10 +255,10 @@ public class Ipv4RouteCustomizerTest extends ListReaderCustomizerTest<Route, Rou
private boolean areEqual(final NextHop first, final NextHop second) {
return new EqualsBuilder()
- .append(true, first.getAugmentation(NextHop1.class).getNextHopAddress().getValue()
- .equals(second.getAugmentation(NextHop1.class).getNextHopAddress().getValue()))
+ .append(true, first.augmentation(NextHop1.class).getNextHopAddress().getValue()
+ .equals(second.augmentation(NextHop1.class).getNextHopAddress().getValue()))
.append(true, first.getIndex().equals(second.getIndex()))
- .append(true, first.getKey().equals(second.getKey()))
+ .append(true, first.key().equals(second.key()))
.append(true, first.getOutgoingInterface().equals(second.getOutgoingInterface()))
.isEquals();
}
@@ -267,7 +267,7 @@ public class Ipv4RouteCustomizerTest extends ListReaderCustomizerTest<Route, Rou
return new NextHopBuilder()
.setOutgoingInterface(iface)
.setIndex(id)
- .setKey(new NextHopKey(id))
+ .withKey(new NextHopKey(id))
.addAugmentation(VppIpv4NextHopAugmentation.class,
new VppIpv4NextHopAugmentationBuilder().setWeight((short) weight).build())
.addAugmentation(NextHop1.class, new NextHop1Builder().setNextHopAddress(new Ipv4Address(address)).build())
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizerTest.java
index fd2844bd6..0b606a54a 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/read/Ipv6RouteCustomizerTest.java
@@ -272,7 +272,7 @@ public class Ipv6RouteCustomizerTest extends ListReaderCustomizerTest<Route, Rou
assertTrue(hopOptions instanceof SimpleNextHop);
SimpleNextHop hop = SimpleNextHop.class.cast(hopOptions);
- assertEquals("2001:db8:a0b:12f0::1", hop.getAugmentation(SimpleNextHop1.class)
+ assertEquals("2001:db8:a0b:12f0::1", hop.augmentation(SimpleNextHop1.class)
.getNextHopAddress().getValue());
assertEquals("iface-1", hop.getOutgoingInterface());
}
@@ -289,7 +289,7 @@ public class Ipv6RouteCustomizerTest extends ListReaderCustomizerTest<Route, Rou
assertTrue(hopOptions instanceof SimpleNextHop);
SimpleNextHop hop = SimpleNextHop.class.cast(hopOptions);
- assertEquals("2001:db8:a0b:12f0::1", hop.getAugmentation(SimpleNextHop1.class)
+ assertEquals("2001:db8:a0b:12f0::1", hop.augmentation(SimpleNextHop1.class)
.getNextHopAddress().getValue());
assertEquals("iface-1", hop.getOutgoingInterface());
}
@@ -318,10 +318,10 @@ public class Ipv6RouteCustomizerTest extends ListReaderCustomizerTest<Route, Rou
private boolean areEqual(final NextHop first, final NextHop second) {
return new EqualsBuilder()
- .append(true, first.getAugmentation(NextHop1.class).getNextHopAddress().getValue()
- .equals(second.getAugmentation(NextHop1.class).getNextHopAddress().getValue()))
+ .append(true, first.augmentation(NextHop1.class).getNextHopAddress().getValue()
+ .equals(second.augmentation(NextHop1.class).getNextHopAddress().getValue()))
.append(true, first.getIndex().equals(second.getIndex()))
- .append(true, first.getKey().equals(second.getKey()))
+ .append(true, first.key().equals(second.key()))
.append(true, first.getOutgoingInterface().equals(second.getOutgoingInterface()))
.isEquals();
}
@@ -330,7 +330,7 @@ public class Ipv6RouteCustomizerTest extends ListReaderCustomizerTest<Route, Rou
return new NextHopBuilder()
.setOutgoingInterface(iface)
.setIndex(id)
- .setKey(new NextHopKey(id))
+ .withKey(new NextHopKey(id))
.addAugmentation(NextHop1.class, new NextHop1Builder().setNextHopAddress(new Ipv6Address(address)).build())
.addAugmentation(VppIpv6NextHopAugmentation.class,
new VppIpv6NextHopAugmentationBuilder().setWeight((short) weight).build())
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
index 8d49f810d..6cd0e2fd8 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/ControlPlaneProtocolCustomizerTest.java
@@ -113,10 +113,10 @@ public class ControlPlaneProtocolCustomizerTest extends WriterCustomizerTest {
KeyedInstanceIdentifier<Table, TableKey> invalidVrfIidV6 =
FibManagementIIds.FM_FIB_TABLES.child(Table.class, invalidKeyV6);
when(writeContext.readAfter(vrfIidV4)).thenReturn(Optional.of(
- new TableBuilder().setKey(keyV4).setAddressFamily(keyV4.getAddressFamily())
+ new TableBuilder().withKey(keyV4).setAddressFamily(keyV4.getAddressFamily())
.setTableId(keyV4.getTableId()).setName("VRF-IPV4-1").build()));
when(writeContext.readAfter(vrfIidV6)).thenReturn(Optional.of(
- new TableBuilder().setKey(keyV6).setAddressFamily(keyV6.getAddressFamily())
+ new TableBuilder().withKey(keyV6).setAddressFamily(keyV6.getAddressFamily())
.setTableId(keyV6.getTableId()).setName("VRF-IPV6-1").build()));
when(writeContext.readAfter(invalidVrfIidV4)).thenReturn(Optional.absent());
when(writeContext.readAfter(invalidVrfIidV6)).thenReturn(Optional.absent());
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
index 36e0aed6d..fbf1fd79f 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv4RouteCustomizerTest.java
@@ -63,7 +63,7 @@ public class Ipv4RouteCustomizerTest extends RouteCustomizerTest {
SEC_TABLE_ID);
private static final Table
IPV4_TABLE = new TableBuilder().setName("VRF-IPV4-4")
- .setKey(SEC_TABLE_KEY).setTableId(SEC_TABLE_KEY.getTableId())
+ .withKey(SEC_TABLE_KEY).setTableId(SEC_TABLE_KEY.getTableId())
.setAddressFamily(SEC_TABLE_KEY.getAddressFamily()).build();
private static final InstanceIdentifier<Route> ROUTE_IID = CONTROL_PROTOCOL_IID
@@ -127,7 +127,7 @@ public class Ipv4RouteCustomizerTest extends RouteCustomizerTest {
@Test
public void testWriteTableLookup() throws WriteFailedException {
final Route route = new RouteBuilder()
- .setKey(new RouteKey(new Ipv4Prefix("192.168.2.1/24")))
+ .withKey(new RouteKey(new Ipv4Prefix("192.168.2.1/24")))
.setDestinationPrefix(new Ipv4Prefix("192.168.2.1/24"))
.setNextHop(new NextHopBuilder().setNextHopOptions(
new TableLookupCaseBuilder()
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
index 0e724b874..77f25c541 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/Ipv6RouteCustomizerTest.java
@@ -57,7 +57,7 @@ public class Ipv6RouteCustomizerTest extends RouteCustomizerTest {
SEC_TABLE_ID);
private static final Table
IPV6_TABLE = new TableBuilder().setName("VRF-IPV6-4")
- .setKey(SEC_TABLE_KEY).setTableId(SEC_TABLE_KEY.getTableId())
+ .withKey(SEC_TABLE_KEY).setTableId(SEC_TABLE_KEY.getTableId())
.setAddressFamily(SEC_TABLE_KEY.getAddressFamily()).build();
private static final Ipv6Prefix IPV_6_PREFIX = new Ipv6Prefix("2001:0db8:0a0b:12f0:0000:0000:0000:0001/64");
private static final Ipv6Prefix IPV_6_PREFIX_128 = new Ipv6Prefix("2001:0db8:0a0b:12f0:0000:0000:0000:0001/128");
@@ -127,7 +127,7 @@ public class Ipv6RouteCustomizerTest extends RouteCustomizerTest {
@Test
public void testWriteTableLookup() throws WriteFailedException {
final Route route = new RouteBuilder()
- .setKey(new RouteKey(IPV_6_PREFIX))
+ .withKey(new RouteKey(IPV_6_PREFIX))
.setDestinationPrefix(IPV_6_PREFIX)
.setNextHop(new NextHopBuilder().setNextHopOptions(new TableLookupCaseBuilder()
.setSecondaryVrf(new VniReference(4L))
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
index ad1613f35..4e4a8822d 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouteCustomizerTest.java
@@ -99,7 +99,7 @@ abstract class RouteCustomizerTest extends WriterCustomizerTest implements Routi
whenAddRouteThenSuccess(api);
when(writeContext.readAfter(CONTROL_PROTOCOL_IID)).thenReturn(Optional.of(new ControlPlaneProtocolBuilder()
- .setKey(CONTROL_PLANE_PROTOCOL_KEY).setName(ROUTE_PROTOCOL_NAME).setType(Static.class)
+ .withKey(CONTROL_PLANE_PROTOCOL_KEY).setName(ROUTE_PROTOCOL_NAME).setType(Static.class)
.addAugmentation(RoutingProtocolVppAttr.class, new RoutingProtocolVppAttrBuilder()
.setVppProtocolAttributes(new VppProtocolAttributesBuilder()
.setPrimaryVrf(new VniReference(TABLE_ID))
@@ -107,7 +107,7 @@ abstract class RouteCustomizerTest extends WriterCustomizerTest implements Routi
.build()));
when(writeContext.readAfter(CONTROL_PROTOCOL_INVALID_IID)).thenReturn(Optional.of(
- new ControlPlaneProtocolBuilder().setKey(CONTROL_PLANE_PROTOCOL_INVALID_KEY)
+ new ControlPlaneProtocolBuilder().withKey(CONTROL_PLANE_PROTOCOL_INVALID_KEY)
.setName(ROUTE_PROTOCOL_INVALID_NAME).setType(Static.class)
.addAugmentation(RoutingProtocolVppAttr.class, new RoutingProtocolVppAttrBuilder()
.setVppProtocolAttributes(new VppProtocolAttributesBuilder()
@@ -115,10 +115,10 @@ abstract class RouteCustomizerTest extends WriterCustomizerTest implements Routi
.build()));
when(writeContext.readAfter(TABLE_V4_IID)).thenReturn(Optional.of(
- new TableBuilder().setKey(IPV4_TABLE_KEY).setAddressFamily(Ipv4.class)
+ new TableBuilder().withKey(IPV4_TABLE_KEY).setAddressFamily(Ipv4.class)
.setTableId(IPV4_TABLE_KEY.getTableId()).build()));
when(writeContext.readAfter(TABLE_V6_IID)).thenReturn(Optional.of(
- new TableBuilder().setKey(IPV6_TABLE_KEY).setAddressFamily(Ipv6.class)
+ new TableBuilder().withKey(IPV6_TABLE_KEY).setAddressFamily(Ipv6.class)
.setTableId(IPV6_TABLE_KEY.getTableId()).build()));
when(writeContext.readAfter(INVALID_TABLE_V4_IID)).thenReturn(Optional.absent());
when(writeContext.readAfter(INVALID_TABLE_V6_IID)).thenReturn(Optional.absent());
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizerTest.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizerTest.java
index 7e92d1654..1bec72e19 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizerTest.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/RouterAdvertisementsCustomizerTest.java
@@ -107,9 +107,9 @@ public class RouterAdvertisementsCustomizerTest extends WriterCustomizerTest imp
private static Ipv6RouterAdvertisements getRA(final Interfaces ifc) {
return ifc.getInterface()
.get(0)
- .getAugmentation(Interface1.class)
+ .augmentation(Interface1.class)
.getIpv6()
- .getAugmentation(Ipv61.class)
+ .augmentation(Ipv61.class)
.getIpv6RouterAdvertisements();
}
}
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java
index 6457feba2..5f3632b77 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv4Test.java
@@ -84,7 +84,7 @@ public class SimpleHopRequestFactoryIpv4Test
StaticRoutes ipv4StaticRouteWithoutClassifier) {
final IpAddDelRoute request =
factory.createIpv4SimpleHopRequest(false, ROUTE_PROTOCOL_NAME,
- ipv4StaticRouteWithoutClassifier.getAugmentation(StaticRoutes1.class).getIpv4().getRoute()
+ ipv4StaticRouteWithoutClassifier.augmentation(StaticRoutes1.class).getIpv4().getRoute()
.get(0), mappingContext);
assertEquals(
@@ -99,7 +99,7 @@ public class SimpleHopRequestFactoryIpv4Test
StaticRoutes ipv4StaticRouteWithoutRouteAttrs) {
final IpAddDelRoute request =
factory.createIpv4SimpleHopRequest(false, ROUTE_PROTOCOL_NAME,
- ipv4StaticRouteWithoutRouteAttrs.getAugmentation(StaticRoutes1.class).getIpv4().getRoute()
+ ipv4StaticRouteWithoutRouteAttrs.augmentation(StaticRoutes1.class).getIpv4().getRoute()
.get(0), mappingContext);
assertEquals(
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java
index eadb3995d..f0a2998e3 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SimpleHopRequestFactoryIpv6Test.java
@@ -70,7 +70,7 @@ public class SimpleHopRequestFactoryIpv6Test
StaticRoutes ipv6StaticRouteWithClassifier) {
final IpAddDelRoute request =
factory.createIpv6SimpleHopRequest(false, ROUTE_PROTOCOL_NAME,
- ipv6StaticRouteWithClassifier.getAugmentation(StaticRoutes1.class).getIpv6().getRoute().get(0),
+ ipv6StaticRouteWithClassifier.augmentation(StaticRoutes1.class).getIpv6().getRoute().get(0),
mappingContext);
assertEquals(desiredFlaglessResult(0, 1, 0, Ipv6RouteData.FIRST_ADDRESS_AS_ARRAY, 64,
@@ -84,8 +84,7 @@ public class SimpleHopRequestFactoryIpv6Test
StaticRoutes ipv6StaticRouteWithoutClassifier) {
final IpAddDelRoute request =
factory.createIpv6SimpleHopRequest(false, ROUTE_PROTOCOL_NAME,
- ipv6StaticRouteWithoutClassifier.getAugmentation(StaticRoutes1.class).getIpv6().getRoute()
- .get(0),
+ ipv6StaticRouteWithoutClassifier.augmentation(StaticRoutes1.class).getIpv6().getRoute().get(0),
mappingContext);
assertEquals(desiredFlaglessResult(0, 1, 0, Ipv6RouteData.FIRST_ADDRESS_AS_ARRAY, 64,
@@ -97,8 +96,7 @@ public class SimpleHopRequestFactoryIpv6Test
StaticRoutes ipv6StaticRouteWithoutRouteAttrs) {
final IpAddDelRoute request =
factory.createIpv6SimpleHopRequest(false, ROUTE_PROTOCOL_NAME,
- ipv6StaticRouteWithoutRouteAttrs.getAugmentation(StaticRoutes1.class).getIpv6().getRoute()
- .get(0),
+ ipv6StaticRouteWithoutRouteAttrs.augmentation(StaticRoutes1.class).getIpv6().getRoute().get(0),
mappingContext);
assertEquals(desiredFlaglessResult(0, 1, 0, Ipv6RouteData.FIRST_ADDRESS_AS_ARRAY, 64,
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java
index bce1b5167..c8cffa7e5 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv4Test.java
@@ -132,7 +132,7 @@ public class SpecialNextHopRequestFactoryIpv4Test
}
private Route extractSingleRoute(final StaticRoutes staticRoutes, final Ipv4Prefix id) {
- return staticRoutes.getAugmentation(StaticRoutes1.class).getIpv4().getRoute().stream()
+ return staticRoutes.augmentation(StaticRoutes1.class).getIpv4().getRoute().stream()
.filter(route -> route.getDestinationPrefix().getValue().equals(id.getValue()))
.collect(RWUtils.singleItemCollector());
}
diff --git a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java
index 4e0a0efd5..9f435d21b 100644
--- a/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java
+++ b/routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/write/factory/SpecialNextHopRequestFactoryIpv6Test.java
@@ -131,7 +131,7 @@ public class SpecialNextHopRequestFactoryIpv6Test
}
private Route extractSingleRoute(final StaticRoutes staticRoutes, final Ipv6Prefix id) {
- return staticRoutes.getAugmentation(StaticRoutes1.class).getIpv6().getRoute().stream()
+ return staticRoutes.augmentation(StaticRoutes1.class).getIpv6().getRoute().stream()
.filter(route -> route.getDestinationPrefix().getValue().equals(id.getValue())).collect(
RWUtils.singleItemCollector());
}
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java
index 6952c1538..278f4b822 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/policy/request/PolicyReadRequest.java
@@ -136,7 +136,7 @@ public class PolicyReadRequest extends JVppRequest
Srv6PolicyMapping policy = policyCtx.getPolicy(bsid, ctx.getMappingContext());
IpAddress endpoint = new IpAddress(policy.getEndpoint());
builder.setName(policy.getName()).setEndpoint(endpoint).setColor(policy.getColor());
- builder.setKey(new PolicyKey(policy.getColor(), endpoint));
+ builder.withKey(new PolicyKey(policy.getColor(), endpoint));
builder.setBindingSid(new BindingSidBuilder().setState(
new StateBuilder().setType(DataplaneType.Srv6).setAllocMode(BindingSidAllocMode.Explicit)
.setValue(new SidValueType(new IpAddress(bsid))).build()).build());
@@ -225,7 +225,7 @@ public class PolicyReadRequest extends JVppRequest
final ReadContext ctx)
throws ReadFailedException {
NamedSegmentListKey key = id.firstKeyOf(NamedSegmentList.class);
- builder.setKey(key)
+ builder.withKey(key)
.setName(key.getName())
.setState(
new org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.oc.srte.policy.rev170918.segment.list.properties.StateBuilder()
@@ -254,7 +254,7 @@ public class PolicyReadRequest extends JVppRequest
private Segment parseSrv6Sid(final long i, final Srv6Sid srv6Sid) {
// shifting index by 1 so it matches original indexing
long index = i + 1L;
- SegmentBuilder builder = new SegmentBuilder().setKey(new SegmentKey(index)).setState(
+ SegmentBuilder builder = new SegmentBuilder().withKey(new SegmentKey(index)).setState(
new org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.oc.srte.policy.rev170918.segment.properties.StateBuilder()
.setIndex(index)
.setType(SegmentType.Type2)
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java
index e1bd8d073..044f237fb 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocalSidReadRequest.java
@@ -175,7 +175,7 @@ public class LocalSidReadRequest extends JVppRequest implements ReadRequest<Sid,
final Ipv6Address sidAddress, final SidBuilder builder) {
Class<? extends Srv6EndpointType> behaviorType = parseEndBehaviorType(detail.behavior);
Srv6FuncOpcodeUnreserved opcode = extractOpCode(sidAddress, readContext.getMappingContext(), locName);
- builder.setEndBehaviorType(behaviorType).setKey(new SidKey(opcode)).setOpcode(opcode);
+ builder.setEndBehaviorType(behaviorType).withKey(new SidKey(opcode)).setOpcode(opcode);
parseEndFunction(builder, detail, readContext);
}
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java
index ff6316b01..f69aa1bbf 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequest.java
@@ -115,7 +115,7 @@ public class LocatorReadRequest extends JVppRequest implements ReadRequest<Locat
Ipv6Address locator = extractLocator(arrayToIpv6AddressNoZone(detail.addr.addr), mappingContext, locName);
int locLength = LocatorContextManager.parseLength(locatorCtx.getLocator(locName, mappingContext));
- builder.setKey(new LocatorKey(locator.getValue()))
+ builder.withKey(new LocatorKey(locator.getValue()))
.setName(locator.getValue())
.setPrefix(
new PrefixBuilder()
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java
index eb9370787..c6f6316bd 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L2SteeringRequest.java
@@ -76,7 +76,7 @@ public class L2SteeringRequest extends SteeringRequest
private void parseL2Steering(SrSteeringPolDetails srSteeringPolDetails, final InterfaceBuilder builder,
ReadContext ctx) {
String name = ifcNamingContext.getName(srSteeringPolDetails.swIfIndex, ctx.getMappingContext());
- builder.setInputInterface(name).setKey(new InterfaceKey(name))
+ builder.setInputInterface(name).withKey(new InterfaceKey(name))
.setState(new StateBuilder().setInputInterface(name).build());
}
}
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java
index 1043746e9..4c7c943e6 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/read/steering/request/L3SteeringRequest.java
@@ -95,7 +95,7 @@ public class L3SteeringRequest extends SteeringRequest
private void parseL3Steering(SrSteeringPolDetails srSteeringPolDetails, final PrefixBuilder builder) {
PrefixKey key = parseL3SteeringKey(srSteeringPolDetails);
- builder.setKey(key).setIpPrefix(key.getIpPrefix())
+ builder.withKey(key).setIpPrefix(key.getIpPrefix())
.setState(new StateBuilder().setIpPrefix(key.getIpPrefix()).build());
}
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java
index 15fb5c0ff..b40820132 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/CandidatePathContextManagerImpl.java
@@ -60,7 +60,7 @@ public class CandidatePathContextManagerImpl implements CandidatePathContextMana
final KeyedInstanceIdentifier<Srv6CandidatePathMapping, Srv6CandidatePathMappingKey> mappingIid =
getCandidatePathIid(bsid);
final Srv6CandidatePathMappingBuilder builder =
- new Srv6CandidatePathMappingBuilder().setKey(new Srv6CandidatePathMappingKey(bsid))
+ new Srv6CandidatePathMappingBuilder().withKey(new Srv6CandidatePathMappingKey(bsid))
.setProvisioningMethod(provisioningMethod).setPreference(preference)
.setDistinguisher(distinguisher).setBsid(bsid).setName(name);
ctx.put(mappingIid, builder.build());
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java
index aba852dde..66bf113f8 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/LocatorContextManagerImpl.java
@@ -57,7 +57,7 @@ public final class LocatorContextManagerImpl implements LocatorContextManager {
@Nonnull final MappingContext ctx) {
final KeyedInstanceIdentifier<Srv6LocatorMapping, Srv6LocatorMappingKey> mappingIid = getLocatorIid(name);
final Srv6LocatorMappingBuilder builder = new Srv6LocatorMappingBuilder()
- .setKey(new Srv6LocatorMappingKey(name)).setPrefix(ipv6Prefix).setName(name);
+ .withKey(new Srv6LocatorMappingKey(name)).setPrefix(ipv6Prefix).setName(name);
ctx.put(mappingIid, builder.build());
}
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java
index 1997043e2..0edf03f0b 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/PolicyContextManagerImpl.java
@@ -55,7 +55,7 @@ public class PolicyContextManagerImpl implements PolicyContextManager {
@Nonnull final Ipv6Address bsid, @Nonnull final MappingContext ctx) {
final KeyedInstanceIdentifier<Srv6PolicyMapping, Srv6PolicyMappingKey> mappingIid = getPolicyIid(bsid);
final Srv6PolicyMappingBuilder builder =
- new Srv6PolicyMappingBuilder().setKey(new Srv6PolicyMappingKey(bsid)).setColor(color)
+ new Srv6PolicyMappingBuilder().withKey(new Srv6PolicyMappingKey(bsid)).setColor(color)
.setEndpoint(endpoint).setBsid(bsid).setName(name);
ctx.put(mappingIid, builder.build());
}
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java
index 2778a926d..00b669800 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/Srv6Util.java
@@ -87,11 +87,11 @@ public final class Srv6Util {
? writeContext.readAfter(RWUtils.cutId(instanceIdentifier, Policy.class))
: writeContext.readBefore(RWUtils.cutId(instanceIdentifier, Policy.class));
- if (policyOptional.isPresent() && policyOptional.get().getAugmentation(VppSrPolicyAugmentation.class) != null &&
- policyOptional.get().getAugmentation(VppSrPolicyAugmentation.class).getVppSrPolicy() != null) {
+ if (policyOptional.isPresent() && policyOptional.get().augmentation(VppSrPolicyAugmentation.class) != null &&
+ policyOptional.get().augmentation(VppSrPolicyAugmentation.class).getVppSrPolicy() != null) {
VppSrPolicy vppSrPolicy =
- policyOptional.get().getAugmentation(VppSrPolicyAugmentation.class).getVppSrPolicy();
+ policyOptional.get().augmentation(VppSrPolicyAugmentation.class).getVppSrPolicy();
if (vppSrPolicy.getConfig() != null && vppSrPolicy.getConfig().getTableId() != null) {
return vppSrPolicy.getConfig().getTableId().getValue().intValue();
}
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java
index d8e09e84d..20437fc63 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizer.java
@@ -75,7 +75,7 @@ public class PolicyCustomizer extends FutureJVppCustomizer
try {
// Fib table must be created beforehand. First we check if all data is present, then we verify the existence
// of FIB table in current configuration
- VppSrPolicyAugmentation policyAugmentation = policy.getAugmentation(VppSrPolicyAugmentation.class);
+ VppSrPolicyAugmentation policyAugmentation = policy.augmentation(VppSrPolicyAugmentation.class);
if (policyAugmentation != null && policyAugmentation.getVppSrPolicy() != null &&
policyAugmentation.getVppSrPolicy().getConfig() != null) {
diff --git a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java
index 827dd3f5c..7d28384a9 100644
--- a/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java
+++ b/srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/SidCustomizer.java
@@ -77,9 +77,9 @@ public class SidCustomizer extends FutureJVppCustomizer implements ListWriterCus
private Table getVrfTable(final @Nonnull InstanceIdentifier<Sid> iid, final @Nonnull WriteContext writeContext,
final InstanceIdentifier<Locator> locatorIid, final Optional<Locator> locatorOpt) {
Preconditions.checkArgument(locatorOpt.isPresent(), "Locator: {} for SID: {} was not found.", locatorIid, iid);
- Preconditions.checkNotNull(locatorOpt.get().getAugmentation(VppSrv6FibLocatorAugment.class),
+ Preconditions.checkNotNull(locatorOpt.get().augmentation(VppSrv6FibLocatorAugment.class),
"Vpp FIB table augmentation was not found for SID: {}.", iid);
- FibTable fibTable = locatorOpt.get().getAugmentation(VppSrv6FibLocatorAugment.class).getFibTable();
+ FibTable fibTable = locatorOpt.get().augmentation(VppSrv6FibLocatorAugment.class).getFibTable();
Preconditions.checkNotNull(fibTable, "Vpp FIB table configuration was not found for SID: {}.", iid);
TableKey tableKey = new TableKey(fibTable.getAddressFamily(), fibTable.getTableId());
KeyedInstanceIdentifier<Table, TableKey> vrfIid = FibManagementIIds.FM_FIB_TABLES.child(Table.class, tableKey);
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/NamedSegmentCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/NamedSegmentCustomizerTest.java
index 6cc2f555d..d75477e94 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/NamedSegmentCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/NamedSegmentCustomizerTest.java
@@ -53,7 +53,7 @@ public class NamedSegmentCustomizerTest extends PoliciesTest {
key = Srv6PolicyIIds.SR_TE_NSLS.child(NamedSegmentList.class, SEGMENT_KEY_1);
customizer.readCurrentAttributes(key, segmentListBuilder, readCtx);
- Assert.assertEquals(SEGMENT_KEY_1, segmentListBuilder.getKey());
+ Assert.assertEquals(SEGMENT_KEY_1, segmentListBuilder.key());
Assert.assertEquals(SEGMENT_KEY_1.getName(), segmentListBuilder.getName());
Assert.assertNotNull(customizer.getBuilder(key));
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/PolicyCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/PolicyCustomizerTest.java
index 49c3942c5..f7ea33281 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/PolicyCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/policy/PolicyCustomizerTest.java
@@ -87,7 +87,7 @@ public class PolicyCustomizerTest extends PoliciesTest {
KeyedInstanceIdentifier<Policy, PolicyKey> key = Srv6PolicyIIds.SR_TE_PLS.child(Policy.class, POLICY_KEY);
customizer.readCurrentAttributes(key, policyBuilder, readCtx);
- Assert.assertEquals(POLICY_KEY, policyBuilder.getKey());
+ Assert.assertEquals(POLICY_KEY, policyBuilder.key());
Assert.assertEquals(BSID_ADR.getValue(), policyBuilder.getName());
Assert.assertNotNull(customizer.getBuilder(key));
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/LocatorCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/LocatorCustomizerTest.java
index 3f2a74fd7..963bc664d 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/LocatorCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/LocatorCustomizerTest.java
@@ -89,7 +89,7 @@ public class LocatorCustomizerTest extends LocalSidRequestTest {
LocatorCustomizer customizer = new LocatorCustomizer(api, locatorContext);
LocatorBuilder builder = new LocatorBuilder();
customizer.readCurrentAttributes(SID_A_101.firstIdentifierOf(Locator.class), builder, readCtx);
- Assert.assertEquals(SID_A_101.firstKeyOf(Locator.class), builder.getKey());
+ Assert.assertEquals(SID_A_101.firstKeyOf(Locator.class), builder.key());
Assert.assertNotNull(customizer.getBuilder(SID_A_101.firstIdentifierOf(Locator.class)));
LocatorsBuilder parentBuilder = new LocatorsBuilder();
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java
index 419c431ed..237a158dc 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/SidCustomizerTest.java
@@ -96,7 +96,7 @@ public class SidCustomizerTest extends LocalSidRequestTest {
SidCustomizer customizer = new SidCustomizer(api, READ_REGISTRY, locatorContext);
SidBuilder builder = new SidBuilder();
customizer.readCurrentAttributes(SID_A_101, builder, readCtx);
- Assert.assertEquals(SID_A_101.firstKeyOf(Sid.class), builder.getKey());
+ Assert.assertEquals(SID_A_101.firstKeyOf(Sid.class), builder.key());
Assert.assertNotNull(builder.getEnd());
Assert.assertNotNull(customizer.getBuilder(SID_A_101));
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequestTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequestTest.java
index 404aa6b9d..68806c2af 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequestTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/sid/request/LocatorReadRequestTest.java
@@ -136,6 +136,6 @@ public class LocatorReadRequestTest extends LocalSidRequestTest {
LocatorBuilder builder = new LocatorBuilder();
request.readSpecific(ID_LOC, readCtx, builder);
- Assert.assertEquals(new LocatorKey("a::"), builder.getKey());
+ Assert.assertEquals(new LocatorKey("a::"), builder.key());
}
}
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/InterfaceCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/InterfaceCustomizerTest.java
index bc5ad681f..e97b3f800 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/InterfaceCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/InterfaceCustomizerTest.java
@@ -67,7 +67,7 @@ public class InterfaceCustomizerTest extends SteeringTest {
InterfaceBuilder builder = customizer.getBuilder(key);
customizer.readCurrentAttributes(key, builder, readCtx);
- Assert.assertEquals(L2_KEY, builder.getKey());
+ Assert.assertEquals(L2_KEY, builder.key());
Assert.assertEquals(LOCAL_0, builder.getInputInterface());
InterfacesBuilder policyBuilder = new InterfacesBuilder();
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/PrefixCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/PrefixCustomizerTest.java
index 56850078f..ab0ceea86 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/PrefixCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/read/steering/PrefixCustomizerTest.java
@@ -55,7 +55,7 @@ public class PrefixCustomizerTest extends SteeringTest {
customizer.readCurrentAttributes(key, builder, readCtx);
- Assert.assertEquals(L3_KEY, builder.getKey());
+ Assert.assertEquals(L3_KEY, builder.key());
Assert.assertEquals(IPV6_PREFIX, builder.getIpPrefix());
PrefixesBuilder policyBuilder = new PrefixesBuilder();
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java
index 998916ee1..b6162a7a5 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/util/function/LocalSidFunctionBindingRegistryTest.java
@@ -94,11 +94,11 @@ public class LocalSidFunctionBindingRegistryTest extends JvppRequestTest {
when(readCtx.getMappingContext()).thenReturn(mappingContext);
when(ctx.readAfter(FibManagementIIds.FM_FIB_TABLES.child(Table.class, TABLE_4_IPV6_KEY)))
.thenReturn(Optional.of(
- new TableBuilder().setTableId(TABLE_4_IPV6_KEY.getTableId()).setKey(TABLE_4_IPV6_KEY)
+ new TableBuilder().setTableId(TABLE_4_IPV6_KEY.getTableId()).withKey(TABLE_4_IPV6_KEY)
.setAddressFamily(TABLE_4_IPV6_KEY.getAddressFamily()).build()));
when(ctx.readAfter(FibManagementIIds.FM_FIB_TABLES.child(Table.class, TABLE_4_IPV4_KEY)))
.thenReturn(Optional.of(
- new TableBuilder().setTableId(TABLE_4_IPV4_KEY.getTableId()).setKey(TABLE_4_IPV4_KEY)
+ new TableBuilder().setTableId(TABLE_4_IPV4_KEY.getTableId()).withKey(TABLE_4_IPV4_KEY)
.setAddressFamily(TABLE_4_IPV4_KEY.getAddressFamily()).build()));
}
diff --git a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java
index 80a3149e2..846478ddf 100644
--- a/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java
+++ b/srv6/srv6-impl/src/test/java/io/fd/hc2vpp/srv6/write/policy/PolicyCustomizerTest.java
@@ -71,7 +71,7 @@ public class PolicyCustomizerTest extends JvppRequestTest {
private static final PolicyKey POLICY_KEY = new PolicyKey(1L, new IpAddress(new Ipv6Address("e::1")));
private static final KeyedInstanceIdentifier<Table, TableKey> VRF_IID =
FibManagementIIds.FM_FIB_TABLES.child(Table.class, new TableKey(Ipv6.class, TABLE_ID));
- private static final Table VRF_TABLE = new TableBuilder().setKey(VRF_IID.getKey()).setAddressFamily(Ipv6.class)
+ private static final Table VRF_TABLE = new TableBuilder().withKey(VRF_IID.getKey()).setAddressFamily(Ipv6.class)
.setTableId(TABLE_ID).setName("VRF-0").build();
@InjectTestData(resourcePath = "/named-segments.json", id = NAMED_SEG_LISTS_PATH)
diff --git a/v3po/postman_rest_collection.json b/v3po/postman_rest_collection.json
index d544ffb1e..cdfa047a1 100644
--- a/v3po/postman_rest_collection.json
+++ b/v3po/postman_rest_collection.json
@@ -1893,7 +1893,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"sub-interface\": [\r\n {\r\n \"identifier\": \"1\",\r\n \"vlan-type\": \"802dot1q\",\r\n \"tags\": {\r\n \"tag\": [\r\n {\r\n \"index\": \"0\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": \"100\"\r\n }\r\n },\r\n {\r\n \"index\": \"1\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": \"any\"\r\n }\r\n }\r\n ]\r\n },\r\n \"match\": {\r\n \"vlan-tagged\": {\r\n \"match-exact-tags\": \"true\"\r\n }\r\n },\r\n \"enabled\": \"false\"\r\n }\r\n ]\r\n}"
+ "raw": "{\r\n \"sub-interface\": [\r\n {\r\n \"identifier\": \"1\",\r\n \"vlan-type\": \"_802dot1q\",\r\n \"tags\": {\r\n \"tag\": [\r\n {\r\n \"index\": \"0\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": \"100\"\r\n }\r\n },\r\n {\r\n \"index\": \"1\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": \"any\"\r\n }\r\n }\r\n ]\r\n },\r\n \"match\": {\r\n \"vlan-tagged\": {\r\n \"match-exact-tags\": \"true\"\r\n }\r\n },\r\n \"enabled\": \"false\"\r\n }\r\n ]\r\n}"
},
"url": {
"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/GigabitEthernet0%2F9%2F0/vpp-vlan:sub-interfaces/sub-interface/1",
@@ -1933,7 +1933,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \r\n \"interface\": [\r\n {\r\n \"name\": \"GigabitEthernet0/9/0\",\r\n \"type\": \"iana-if-type:ethernetCsmacd\",\r\n \"v3po:ethernet\": {\r\n \"mtu\": 9216\r\n },\r\n \"enabled\": true,\r\n \"vpp-vlan:sub-interfaces\": {\r\n \"sub-interface\": [\r\n {\r\n \"identifier\": 1,\r\n \"vlan-type\": \"802dot1q\",\r\n \"tags\": {\r\n \"tag\": [\r\n {\r\n \"index\": 1,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": \"any\"\r\n }\r\n },\r\n {\r\n \"index\": 0,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": \"100\"\r\n }\r\n }\r\n ]\r\n },\r\n \"match\": {\r\n \"vlan-tagged\": {\r\n \"match-exact-tags\": true\r\n }\r\n },\r\n \"enabled\": false\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n \r\n}"
+ "raw": "{\r\n \r\n \"interface\": [\r\n {\r\n \"name\": \"GigabitEthernet0/9/0\",\r\n \"type\": \"iana-if-type:ethernetCsmacd\",\r\n \"v3po:ethernet\": {\r\n \"mtu\": 9216\r\n },\r\n \"enabled\": true,\r\n \"vpp-vlan:sub-interfaces\": {\r\n \"sub-interface\": [\r\n {\r\n \"identifier\": 1,\r\n \"vlan-type\": \"_802dot1q\",\r\n \"tags\": {\r\n \"tag\": [\r\n {\r\n \"index\": 1,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": \"any\"\r\n }\r\n },\r\n {\r\n \"index\": 0,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": \"100\"\r\n }\r\n }\r\n ]\r\n },\r\n \"match\": {\r\n \"vlan-tagged\": {\r\n \"match-exact-tags\": true\r\n }\r\n },\r\n \"enabled\": false\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n \r\n}"
},
"url": {
"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/GigabitEthernet0%2F9%2F0",
@@ -1970,7 +1970,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"sub-interface\": [\r\n {\r\n \"identifier\": \"1\",\r\n \"vlan-type\": \"802dot1q\",\r\n \"tags\": {\r\n \"tag\": [\r\n {\r\n \"index\": \"0\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": \"100\"\r\n }\r\n },\r\n {\r\n \"index\": \"1\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": \"any\"\r\n }\r\n }\r\n ]\r\n },\r\n \"match\": {\r\n \"vlan-tagged\": {\r\n \"match-exact-tags\": \"true\"\r\n }\r\n },\r\n \"enabled\": \"true\"\r\n }\r\n ]\r\n}"
+ "raw": "{\r\n \"sub-interface\": [\r\n {\r\n \"identifier\": \"1\",\r\n \"vlan-type\": \"_802dot1q\",\r\n \"tags\": {\r\n \"tag\": [\r\n {\r\n \"index\": \"0\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": \"100\"\r\n }\r\n },\r\n {\r\n \"index\": \"1\",\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": \"any\"\r\n }\r\n }\r\n ]\r\n },\r\n \"match\": {\r\n \"vlan-tagged\": {\r\n \"match-exact-tags\": \"true\"\r\n }\r\n },\r\n \"enabled\": \"true\"\r\n }\r\n ]\r\n}"
},
"url": {
"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/GigabitEthernet0%2F9%2F0/vpp-vlan:sub-interfaces/sub-interface/1",
@@ -2051,7 +2051,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"rewrite\": {\r\n \"vlan-type\": \"vpp-vlan:802dot1q\",\r\n \"push-tags\": [\r\n {\r\n \"index\": 0,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": 123\r\n }\r\n },\r\n {\r\n \"index\": 1,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": 456\r\n }\r\n }\r\n ]\r\n }\r\n}"
+ "raw": "{\r\n \"rewrite\": {\r\n \"vlan-type\": \"vpp-vlan:_802dot1q\",\r\n \"push-tags\": [\r\n {\r\n \"index\": 0,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": 123\r\n }\r\n },\r\n {\r\n \"index\": 1,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": 456\r\n }\r\n }\r\n ]\r\n }\r\n}"
},
"url": {
"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/GigabitEthernet0%2F9%2F0/vpp-vlan:sub-interfaces/sub-interface/1/l2/rewrite",
@@ -2135,7 +2135,7 @@
],
"body": {
"mode": "raw",
- "raw": "{\r\n \"rewrite\": {\r\n \"vlan-type\": \"vpp-vlan:802dot1q\",\r\n \"pop-tags\": \"1\",\r\n \"push-tags\": [\r\n {\r\n \"index\": 0,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": 111\r\n }\r\n },\r\n {\r\n \"index\": 1,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": 222\r\n }\r\n }\r\n ]\r\n }\r\n}"
+ "raw": "{\r\n \"rewrite\": {\r\n \"vlan-type\": \"vpp-vlan:_802dot1q\",\r\n \"pop-tags\": \"1\",\r\n \"push-tags\": [\r\n {\r\n \"index\": 0,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:s-vlan\",\r\n \"vlan-id\": 111\r\n }\r\n },\r\n {\r\n \"index\": 1,\r\n \"dot1q-tag\": {\r\n \"tag-type\": \"dot1q-types:c-vlan\",\r\n \"vlan-id\": 222\r\n }\r\n }\r\n ]\r\n }\r\n}"
},
"url": {
"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/GigabitEthernet0%2F9%2F0/vpp-vlan:sub-interfaces/sub-interface/1/l2/rewrite",
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java
index 33bd2c841..35cbd9187 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfaces/InterfaceRoutingCustomizer.java
@@ -89,7 +89,7 @@ public class InterfaceRoutingCustomizer extends RoutingCustomizer
if (interfaceData.isPresent()) {
final java.util.Optional<Interface1> augData = java.util.Optional.of(interfaceData.get())
- .map(iface -> iface.getAugmentation(Interface1.class));
+ .map(iface -> iface.augmentation(Interface1.class));
final boolean v4NotPresent =
augData.map(Interface1::getIpv4).map(Ipv4::getAddress).map(List::isEmpty).orElse(true);
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RewriteCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RewriteCustomizer.java
index 7eeca2435..ea0506ca7 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RewriteCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/RewriteCustomizer.java
@@ -132,7 +132,7 @@ public class RewriteCustomizer
private PushTags buildTag(final short index, final Class<? extends Dot1qTagVlanType> tagType, final int vlanId) {
final PushTagsBuilder tag = new PushTagsBuilder();
tag.setIndex(index);
- tag.setKey(new PushTagsKey(index));
+ tag.withKey(new PushTagsKey(index));
final Dot1qTagBuilder dtag = new Dot1qTagBuilder();
dtag.setTagType(tagType);
dtag.setVlanId(new Dot1qVlanId(vlanId));
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceCustomizer.java
index 50e866fa0..b6baf3407 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/SubInterfaceCustomizer.java
@@ -98,7 +98,7 @@ public class SubInterfaceCustomizer extends FutureJVppCustomizer
final Dot1qTag.VlanId vlanId) {
TagBuilder tag = new TagBuilder();
tag.setIndex(index);
- tag.setKey(new TagKey(index));
+ tag.withKey(new TagKey(index));
final Dot1qTagBuilder dtag = new Dot1qTagBuilder();
dtag.setTagType(tagType);
dtag.setVlanId(vlanId);
@@ -157,7 +157,7 @@ public class SubInterfaceCustomizer extends FutureJVppCustomizer
checkState(isSubInterface(iface), "Interface returned by the VPP is not a sub-interface");
builder.setIdentifier((long) iface.subId);
- builder.setKey(new SubInterfaceKey(builder.getIdentifier()));
+ builder.withKey(new SubInterfaceKey(builder.getIdentifier()));
// sub-interface-base-attributes:
builder.setTags(readTags(iface));
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java
index 0a6537bc0..de890e044 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/AbstractMirroredInterfacesCustomizer.java
@@ -88,7 +88,7 @@ abstract class AbstractMirroredInterfacesCustomizer
ifcContext.getName(detail.swIfIndexFrom, ctx.getMappingContext());
return new MirroredInterfaceBuilder()
.setIfaceRef(interfaceName)
- .setKey(new MirroredInterfaceKey(interfaceName))
+ .withKey(new MirroredInterfaceKey(interfaceName))
.setState(SpanState.forValue(detail.state))
.build();
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java
index f70f4f5a1..5d84a8d7e 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/InterfaceMirroredInterfacesCustomizer.java
@@ -63,7 +63,7 @@ public class InterfaceMirroredInterfacesCustomizer extends AbstractMirroredInter
.stream()
.map(mirroredInterface -> new MirroredInterfaceBuilder()
.setState(mirroredInterface.getState())
- .setKey(new MirroredInterfaceKey(mirroredInterface.getKey().getIfaceRef()))
+ .withKey(new MirroredInterfaceKey(mirroredInterface.key().getIfaceRef()))
.setIfaceRef(mirroredInterface.getIfaceRef())
.build())
.collect(Collectors.toList()))
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java
index 3cbeceeb3..5b4315719 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/span/SubInterfaceMirroredInterfacesCustomizer.java
@@ -65,7 +65,7 @@ public class SubInterfaceMirroredInterfacesCustomizer extends AbstractMirroredIn
Optional.ofNullable(readValue.getMirroredInterface()).orElse(Collections.emptyList())
.stream()
.map(mirroredInterface -> new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.span.attributes.mirrored.interfaces.MirroredInterfaceBuilder()
- .setKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.span.attributes.mirrored.interfaces.MirroredInterfaceKey(mirroredInterface.getKey().getIfaceRef()))
+ .withKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev180703.span.attributes.mirrored.interfaces.MirroredInterfaceKey(mirroredInterface.key().getIfaceRef()))
.setIfaceRef(mirroredInterface.getIfaceRef())
.setState(mirroredInterface.getState())
.build())
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java
index 0ae2a86fe..1723190af 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2/BridgeDomainCustomizer.java
@@ -127,7 +127,7 @@ public class BridgeDomainCustomizer extends FutureJVppCustomizer
checkReferenceExist(id, Optional.ofNullable(after.get().getInterface())
.orElse(Collections.emptyList())
.stream()
- .map(iface -> Optional.ofNullable(iface.getAugmentation(VppInterfaceAugmentation.class))
+ .map(iface -> Optional.ofNullable(iface.augmentation(VppInterfaceAugmentation.class))
.map(VppInterfaceAugmentation::getL2)
.map(L2ConfigAttributes::getInterconnection)
.orElse(null))
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java
index 772f6bf8e..ed286317b 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizer.java
@@ -97,7 +97,7 @@ public final class L2FibEntryCustomizer extends FutureJVppCustomizer
}
builder.setStaticConfig(byteToBoolean(entry.staticMac));
builder.setPhysAddress(key.getPhysAddress());
- builder.setKey(key);
+ builder.withKey(key);
} catch (Exception e) {
throw new ReadFailedException(id, e);
}
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceCustomizerTest.java
index c4d8eb607..7c7332d5d 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfaces/SubInterfaceCustomizerTest.java
@@ -87,7 +87,7 @@ public class SubInterfaceCustomizerTest extends WriterCustomizerTest {
final Dot1qTag.VlanId vlanId) {
TagBuilder tag = new TagBuilder();
tag.setIndex(index);
- tag.setKey(new TagKey(index));
+ tag.withKey(new TagKey(index));
final Dot1qTagBuilder dtag = new Dot1qTagBuilder();
dtag.setTagType(tagType);
dtag.setVlanId(vlanId);
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java
index 37a0604a4..92fa5ae0f 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/interfacesstate/span/MirroredInterfacesCustomizerTest.java
@@ -117,7 +117,7 @@ public class MirroredInterfacesCustomizerTest
private MirroredInterface mirroredInterface(final String ifaceName, final SpanState state) {
return new MirroredInterfaceBuilder()
.setIfaceRef(ifaceName)
- .setKey(new MirroredInterfaceKey(ifaceName))
+ .withKey(new MirroredInterfaceKey(ifaceName))
.setState(state)
.build();
}
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java
index b785142b0..94397a262 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/ArpTerminationTableEntryCustomizerTest.java
@@ -112,7 +112,7 @@ public class ArpTerminationTableEntryCustomizerTest extends WriterCustomizerTest
private ArpTerminationTableEntry generateArpEntry(final IpAddressNoZone ipAddress, final PhysAddress physAddress) {
final ArpTerminationTableEntryBuilder entry = new ArpTerminationTableEntryBuilder();
- entry.setKey(new ArpTerminationTableEntryKey(ipAddress, physAddress));
+ entry.withKey(new ArpTerminationTableEntryKey(ipAddress, physAddress));
entry.setPhysAddress(physAddress);
entry.setIpAddress(ipAddress);
return entry.build();
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java
index d856a755d..4201303f4 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2/L2FibEntryCustomizerTest.java
@@ -110,7 +110,7 @@ public class L2FibEntryCustomizerTest extends WriterCustomizerTest {
private L2FibEntry generateL2FibFilterEntry(final PhysAddress address) {
final L2FibEntryBuilder entry = new L2FibEntryBuilder();
- entry.setKey(new L2FibEntryKey(address));
+ entry.withKey(new L2FibEntryKey(address));
entry.setPhysAddress(address);
entry.setStaticConfig(true);
entry.setBridgedVirtualInterface(false);
@@ -120,7 +120,7 @@ public class L2FibEntryCustomizerTest extends WriterCustomizerTest {
private L2FibEntry generateL2FibForwardEntry(final PhysAddress address) {
final L2FibEntryBuilder entry = new L2FibEntryBuilder();
- entry.setKey(new L2FibEntryKey(address));
+ entry.withKey(new L2FibEntryKey(address));
entry.setPhysAddress(address);
entry.setStaticConfig(true);
entry.setBridgedVirtualInterface(false);
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java
index b493933e3..5b7cf09f9 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2FibEntryCustomizerTest.java
@@ -100,7 +100,7 @@ public class L2FibEntryCustomizerTest extends ListReaderCustomizerTest<L2FibEntr
verify(builder).setOutgoingInterface(IFACE_NAME);
verify(builder).setStaticConfig(false);
verify(builder).setPhysAddress(address);
- verify(builder).setKey(new L2FibEntryKey(address));
+ verify(builder).withKey(new L2FibEntryKey(address));
}
private L2FibTableDetails generateL2FibEntry(final byte[] mac) {
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java
index 1f90280b2..d1fcb17a2 100644
--- a/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java
+++ b/v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/l2state/L2StateTest.java
@@ -202,7 +202,7 @@ public class L2StateTest implements FutureProducer, NamingContextHelper {
assertTrue(read.isPresent());
assertEquals(readRoot.getBridgeDomain().stream().filter(
- input -> input.getKey().getName().equals(bdName)).findFirst().get(),
+ input -> input.key().getName().equals(bdName)).findFirst().get(),
read.get());
}
diff --git a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
index 509295cb1..7b902207a 100644
--- a/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
+++ b/vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/read/ClassifyTableReader.java
@@ -107,7 +107,7 @@ public class ClassifyTableReader extends FutureJVppCustomizer
// mandatory values:
builder.setName(tableName);
- builder.setKey(key);
+ builder.withKey(key);
builder.setNbuckets(UnsignedInts.toLong(reply.nbuckets));
builder.setSkipNVectors(UnsignedInts.toLong(reply.skipNVectors));
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
index bd627d5b8..cd6af78a5 100644
--- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
+++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyTableWriterTest.java
@@ -57,7 +57,7 @@ public class ClassifyTableWriterTest extends WriterCustomizerTest {
final ClassifyTableBuilder builder = new ClassifyTableBuilder();
builder.setName(name);
builder.setClassifierNode(new VppNodeName("ip4-classifier"));
- builder.setKey(new ClassifyTableKey(name));
+ builder.withKey(new ClassifyTableKey(name));
builder.setSkipNVectors(0L);
builder.setNbuckets(2L);
builder.setMemorySize(2L << 20);
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java
index fbf8900f6..3f5a56fb2 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/AddressTranslator.java
@@ -85,7 +85,7 @@ public interface AddressTranslator extends Ipv4Translator, Ipv6Translator, MacTr
// safest way to compare addresses - prevents returning false while using different types from hierarchy
// Ex. Key for MapResolver contains Ipv4Address as value but we translate addresses from binary data to Ipv4AddressNoZone
default boolean addressesEqual(final IpAddress left, final IpAddress right) {
- return Arrays.equals(left.getValue(), right.getValue());
+ return left.stringValue().equalsIgnoreCase(right.stringValue());
}
/**
diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
index 4d0e7a98f..9560e48b1 100644
--- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
+++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/MultiNamingContext.java
@@ -116,7 +116,7 @@ public class MultiNamingContext {
// overrides old data with new(without removed child)
mappingContext.put(getMappingIid(parentName), new MappingBuilder()
.setName(mapping.getName())
- .setKey(mapping.getKey())
+ .withKey(mapping.key())
.setValue(mapping.getValue()
.stream()
.filter(value -> !value.getName().equals(childName))
diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
index a111796a1..21a2d621b 100644
--- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
+++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/MultiNamingContextTest.java
@@ -194,7 +194,7 @@ public class MultiNamingContextTest implements InjectablesProcessor {
}
private Value valueFor(final String name, final int index) {
- return new ValueBuilder().setName(name).setIndex(index).setKey(new ValueKey(name)).build();
+ return new ValueBuilder().setName(name).setIndex(index).withKey(new ValueKey(name)).build();
}
}
diff --git a/vpp-integration/api-docs/core/pom.xml b/vpp-integration/api-docs/core/pom.xml
index d0b7454c8..aa2fc6316 100644
--- a/vpp-integration/api-docs/core/pom.xml
+++ b/vpp-integration/api-docs/core/pom.xml
@@ -92,6 +92,10 @@
<version>${honeycomb.version}</version>
</dependency>
<dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>yang-binding</artifactId>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
index 9fd5976b7..f12c2e606 100644
--- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
+++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
@@ -41,7 +41,7 @@ class ModelTypeIndex {
ModelTypeIndex() throws IOException {
namespaceToModuleIndex = collectAllModules(this.getClass().getClassLoader())
.stream()
- .collect(toMap(YangModelKey::new, YangModuleInfo::getName));
+ .collect(toMap(YangModelKey::new, yangModuleInfo -> yangModuleInfo.getName().toString()));
}
private static YangModelBindingProvider getModuleBindingProviderInstance(final Class<?> aClass) {
diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
index 2bc5bc5da..a2d4b9d06 100644
--- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
+++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
@@ -14,15 +14,20 @@
* limitations under the License.
*/
-package io.fd.hc2vpp.docs.core;import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+package io.fd.hc2vpp.docs.core;
+
+import java.util.Optional;
+import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+import org.opendaylight.yangtools.yang.common.Revision;
final class YangModelKey {
private final String namespace;
private final String revision;
YangModelKey(final YangModuleInfo moduleInfo) {
- this.namespace = moduleInfo.getNamespace();
- this.revision = moduleInfo.getRevision();
+ this.namespace = moduleInfo.getName().getNamespace().toString();
+ Optional<Revision> optRevision = moduleInfo.getName().getRevision();
+ this.revision = optRevision.isPresent() ? optRevision.get().toString() : "";
}
YangModelKey(final String namespace, final String revision) {