diff options
author | Michal Cmarada <michal.cmarada@pantheon.tech> | 2018-09-25 11:21:09 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2018-09-28 12:54:22 +0200 |
commit | 5bbd9feb84660d06fe635a0cd4cbdf45b110665c (patch) | |
tree | 934a3fb9159f832cce5cfbbfd03f9d68c306bf33 /srv6/srv6-impl/src/main | |
parent | 9b0967210e3e50d0b52475cfc02e636dbfa28421 (diff) |
Fix bugs after bumping to Fluorine ODL dependencies (HONEYCOMB-433)
Change-Id: I99b630f97144770849679a04efccaf7fc9868cb6
Signed-off-by: Michal Cmarada <michal.cmarada@pantheon.tech>
Diffstat (limited to 'srv6/srv6-impl/src/main')
11 files changed, 16 insertions, 16 deletions
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); |