summaryrefslogtreecommitdiffstats
path: root/acl
diff options
context:
space:
mode:
Diffstat (limited to 'acl')
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/AclReaderFactory.java11
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/InterfaceAclReaderFactory.java2
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/InterfaceAclWriterFactory.java15
-rw-r--r--acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/VppAclWriterFactory.java8
4 files changed, 18 insertions, 18 deletions
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/AclReaderFactory.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/AclReaderFactory.java
index 90c4afe83..34352e8f3 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/AclReaderFactory.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/AclReaderFactory.java
@@ -56,15 +56,8 @@ public class AclReaderFactory implements ReaderFactory, AclFactory {
public void init(@Nonnull final ModifiableReaderRegistryBuilder registry) {
registry.addStructuralReader(ACLS_ID, AccessListsBuilder.class);
- // TODO(HONEYCOMB-331): initializer is not registered correctly when subtreeAddBefore is used,
- // enable after fixing infra issue:
-
-// registry.subtreeAddBefore(vppAclChildren(InstanceIdentifier.create(Acl.class)),
-// new GenericInitListReader<>(ACL_ID,
-// new AclCustomizer(futureAclFacade, standardAclContext, macIpAClContext)),
-// ImmutableSet.of(ACL_INGRESS_IID, ACL_EGRESS_IID));
-
- registry.addBefore(new GenericInitListReader<>(ACL_ID,
+ registry.subtreeAddBefore(vppAclChildren(InstanceIdentifier.create(Acl.class)),
+ new GenericInitListReader<>(ACL_ID,
new AclCustomizer(futureAclFacade, standardAclContext, macIpAClContext)),
ImmutableSet.of(ACL_INGRESS_IID, ACL_EGRESS_IID));
}
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/InterfaceAclReaderFactory.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/InterfaceAclReaderFactory.java
index 5b2c45088..173223648 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/InterfaceAclReaderFactory.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/read/factory/InterfaceAclReaderFactory.java
@@ -65,7 +65,7 @@ public class InterfaceAclReaderFactory implements ReaderFactory {
IFC_ID = InstanceIdentifier.create(InterfacesState.class).child(Interface.class);
private static final InstanceIdentifier<VppAclInterfaceStateAugmentation> VPP_ACL_AUG_IID =
IFC_ID.augmentation(VppAclInterfaceStateAugmentation.class);
- private static final InstanceIdentifier<Acl> ACL_IID = VPP_ACL_AUG_IID.child(Acl.class);
+ static final InstanceIdentifier<Acl> ACL_IID = VPP_ACL_AUG_IID.child(Acl.class);
static final InstanceIdentifier<Ingress> ACL_INGRESS_IID = ACL_IID.child(Ingress.class);
static final InstanceIdentifier<Egress> ACL_EGRESS_IID = ACL_IID.child(Egress.class);
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/InterfaceAclWriterFactory.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/InterfaceAclWriterFactory.java
index 6598aae9c..12be40a14 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/InterfaceAclWriterFactory.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/InterfaceAclWriterFactory.java
@@ -36,21 +36,24 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class InterfaceAclWriterFactory extends AbstractAclWriterFactory implements WriterFactory {
- private static final InstanceIdentifier<Acl> ACL_IID =
+ static final InstanceIdentifier<Acl> ACL_IID =
InstanceIdentifier.create(Interfaces.class).child(Interface.class)
.augmentation(VppAclInterfaceAugmentation.class).child(Acl.class);
+ private static final InstanceIdentifier<Interface> IFC_ID =
+ InstanceIdentifier.create(Interfaces.class).child(Interface.class);
+
@Override
public void init(@Nonnull final ModifiableWriterRegistryBuilder registry) {
- registry.subtreeAdd(aclHandledChildren(InstanceIdentifier.create(Acl.class)),
+ registry.subtreeAddAfter(aclHandledChildren(InstanceIdentifier.create(Acl.class)),
new GenericWriter<>(ACL_IID,
- new InterfaceAclCustomizer(futureAclFacade, interfaceContext, standardAclContext)));
+ new InterfaceAclCustomizer(futureAclFacade, interfaceContext, standardAclContext)), IFC_ID);
- registry.add(new GenericWriter<>(ACL_IID.child(Ingress.class).child(VppMacipAcl.class),
- new InterfaceAclMacIpCustomizer(futureAclFacade, macIpAClContext, interfaceContext)));
+ registry.addAfter(new GenericWriter<>(ACL_IID.child(Ingress.class).child(VppMacipAcl.class),
+ new InterfaceAclMacIpCustomizer(futureAclFacade, macIpAClContext, interfaceContext)), IFC_ID);
}
- private Set<InstanceIdentifier<?>> aclHandledChildren(final InstanceIdentifier<Acl> parentId) {
+ static Set<InstanceIdentifier<?>> aclHandledChildren(final InstanceIdentifier<Acl> parentId) {
return ImmutableSet.of(parentId.child(Ingress.class),
parentId.child(Ingress.class).child(VppAcls.class),
parentId.child(Egress.class),
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/VppAclWriterFactory.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/VppAclWriterFactory.java
index bf855ef26..2b95f0b60 100644
--- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/VppAclWriterFactory.java
+++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/factory/VppAclWriterFactory.java
@@ -16,6 +16,9 @@
package io.fd.hc2vpp.acl.write.factory;
+import static io.fd.hc2vpp.acl.write.factory.InterfaceAclWriterFactory.ACL_IID;
+import static io.fd.hc2vpp.acl.write.factory.InterfaceAclWriterFactory.aclHandledChildren;
+
import io.fd.hc2vpp.acl.util.factory.AclFactory;
import io.fd.hc2vpp.acl.write.VppAclCustomizer;
import io.fd.honeycomb.translate.impl.write.GenericListWriter;
@@ -32,8 +35,9 @@ public class VppAclWriterFactory extends AbstractAclWriterFactory implements Wri
public void init(@Nonnull final ModifiableWriterRegistryBuilder registry) {
final InstanceIdentifier<AccessLists> rootNode = InstanceIdentifier.create(AccessLists.class);
- registry.subtreeAdd(vppAclChildren(InstanceIdentifier.create(Acl.class)),
+ registry.subtreeAddBefore(vppAclChildren(InstanceIdentifier.create(Acl.class)),
new GenericListWriter<>(rootNode.child(Acl.class),
- new VppAclCustomizer(futureAclFacade, standardAclContext, macIpAClContext)));
+ new VppAclCustomizer(futureAclFacade, standardAclContext, macIpAClContext)),
+ aclHandledChildren(ACL_IID));
}
}