summaryrefslogtreecommitdiffstats
path: root/acl/acl-impl/src
diff options
context:
space:
mode:
authorMichal Cmarada <michal.cmarada@pantheon.tech>2018-09-25 11:21:09 +0200
committerMichal Cmarada <mcmarada@cisco.com>2018-09-28 12:54:22 +0200
commit5bbd9feb84660d06fe635a0cd4cbdf45b110665c (patch)
tree934a3fb9159f832cce5cfbbfd03f9d68c306bf33 /acl/acl-impl/src
parent9b0967210e3e50d0b52475cfc02e636dbfa28421 (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 'acl/acl-impl/src')
-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
5 files changed, 10 insertions, 10 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