HONEYCOMB-234: update YANG model to support egress ACLs 01/3201/4
authorMarek Gradzki <mgradzki@cisco.com>
Fri, 30 Sep 2016 10:28:28 +0000 (12:28 +0200)
committerMarek Gradzki <mgradzki@cisco.com>
Fri, 30 Sep 2016 12:55:31 +0000 (14:55 +0200)
- marks existing ACL support as ingress
- updates postman collection

Change-Id: I7ae39cb6698d9aafbe932d57725f138194b52e70
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
38 files changed:
v3po/api/src/main/yang/v3po.yang
v3po/api/src/main/yang/vpp-vlan.yang
v3po/postman_rest_collection.json
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/AclWriterFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/IetfAClWriterProvider.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceStateAugmentationReaderFactory.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/SubInterfaceInitializationUtils.java
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAclWriter.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AclWriter.java with 94% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AbstractAceWriter.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AbstractAceWriter.java with 99% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceEthWriter.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceEthWriter.java with 98% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4Writer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceIp4Writer.java with 99% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp6Writer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceIp6Writer.java with 99% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceWriter.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceWriter.java with 96% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AclCustomizer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclCustomizer.java with 86% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AclWriter.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java with 98% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/IetfAClWriter.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAClWriter.java with 98% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/IetfAclCustomizer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAclCustomizer.java with 88% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/SubInterfaceAclCustomizer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceAclCustomizer.java with 89% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/SubInterfaceIetfAclCustomizer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/acl/SubInterfaceIetfAclCustomizer.java with 91% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/acl/ingress/AclCustomizer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/AclCustomizer.java with 86% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/acl/ingress/AclReader.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/AclReader.java with 97% similarity]
v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/acl/ingress/SubInterfaceAclCustomizer.java [moved from v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceAclCustomizer.java with 88% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/AclCustomizerTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AclWriterTest.java
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceEthWriterTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceEthWriterTest.java with 98% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp4WriterTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceIp4WriterTest.java with 93% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIp6WriterTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceIp6WriterTest.java with 94% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/AceIpWriterTestUtils.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/AceIpWriterTestUtils.java with 95% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/IetfAclCustomizerTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/IetfAclCustomizerTest.java with 94% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/SubInterfaceAclCustomizerTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/SubInterfaceAclCustomizerTest.java with 92% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/ingress/SubInterfaceIetfAclCustomizerTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfaces/acl/SubInterfaceIetfAclCustomizerTest.java with 92% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/acl/ingress/AclCustomizerTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/AclCustomizerTest.java with 84% similarity]
v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/acl/ingress/SubInterfaceAclCustomizerTest.java [moved from v3po/v3po2vpp/src/test/java/io/fd/honeycomb/translate/v3po/interfacesstate/SubInterfaceAclCustomizerTest.java with 87% similarity]

index bb2cfe5..96844b8 100644 (file)
@@ -531,11 +531,21 @@ module v3po {
     }
 
     container acl {
-      uses acl-base-attributes;
+      container ingress {
+        uses acl-base-attributes;
+      }
+      container egress {
+        uses acl-base-attributes;
+      }
     }
 
     container ietf-acl {
-      uses ietf-acl-base-attributes;
+      container ingress {
+        uses ietf-acl-base-attributes;
+      }
+      container egress {
+        uses ietf-acl-base-attributes;
+      }
     }
   }
 
@@ -611,11 +621,21 @@ module v3po {
     }
 
     container acl {
-      uses acl-base-attributes;
+      container ingress {
+        uses acl-base-attributes;
+      }
+      container egress {
+        uses acl-base-attributes;
+      }
     }
 
     container ietf-acl {
-      uses ietf-acl-base-attributes;
+      container ingress {
+        uses ietf-acl-base-attributes;
+      }
+      container egress {
+        uses ietf-acl-base-attributes;
+      }
     }
   }
 
index 15c2af2..95a7709 100644 (file)
@@ -160,11 +160,21 @@ module vpp-vlan {
     }
 
     container acl {
-      uses v3po:acl-base-attributes;
+      container ingress {
+        uses v3po:acl-base-attributes;
+      }
+      container egress {
+        uses v3po:acl-base-attributes;
+      }
     }
 
     container ietf-acl {
-      uses v3po:ietf-acl-base-attributes;
+      container ingress {
+        uses v3po:ietf-acl-base-attributes;
+      }
+      container egress {
+        uses v3po:ietf-acl-base-attributes;
+      }
     }
   }
 
index fc2d143..920fed9 100644 (file)
                {
                        "id": "17b4b10b-83da-7cdd-d291-16f8367b7783",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/v3po:ietf-acl/access-lists/acl/ietf-access-control-list:ipv4-acl/acl3",
+                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/ietf-acl/ingress/access-lists/acl/ietf-access-control-list:ipv4-acl/acl3",
                        "preRequestScript": "",
                        "pathVariables": {},
                        "method": "PUT",
                {
                        "id": "24ac98f0-1556-e623-ec87-1c2d7f4f089c",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/v3po:acl",
+                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/acl/ingress",
                        "preRequestScript": "",
                        "pathVariables": {},
                        "method": "PUT",
                        "collectionId": "5bad4634-e5cf-900e-9733-0976aa9bea64",
                        "responses": [],
                        "folder": "d47d6b3b-4c3f-7671-5bba-447d6c59ea3b",
-                       "rawModeData": "{\n    \"v3po:acl\": {\n      \"l2-acl\": {\n        \"classify-table\": \"table0\"\n      },\n      \"ip4-acl\": {\n        \"classify-table\": \"table0\"\n      }\n    }\n}"
+                       "rawModeData": "{\n    \"ingress\": {\n      \"l2-acl\": {\n        \"classify-table\": \"table0\"\n      },\n      \"ip4-acl\": {\n        \"classify-table\": \"table0\"\n      }\n    }\n}"
                },
                {
                        "id": "24fdd76e-e90b-d552-c0d1-87a745a5ac6f",
                {
                        "id": "46c3bf20-4abd-07f8-3d74-7fd573ebb970",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/v3po:ietf-acl",
+                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/ietf-acl/ingress",
                        "preRequestScript": "",
                        "pathVariables": {},
                        "method": "PUT",
                        "description": "Creates chain of classfy tabless/sessions in VPP and assigns them to local0 interface.\n\nCan be verified with:\nvppctl show classify table verbose\n\nthen:\nvppctl show inacl type l2",
                        "collectionId": "5bad4634-e5cf-900e-9733-0976aa9bea64",
                        "responses": [],
-                       "rawModeData": "{\n    \"v3po:ietf-acl\": {\n      \"access-lists\": {\n        \"acl\": [\n            {\n                \"type\" : \"ietf-access-control-list:eth-acl\",\n                \"name\" : \"acl1\"\n            },\n            {\n                \"type\" : \"ietf-access-control-list:eth-acl\",\n                \"name\" : \"acl2\"\n            }\n        ]\n      }\n    }\n}",
+                       "rawModeData": "{\n    \"ingress\": {\n      \"access-lists\": {\n        \"acl\": [\n            {\n                \"type\" : \"ietf-access-control-list:eth-acl\",\n                \"name\" : \"acl1\"\n            },\n            {\n                \"type\" : \"ietf-access-control-list:eth-acl\",\n                \"name\" : \"acl2\"\n            }\n        ]\n      }\n    }\n}",
                        "folder": "c05d7211-11b0-5688-2079-afa51196045c"
                },
                {
                {
                        "id": "52d38df8-8d85-d6f0-dccd-cbd8544631f9",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/v3po:ietf-acl/access-lists/acl/ietf-access-control-list:ipv6-acl/acl4",
+                       "url": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/ietf-acl/ingress/access-lists/acl/ietf-access-control-list:ipv6-acl/acl4",
                        "preRequestScript": "",
                        "pathVariables": {},
                        "method": "PUT",
index 21bc2e6..ef0fc7e 100644 (file)
@@ -21,7 +21,7 @@ import static io.fd.honeycomb.translate.v3po.SubinterfaceAugmentationWriterFacto
 
 import com.google.common.collect.Sets;
 import io.fd.honeycomb.translate.impl.write.GenericListWriter;
-import io.fd.honeycomb.translate.v3po.interfaces.acl.AclWriter;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAclWriter;
 import io.fd.honeycomb.translate.write.WriterFactory;
 import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
 import javax.annotation.Nonnull;
@@ -48,7 +48,7 @@ public final class AclWriterFactory implements WriterFactory {
         final InstanceIdentifier<Matches> matchesId = aceId.child(Matches.class);
 
         registry.subtreeAddBefore(Sets.newHashSet(aceId, actionsId, matchesId),
-            new GenericListWriter<>(ACL_ID, new AclWriter()),
+            new GenericListWriter<>(ACL_ID, new IetfAclWriter()),
             Sets.newHashSet(IETF_ACL_ID, SUBIF_IETF_ACL_ID));
     }
 }
index 6838760..8e001b7 100644 (file)
@@ -18,7 +18,7 @@ package io.fd.honeycomb.translate.v3po;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;
-import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAClWriter;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.IetfAClWriter;
 import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 
 class IetfAClWriterProvider implements Provider<IetfAClWriter> {
index 3aafea2..0a94a1b 100644 (file)
@@ -23,9 +23,9 @@ import io.fd.honeycomb.translate.impl.read.GenericListReader;
 import io.fd.honeycomb.translate.impl.read.GenericReader;
 import io.fd.honeycomb.translate.read.ReaderFactory;
 import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
-import io.fd.honeycomb.translate.v3po.interfacesstate.AclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.EthernetCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.GreCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.acl.ingress.AclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.InterfaceCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.L2Customizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.ProxyArpCustomizer;
@@ -37,8 +37,9 @@ import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4AddressCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4Customizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4NeighbourCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv6Customizer;
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.honeycomb.translate.vpp.util.NamingContext;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
@@ -54,6 +55,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip6Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.AclBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Ethernet;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Gre;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2;
@@ -62,8 +64,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VhostUser;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Vxlan;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VxlanGpe;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.acl.Ingress;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 
 public final class InterfacesStateReaderFactory implements ReaderFactory {
 
@@ -74,7 +76,7 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
     private final FutureJVppCore jvpp;
 
     static final InstanceIdentifier<InterfacesState> IFC_STATE_ID =
-            InstanceIdentifier.create(InterfacesState.class);
+        InstanceIdentifier.create(InterfacesState.class);
     static final InstanceIdentifier<Interface> IFC_ID = IFC_STATE_ID.child(Interface.class);
 
     @Inject
@@ -127,30 +129,40 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
     private void initVppIfcAugmentationReaders(final ModifiableReaderRegistryBuilder registry,
                                                final InstanceIdentifier<Interface> ifcId) {
         //   VppInterfaceStateAugmentation
-        final InstanceIdentifier<VppInterfaceStateAugmentation> vppIfcAugId = ifcId.augmentation(VppInterfaceStateAugmentation.class);
+        final InstanceIdentifier<VppInterfaceStateAugmentation> vppIfcAugId =
+            ifcId.augmentation(VppInterfaceStateAugmentation.class);
         registry.addStructuralReader(vppIfcAugId, VppInterfaceStateAugmentationBuilder.class);
         //    Ethernet
-        registry.add(new GenericReader<>(vppIfcAugId.child(Ethernet.class), new EthernetCustomizer(jvpp, ifcNamingCtx)));
+        registry
+            .add(new GenericReader<>(vppIfcAugId.child(Ethernet.class), new EthernetCustomizer(jvpp, ifcNamingCtx)));
         //    Tap
         registry.add(new GenericReader<>(vppIfcAugId.child(Tap.class), new TapCustomizer(jvpp, ifcNamingCtx)));
         //    VhostUser
-        registry.add(new GenericReader<>(vppIfcAugId.child(VhostUser.class), new VhostUserCustomizer(jvpp, ifcNamingCtx)));
+        registry
+            .add(new GenericReader<>(vppIfcAugId.child(VhostUser.class), new VhostUserCustomizer(jvpp, ifcNamingCtx)));
         //    Vxlan
         registry.add(new GenericReader<>(vppIfcAugId.child(Vxlan.class), new VxlanCustomizer(jvpp, ifcNamingCtx)));
         //    VxlanGpe
-        registry.add(new GenericReader<>(vppIfcAugId.child(VxlanGpe.class), new VxlanGpeCustomizer(jvpp, ifcNamingCtx)));
+        registry
+            .add(new GenericReader<>(vppIfcAugId.child(VxlanGpe.class), new VxlanGpeCustomizer(jvpp, ifcNamingCtx)));
         //    Gre
         registry.add(new GenericReader<>(vppIfcAugId.child(Gre.class), new GreCustomizer(jvpp, ifcNamingCtx)));
         //    L2
-        registry.add(new GenericReader<>(vppIfcAugId.child(L2.class), new L2Customizer(jvpp, ifcNamingCtx, bdNamingCtx)));
-        //    Acl(Subtree)
-        final InstanceIdentifier<Acl> aclIdRelative = InstanceIdentifier.create(Acl.class);
+        registry
+            .add(new GenericReader<>(vppIfcAugId.child(L2.class), new L2Customizer(jvpp, ifcNamingCtx, bdNamingCtx)));
+        //    Acl(Structural)
+        final InstanceIdentifier<Acl> aclIid = vppIfcAugId.child(Acl.class);
+        registry.addStructuralReader(aclIid, AclBuilder.class);
+        //    Ingress(Subtree)
+        final InstanceIdentifier<Ingress> ingressIdRelative = InstanceIdentifier.create(Ingress.class);
         registry.subtreeAdd(
-                Sets.newHashSet(aclIdRelative.child(L2Acl.class), aclIdRelative.child(Ip4Acl.class), aclIdRelative.child(Ip6Acl.class)),
-                new GenericReader<>(vppIfcAugId.child(Acl.class), new AclCustomizer(jvpp, ifcNamingCtx,
+            Sets.newHashSet(ingressIdRelative.child(L2Acl.class), ingressIdRelative.child(Ip4Acl.class),
+                ingressIdRelative.child(Ip6Acl.class)),
+            new GenericReader<>(aclIid.child(Ingress.class),
+                new AclCustomizer(jvpp, ifcNamingCtx,
                     classifyContext)));
         //   Proxy ARP
         registry.add(new GenericReader<>(vppIfcAugId.child(ProxyArp.class), new ProxyArpCustomizer(jvpp,
-                ifcNamingCtx)));
+            ifcNamingCtx)));
     }
 }
index a71e050..f12f7b6 100644 (file)
@@ -24,7 +24,6 @@ import com.google.inject.Inject;
 import com.google.inject.name.Named;
 import io.fd.honeycomb.translate.impl.write.GenericListWriter;
 import io.fd.honeycomb.translate.impl.write.GenericWriter;
-import io.fd.honeycomb.translate.v3po.interfaces.AclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.EthernetCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.GreCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.InterfaceCustomizer;
@@ -35,16 +34,18 @@ import io.fd.honeycomb.translate.v3po.interfaces.TapCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.VhostUserCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.VxlanCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.VxlanGpeCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAClWriter;
-import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAclCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.AclCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.IetfAClWriter;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.IetfAclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4AddressCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4Customizer;
 import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4NeighbourCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv6Customizer;
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.write.WriterFactory;
 import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import java.util.Set;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
@@ -69,8 +70,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VhostUser;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Vxlan;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpe;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.acl.Ingress;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 
 public final class InterfacesWriterFactory implements WriterFactory {
 
@@ -79,8 +80,12 @@ public final class InterfacesWriterFactory implements WriterFactory {
     public static final InstanceIdentifier<VppInterfaceAugmentation> VPP_IFC_AUG_ID =
         IFC_ID.augmentation(VppInterfaceAugmentation.class);
     public static final InstanceIdentifier<Acl> ACL_ID = VPP_IFC_AUG_ID.child(Acl.class);
+    public static final InstanceIdentifier<Ingress> INGRESS_ACL_ID = ACL_ID.child(Ingress.class);
     public static final InstanceIdentifier<L2> L2_ID = VPP_IFC_AUG_ID.child(L2.class);
     public static final InstanceIdentifier<IetfAcl> IETF_ACL_ID = VPP_IFC_AUG_ID.child(IetfAcl.class);
+    public static final InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ietf.acl.Ingress>
+        INGRESS_IETF_ACL_ID = IETF_ACL_ID.child(
+        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ietf.acl.Ingress.class);
 
     private final FutureJVppCore jvpp;
     private final IetfAClWriter aclWriter;
@@ -123,19 +128,19 @@ public final class InterfacesWriterFactory implements WriterFactory {
         final InstanceIdentifier<Interface1> ifc1AugId = ifcId.augmentation(Interface1.class);
         // Ipv6(after interface) =
         registry.addAfter(new GenericWriter<>(ifc1AugId.child(Ipv6.class), new Ipv6Customizer(jvpp)),
-                ifcId);
+            ifcId);
         // Ipv4(after interface)
         final InstanceIdentifier<Ipv4> ipv4Id = ifc1AugId.child(Ipv4.class);
         registry.addAfter(new GenericWriter<>(ipv4Id, new Ipv4Customizer(jvpp)),
-                ifcId);
+            ifcId);
         //  Address(after Ipv4) =
         final InstanceIdentifier<Address> ipv4AddressId = ipv4Id.child(Address.class);
         registry.addAfter(new GenericListWriter<>(ipv4AddressId, new Ipv4AddressCustomizer(jvpp, ifcNamingContext)),
-                ipv4Id);
+            ipv4Id);
         //  Neighbor(after ipv4Address)
         registry.addAfter(new GenericListWriter<>(ipv4Id.child(Neighbor.class), new Ipv4NeighbourCustomizer(jvpp,
-                        ifcNamingContext)),
-                ipv4AddressId);
+                ifcNamingContext)),
+            ipv4AddressId);
     }
 
     private void addVppInterfaceAgmentationWriters(final InstanceIdentifier<Interface> ifcId,
@@ -143,24 +148,24 @@ public final class InterfacesWriterFactory implements WriterFactory {
         // VhostUser(Needs to be executed before Interface customizer) =
         final InstanceIdentifier<VhostUser> vhostId = VPP_IFC_AUG_ID.child(VhostUser.class);
         registry.addBefore(new GenericWriter<>(vhostId, new VhostUserCustomizer(jvpp, ifcNamingContext)),
-                ifcId);
+            ifcId);
         // Vxlan(Needs to be executed before Interface customizer) =
         final InstanceIdentifier<Vxlan> vxlanId = VPP_IFC_AUG_ID.child(Vxlan.class);
         registry.addBefore(new GenericWriter<>(vxlanId, new VxlanCustomizer(jvpp, ifcNamingContext, ifcDisableContext)),
-                ifcId);
+            ifcId);
         // VxlanGpe(Needs to be executed before Interface customizer) =
         final InstanceIdentifier<VxlanGpe> vxlanGpeId = VPP_IFC_AUG_ID.child(VxlanGpe.class);
         registry.addBefore(new GenericWriter<>(vxlanGpeId,
-                        new VxlanGpeCustomizer(jvpp, ifcNamingContext, ifcDisableContext)), ifcId);
+            new VxlanGpeCustomizer(jvpp, ifcNamingContext, ifcDisableContext)), ifcId);
         // Tap(Needs to be executed before Interface customizer) =
         final InstanceIdentifier<Tap> tapId = VPP_IFC_AUG_ID.child(Tap.class);
         registry.addBefore(new GenericWriter<>(tapId, new TapCustomizer(jvpp, ifcNamingContext)),
-                ifcId);
+            ifcId);
 
         // Gre(Needs to be executed before Interface customizer) =
         final InstanceIdentifier<Gre> greId = VPP_IFC_AUG_ID.child(Gre.class);
         registry.addBefore(new GenericWriter<>(greId, new GreCustomizer(jvpp, ifcNamingContext)),
-                ifcId);
+            ifcId);
 
 
         final Set<InstanceIdentifier<?>> specificIfcTypes = Sets.newHashSet(vhostId, vxlanGpeId, vxlanGpeId, tapId);
@@ -169,32 +174,34 @@ public final class InterfacesWriterFactory implements WriterFactory {
         registry.add(new GenericWriter<>(VPP_IFC_AUG_ID.child(Ethernet.class), new EthernetCustomizer(jvpp)));
         // Routing(Execute only after specific interface customizers) =
         registry.addAfter(
-                new GenericWriter<>(VPP_IFC_AUG_ID.child(Routing.class), new RoutingCustomizer(jvpp, ifcNamingContext)),
-                specificIfcTypes);
+            new GenericWriter<>(VPP_IFC_AUG_ID.child(Routing.class), new RoutingCustomizer(jvpp, ifcNamingContext)),
+            specificIfcTypes);
         // L2(Execute only after subinterface (and all other ifc types) =
         registry.addAfter(new GenericWriter<>(L2_ID, new L2Customizer(jvpp, ifcNamingContext, bdNamingContext)),
-                SubinterfaceAugmentationWriterFactory.SUB_IFC_ID);
+            SubinterfaceAugmentationWriterFactory.SUB_IFC_ID);
         // Proxy Arp (execute after specific interface customizers)
         registry.addAfter(
-                new GenericWriter<>(VPP_IFC_AUG_ID.child(ProxyArp.class), new ProxyArpCustomizer(jvpp)),
-                specificIfcTypes);
-        // ACL (execute after classify table and session writers)
+            new GenericWriter<>(VPP_IFC_AUG_ID.child(ProxyArp.class), new ProxyArpCustomizer(jvpp)),
+            specificIfcTypes);
+        // Ingress (execute after classify table and session writers)
         // also handles L2Acl, Ip4Acl and Ip6Acl:
-        final InstanceIdentifier<Acl> aclId = InstanceIdentifier.create(Acl.class);
+        final InstanceIdentifier<Ingress> ingressId = InstanceIdentifier.create(Ingress.class);
         registry
             .subtreeAddAfter(
-                Sets.newHashSet(aclId.child(L2Acl.class), aclId.child(Ip4Acl.class), aclId.child(Ip6Acl.class)),
-                new GenericWriter<>(ACL_ID, new AclCustomizer(jvpp, ifcNamingContext, classifyTableContext)),
+                Sets.newHashSet(ingressId.child(L2Acl.class), ingressId.child(Ip4Acl.class), ingressId.child(Ip6Acl.class)),
+                new GenericWriter<>(INGRESS_ACL_ID,
+                    new AclCustomizer(jvpp, ifcNamingContext, classifyTableContext)),
                 Sets.newHashSet(CLASSIFY_TABLE_ID, CLASSIFY_SESSION_ID));
 
-        // IETF-ACL, also handles IetfAcl, AccessLists and Acl:
-        final InstanceIdentifier<AccessLists> accessListsID = InstanceIdentifier.create(IetfAcl.class)
+        // Ingress IETF-ACL, also handles AccessLists and Acl:
+        final InstanceIdentifier<AccessLists> accessListsID = InstanceIdentifier.create(
+            org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ietf.acl.Ingress.class)
             .child(AccessLists.class);
         final InstanceIdentifier<?> aclListId = accessListsID.child(
             org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.access.lists.Acl.class);
         registry.subtreeAdd(
             Sets.newHashSet(accessListsID, aclListId),
-            new GenericWriter<>(IETF_ACL_ID, new IetfAclCustomizer(aclWriter, ifcNamingContext)));
+            new GenericWriter<>(INGRESS_IETF_ACL_ID, new IetfAclCustomizer(aclWriter, ifcNamingContext)));
     }
 
 
index f671e70..d34a101 100644 (file)
@@ -23,11 +23,11 @@ import com.google.common.collect.Sets;
 import io.fd.honeycomb.translate.impl.write.GenericListWriter;
 import io.fd.honeycomb.translate.impl.write.GenericWriter;
 import io.fd.honeycomb.translate.v3po.interfaces.RewriteCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.SubInterfaceAclCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.SubInterfaceAclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.SubInterfaceCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.SubInterfaceL2Customizer;
-import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAClWriter;
-import io.fd.honeycomb.translate.v3po.interfaces.acl.SubInterfaceIetfAclCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.IetfAClWriter;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.SubInterfaceIetfAclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfaces.ip.SubInterfaceIpv4AddressCustomizer;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
@@ -47,6 +47,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.L2;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Tags;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Ingress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.l2.Rewrite;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.tags.Tag;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.ip4.attributes.Ipv4;
@@ -70,7 +71,10 @@ public final class SubinterfaceAugmentationWriterFactory implements WriterFactor
     public static final InstanceIdentifier<L2> L2_ID = SUB_IFC_ID.child(
             L2.class);
     public static final InstanceIdentifier<Acl> SUBIF_ACL_ID = SUB_IFC_ID.child(Acl.class);
+    public static final InstanceIdentifier<Ingress> SUBIF_INGRESS_ACL_ID = SUBIF_ACL_ID.child(Ingress.class);
     public static final InstanceIdentifier<IetfAcl> SUBIF_IETF_ACL_ID = SUB_IFC_ID.child(IetfAcl.class);
+    public static final InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.ietf.acl.Ingress> SUBIF_INGRESS_IETF_ACL_ID = SUBIF_IETF_ACL_ID.child(
+        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.ietf.acl.Ingress.class);
 
     public SubinterfaceAugmentationWriterFactory(final FutureJVppCore jvpp,
                                                  final IetfAClWriter aclWriter,
@@ -115,22 +119,23 @@ public final class SubinterfaceAugmentationWriterFactory implements WriterFactor
                 new SubInterfaceIpv4AddressCustomizer(jvpp, ifcContext)),
                 rewriteId);
 
-        // ACL (execute after classify table and session writers)
+        // Ingress (execute after classify table and session writers)
         // also handles L2Acl, Ip4Acl and Ip6Acl:
-        final InstanceIdentifier<Acl> aclId = InstanceIdentifier.create(Acl.class);
+        final InstanceIdentifier<Ingress> aclId = InstanceIdentifier.create(Ingress.class);
         registry
             .subtreeAddAfter(
                 Sets.newHashSet(aclId.child(L2Acl.class), aclId.child(Ip4Acl.class), aclId.child(Ip6Acl.class)),
-                new GenericWriter<>(SUBIF_ACL_ID, new SubInterfaceAclCustomizer(jvpp, ifcContext, classifyTableContext)),
+                new GenericWriter<>(SUBIF_INGRESS_ACL_ID, new SubInterfaceAclCustomizer(jvpp, ifcContext, classifyTableContext)),
                 Sets.newHashSet(CLASSIFY_TABLE_ID, CLASSIFY_SESSION_ID));
 
-        // IETF-ACL, also handles IetfAcl, AccessLists and Acl:
-        final InstanceIdentifier<AccessLists> accessListsID = InstanceIdentifier.create(IetfAcl.class)
+        // Ingress IETF-ACL, also handles AccessLists and Acl:
+        final InstanceIdentifier<AccessLists> accessListsID = InstanceIdentifier.create(
+            org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.ietf.acl.Ingress.class)
             .child(AccessLists.class);
         final InstanceIdentifier<?> aclListId = accessListsID.child(
             org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.access.lists.Acl.class);
         registry.subtreeAdd(
             Sets.newHashSet(accessListsID, aclListId),
-            new GenericWriter<>(SUBIF_IETF_ACL_ID, new SubInterfaceIetfAclCustomizer(aclWriter, ifcContext)));
+            new GenericWriter<>(SUBIF_INGRESS_IETF_ACL_ID, new SubInterfaceIetfAclCustomizer(aclWriter, ifcContext)));
     }
 }
index 119bc18..8418853 100644 (file)
@@ -22,12 +22,13 @@ import io.fd.honeycomb.translate.impl.read.GenericReader;
 import io.fd.honeycomb.translate.read.ReaderFactory;
 import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
 import io.fd.honeycomb.translate.v3po.interfacesstate.RewriteCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.SubInterfaceAclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.SubInterfaceCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.acl.ingress.SubInterfaceAclCustomizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.SubInterfaceL2Customizer;
 import io.fd.honeycomb.translate.v3po.interfacesstate.ip.SubInterfaceIpv4AddressCustomizer;
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.honeycomb.translate.vpp.util.NamingContext;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any.Dot1qTag;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip4Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip6Acl;
@@ -39,9 +40,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterface;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.match.attributes.match.type.vlan.tagged.VlanTagged;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.AclBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.L2;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Tags;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Ingress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.l2.Rewrite;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.tags.Tag;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.ip4.attributes.Ipv4;
@@ -49,7 +52,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.ip4.attributes.ipv4.Address;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.tag.rewrite.PushTags;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 
 final class SubinterfaceStateAugmentationReaderFactory implements ReaderFactory {
 
@@ -59,7 +61,8 @@ final class SubinterfaceStateAugmentationReaderFactory implements ReaderFactory
     private final VppClassifierContextManager classifyCtx;
 
     SubinterfaceStateAugmentationReaderFactory(final FutureJVppCore jvpp, final NamingContext ifcCtx,
-                                               final NamingContext bdCtx, final VppClassifierContextManager classifyCtx) {
+                                               final NamingContext bdCtx,
+                                               final VppClassifierContextManager classifyCtx) {
         this.jvpp = jvpp;
         this.ifcCtx = ifcCtx;
         this.bdCtx = bdCtx;
@@ -70,7 +73,7 @@ final class SubinterfaceStateAugmentationReaderFactory implements ReaderFactory
     public void init(final ModifiableReaderRegistryBuilder registry) {
         // SubinterfaceStateAugmentation(Structural)
         final InstanceIdentifier<SubinterfaceStateAugmentation> subIfcAugId =
-                InterfacesStateReaderFactory.IFC_ID.augmentation(SubinterfaceStateAugmentation.class);
+            InterfacesStateReaderFactory.IFC_ID.augmentation(SubinterfaceStateAugmentation.class);
         registry.addStructuralReader(subIfcAugId, SubinterfaceStateAugmentationBuilder.class);
         //  SubInterfaces(Structural)
         final InstanceIdentifier<SubInterfaces> subIfcsId = subIfcAugId.child(SubInterfaces.class);
@@ -78,30 +81,37 @@ final class SubinterfaceStateAugmentationReaderFactory implements ReaderFactory
         //   SubInterface(Subtree)
         final InstanceIdentifier<SubInterface> subIfcId = subIfcsId.child(SubInterface.class);
         registry.subtreeAdd(Sets.newHashSet(
-                InstanceIdentifier.create(SubInterface.class).child(Tags.class),
-                InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class),
-                InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class).child(Dot1qTag.class),
-                InstanceIdentifier.create(SubInterface.class).child(Match.class),
-                InstanceIdentifier.create(SubInterface.class).child(Match.class).child(VlanTagged.class)),
-                new GenericListReader<>(subIfcId, new SubInterfaceCustomizer(jvpp, ifcCtx)));
+            InstanceIdentifier.create(SubInterface.class).child(Tags.class),
+            InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class),
+            InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class).child(Dot1qTag.class),
+            InstanceIdentifier.create(SubInterface.class).child(Match.class),
+            InstanceIdentifier.create(SubInterface.class).child(Match.class).child(VlanTagged.class)),
+            new GenericListReader<>(subIfcId, new SubInterfaceCustomizer(jvpp, ifcCtx)));
         //    L2
         final InstanceIdentifier<L2> l2Id = subIfcId.child(L2.class);
         registry.add(new GenericReader<>(l2Id, new SubInterfaceL2Customizer(jvpp, ifcCtx, bdCtx)));
         //     Rewrite(Subtree)
         registry.subtreeAdd(Sets.newHashSet(
-                InstanceIdentifier.create(Rewrite.class).child(PushTags.class),
-                InstanceIdentifier.create(Rewrite.class).child(PushTags.class)
-                        .child(org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.Dot1qTag.class)),
-                new GenericReader<>(l2Id.child(Rewrite.class), new RewriteCustomizer(jvpp, ifcCtx)));
+            InstanceIdentifier.create(Rewrite.class).child(PushTags.class),
+            InstanceIdentifier.create(Rewrite.class).child(PushTags.class)
+                .child(
+                    org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.Dot1qTag.class)),
+            new GenericReader<>(l2Id.child(Rewrite.class), new RewriteCustomizer(jvpp, ifcCtx)));
         //    Ipv4(Structural)
         final InstanceIdentifier<Ipv4> ipv4Id = subIfcId.child(Ipv4.class);
         registry.addStructuralReader(ipv4Id, Ipv4Builder.class);
         //     Address
-        registry.add(new GenericListReader<>(ipv4Id.child(Address.class), new SubInterfaceIpv4AddressCustomizer(jvpp, ifcCtx)));
-        //    Acl(Subtree)
-        final InstanceIdentifier<Acl> aclIdRelative = InstanceIdentifier.create(Acl.class);
+        registry.add(
+            new GenericListReader<>(ipv4Id.child(Address.class), new SubInterfaceIpv4AddressCustomizer(jvpp, ifcCtx)));
+        //    Acl(Structural)
+        final InstanceIdentifier<Acl> aclIid = subIfcId.child(Acl.class);
+        registry.addStructuralReader(aclIid, AclBuilder.class);
+        //    Ingress(Subtree)
+        final InstanceIdentifier<Ingress> ingressIdRelative = InstanceIdentifier.create(Ingress.class);
         registry.subtreeAdd(
-                Sets.newHashSet(aclIdRelative.child(L2Acl.class), aclIdRelative.child(Ip4Acl.class), aclIdRelative.child(Ip6Acl.class)),
-                new GenericReader<>(subIfcId.child(Acl.class), new SubInterfaceAclCustomizer(jvpp, ifcCtx, classifyCtx)));
+            Sets.newHashSet(ingressIdRelative.child(L2Acl.class), ingressIdRelative.child(Ip4Acl.class),
+                ingressIdRelative.child(Ip6Acl.class)),
+            new GenericReader<>(aclIid.child(Ingress.class),
+                new SubInterfaceAclCustomizer(jvpp, ifcCtx, classifyCtx)));
     }
 }
index 3846107..de29d5d 100644 (file)
@@ -26,7 +26,7 @@ import io.fd.honeycomb.translate.v3po.cfgattrs.V3poConfiguration;
 import io.fd.honeycomb.translate.v3po.initializers.InterfacesInitializer;
 import io.fd.honeycomb.translate.v3po.initializers.VppClassifierInitializer;
 import io.fd.honeycomb.translate.v3po.initializers.VppInitializer;
-import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAClWriter;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.IetfAClWriter;
 import io.fd.honeycomb.translate.v3po.notification.InterfaceChangeNotificationProducer;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
index 7ecf0c0..7c8af22 100644 (file)
@@ -55,6 +55,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VhostUserBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.acl.EgressBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.acl.IngressBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Ethernet;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Gre;
@@ -63,6 +65,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VhostUser;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Vxlan;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VxlanGpe;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.acl.Egress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.acl.Ingress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.Interconnection;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBased;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.base.attributes.interconnection.BridgeBasedBuilder;
@@ -220,9 +224,24 @@ public class InterfacesInitializer extends AbstractDataTreeConverter<InterfacesS
 
     private static void setAcl(final VppInterfaceAugmentationBuilder augmentBuilder, final Acl acl) {
         final AclBuilder aclBuilder = new AclBuilder();
-        aclBuilder.setL2Acl(acl.getL2Acl());
-        aclBuilder.setIp4Acl(acl.getIp4Acl());
-        aclBuilder.setIp6Acl(acl.getIp6Acl());
+
+        final Ingress ingress = acl.getIngress();
+        if (ingress != null) {
+            final IngressBuilder builder = new IngressBuilder();
+            builder.setL2Acl(ingress.getL2Acl());
+            builder.setIp4Acl(ingress.getIp4Acl());
+            builder.setIp6Acl(ingress.getIp6Acl());
+            aclBuilder.setIngress(builder.build());
+        }
+
+        final Egress egress = acl.getEgress();
+        if (egress != null) {
+            final EgressBuilder builder = new EgressBuilder();
+            builder.setL2Acl(egress.getL2Acl());
+            builder.setIp4Acl(egress.getIp4Acl());
+            builder.setIp6Acl(egress.getIp6Acl());
+            aclBuilder.setEgress(builder.build());
+        }
         augmentBuilder.setAcl(aclBuilder.build());
     }
 
index 7acc75b..e9b1d63 100644 (file)
@@ -25,6 +25,10 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.SubInterfaces;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterface;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.AclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Egress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.EgressBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.IngressBuilder;
 
 /**
  * Utility class for sub interface initialization
@@ -80,9 +84,23 @@ final class SubInterfaceInitializationUtils {
 
         if (operationalData.getAcl() != null) {
             final AclBuilder aclBuilder = new AclBuilder();
-            aclBuilder.setL2Acl(operationalData.getAcl().getL2Acl());
-            aclBuilder.setIp4Acl(operationalData.getAcl().getIp4Acl());
-            aclBuilder.setIp6Acl(operationalData.getAcl().getIp6Acl());
+            final Ingress ingress = operationalData.getAcl().getIngress();
+            if (ingress != null) {
+                final IngressBuilder builder = new IngressBuilder();
+                builder.setL2Acl(ingress.getL2Acl());
+                builder.setIp4Acl(ingress.getIp4Acl());
+                builder.setIp6Acl(ingress.getIp6Acl());
+                aclBuilder.setIngress(builder.build());
+            }
+
+            final Egress egress = operationalData.getAcl().getEgress();
+            if (egress != null) {
+                final EgressBuilder builder = new EgressBuilder();
+                builder.setL2Acl(egress.getL2Acl());
+                builder.setIp4Acl(egress.getIp4Acl());
+                builder.setIp6Acl(egress.getIp6Acl());
+                aclBuilder.setEgress(builder.build());
+            }
             subInterfaceCfgBuilder.setAcl(aclBuilder.build());
         }
 
@@ -38,12 +38,12 @@ import org.slf4j.LoggerFactory;
  *
  * ACLs that are currently assigned to an interface cannot be updated/deleted.
  */
-public class AclWriter implements ListWriterCustomizer<Acl, AclKey> {
+public class IetfAclWriter implements ListWriterCustomizer<Acl, AclKey> {
 
     public static final InstanceIdentifier<AccessLists> ACL_ID =
         InstanceIdentifier.create(AccessLists.class);
 
-    private static final Logger LOG = LoggerFactory.getLogger(AclWriter.class);
+    private static final Logger LOG = LoggerFactory.getLogger(IetfAclWriter.class);
 
     @Override
     public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataAfter,
@@ -93,7 +93,8 @@ public class AclWriter implements ListWriterCustomizer<Acl, AclKey> {
         return interfaces.getInterface().stream()
             .map(i -> Optional.ofNullable(i.getAugmentation(VppInterfaceAugmentation.class))
                 .map(aug -> aug.getIetfAcl())
-                .map(ietfAcl -> ietfAcl.getAccessLists())
+                .map(ietfAcl -> ietfAcl.getIngress())
+                .map(ingress -> ingress.getAccessLists())
                 .map(accessLists -> accessLists.getAcl())
             )
             .flatMap(iacl -> iacl.isPresent()
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import com.google.common.annotations.VisibleForTesting;
 import io.fd.honeycomb.translate.vpp.util.MacTranslator;
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
+import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
 import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.vpp.util.WriteTimeoutException;
-import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
 import io.fd.honeycomb.translate.write.WriteContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.VppBaseCallException;
+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.interfaces.rev140508.interfaces.Interface;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.acl.Ingress;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Customizer for enabling/disabling ACLs on given interface.
+ * Customizer for enabling/disabling ingress ACLs on given interface based on low lever classfier model.
  */
-public class AclCustomizer extends FutureJVppCustomizer implements WriterCustomizer<Acl>, AclWriter {
+public class AclCustomizer extends FutureJVppCustomizer implements WriterCustomizer<Ingress>, AclWriter {
 
     private static final Logger LOG = LoggerFactory.getLogger(AclCustomizer.class);
     private final NamingContext interfaceContext;
@@ -51,7 +51,7 @@ public class AclCustomizer extends FutureJVppCustomizer implements WriterCustomi
     }
 
     @Override
-    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataAfter,
+    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataAfter,
                                        @Nonnull final WriteContext writeContext) throws WriteFailedException {
         try {
             setAcl(true, id, dataAfter, writeContext);
@@ -61,14 +61,14 @@ public class AclCustomizer extends FutureJVppCustomizer implements WriterCustomi
     }
 
     @Override
-    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataBefore,
-                                        @Nonnull final Acl dataAfter, @Nonnull final WriteContext writeContext)
+    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataBefore,
+                                        @Nonnull final Ingress dataAfter, @Nonnull final WriteContext writeContext)
         throws WriteFailedException {
         throw new UnsupportedOperationException("Acl update is not supported. Please delete Acl container first.");
     }
 
     @Override
-    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataBefore,
+    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataBefore,
                                         @Nonnull final WriteContext writeContext) throws WriteFailedException {
         try {
             setAcl(false, id, dataBefore, writeContext);
@@ -77,7 +77,7 @@ public class AclCustomizer extends FutureJVppCustomizer implements WriterCustomi
         }
     }
 
-    private void setAcl(final boolean isAdd, @Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl acl,
+    private void setAcl(final boolean isAdd, @Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress acl,
                         @Nonnull final WriteContext writeContext)
         throws VppBaseCallException, WriteTimeoutException {
         final String ifName = id.firstKeyOf(Interface.class).getName();
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkArgument;
 
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAclWriter;
 import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
 import io.fd.honeycomb.translate.vpp.util.WriteTimeoutException;
 import io.fd.honeycomb.translate.write.WriteContext;
@@ -75,7 +76,7 @@ public final class IetfAClWriter implements JvppReplyConsumer {
 
         // ietf-acl updates are handled first, so we use writeContext.readAfter
         final Optional<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.access.lists.Acl>
-                aclOptional = writeContext.readAfter(AclWriter.ACL_ID.child(
+                aclOptional = writeContext.readAfter(IetfAclWriter.ACL_ID.child(
                 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.access.lists.Acl.class,
                 new AclKey(aclName, aclType)));
         checkArgument(aclOptional.isPresent(), "Acl lists not configured");
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -23,23 +23,23 @@ import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.write.WriteContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.VppBaseCallException;
 import javax.annotation.Nonnull;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.AccessLists;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.IetfAcl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ietf.acl.Ingress;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Customizer for enabling/disabling ACLs for given interface (as defined in ietf-acl model).
+ * Customizer for enabling/disabling ingress ACLs for given interface (as defined in ietf-acl model).
  *
  * The customizer assumes it owns classify table management for interfaces where ietf-acl container is present. Using
  * low level classifier model or direct changes to classify tables in combination with ietf-acls are not supported and
  * can result in unpredictable behaviour.
  */
-public class IetfAclCustomizer implements WriterCustomizer<IetfAcl> {
+public class IetfAclCustomizer implements WriterCustomizer<Ingress> {
 
     private static final Logger LOG = LoggerFactory.getLogger(IetfAclCustomizer.class);
     private final IetfAClWriter aclWriter;
@@ -52,7 +52,7 @@ public class IetfAclCustomizer implements WriterCustomizer<IetfAcl> {
     }
 
     @Override
-    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<IetfAcl> id, @Nonnull final IetfAcl dataAfter,
+    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataAfter,
                                        @Nonnull final WriteContext writeContext) throws WriteFailedException {
         final String ifName = id.firstKeyOf(Interface.class).getName();
         final int ifIndex = interfaceContext.getIndex(ifName, writeContext.getMappingContext());
@@ -70,8 +70,8 @@ public class IetfAclCustomizer implements WriterCustomizer<IetfAcl> {
     }
 
     @Override
-    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<IetfAcl> id,
-                                        @Nonnull final IetfAcl dataBefore, @Nonnull final IetfAcl dataAfter,
+    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id,
+                                        @Nonnull final Ingress dataBefore, @Nonnull final Ingress dataAfter,
                                         @Nonnull final WriteContext writeContext)
         throws WriteFailedException {
         LOG.debug("ACLs update: removing previously configured ACLs");
@@ -82,8 +82,8 @@ public class IetfAclCustomizer implements WriterCustomizer<IetfAcl> {
     }
 
     @Override
-    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<IetfAcl> id,
-                                        @Nonnull final IetfAcl dataBefore,
+    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id,
+                                        @Nonnull final Ingress dataBefore,
                                         @Nonnull final WriteContext writeContext) throws WriteFailedException {
         final String ifName = id.firstKeyOf(Interface.class).getName();
         final int ifIndex = interfaceContext.getIndex(ifName, writeContext.getMappingContext());
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import io.fd.honeycomb.translate.spi.write.WriterCustomizer;
+import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
 import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.vpp.util.SubInterfaceUtils;
 import io.fd.honeycomb.translate.vpp.util.WriteTimeoutException;
-import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
 import io.fd.honeycomb.translate.write.WriteContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.VppBaseCallException;
+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.interfaces.rev140508.interfaces.Interface;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterface;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterfaceKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Ingress;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Customizer for enabling/disabling ACLs on given sub-interface.
+ * Customizer for enabling/disabling ingress ACLs on given sub-interface.
  */
 public class SubInterfaceAclCustomizer extends FutureJVppCustomizer
-    implements WriterCustomizer<Acl>, AclWriter {
+    implements WriterCustomizer<Ingress>, AclWriter {
 
     private static final Logger LOG = LoggerFactory.getLogger(SubInterfaceAclCustomizer.class);
     private final NamingContext interfaceContext;
@@ -57,7 +57,7 @@ public class SubInterfaceAclCustomizer extends FutureJVppCustomizer
     }
 
     @Override
-    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataAfter,
+    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataAfter,
                                        @Nonnull final WriteContext writeContext) throws WriteFailedException {
         try {
             setAcl(true, id, dataAfter, writeContext);
@@ -67,14 +67,14 @@ public class SubInterfaceAclCustomizer extends FutureJVppCustomizer
     }
 
     @Override
-    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataBefore,
-                                        @Nonnull final Acl dataAfter, @Nonnull final WriteContext writeContext)
+    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataBefore,
+                                        @Nonnull final Ingress dataAfter, @Nonnull final WriteContext writeContext)
         throws WriteFailedException {
         throw new UnsupportedOperationException("Acl update is not supported. Please delete Acl container first.");
     }
 
     @Override
-    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl dataBefore,
+    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataBefore,
                                         @Nonnull final WriteContext writeContext) throws WriteFailedException {
         try {
             setAcl(false, id, dataBefore, writeContext);
@@ -83,7 +83,7 @@ public class SubInterfaceAclCustomizer extends FutureJVppCustomizer
         }
     }
 
-    private void setAcl(final boolean isAdd, @Nonnull final InstanceIdentifier<Acl> id, @Nonnull final Acl acl,
+    private void setAcl(final boolean isAdd, @Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress acl,
                         @Nonnull final WriteContext writeContext)
         throws VppBaseCallException, WriteTimeoutException {
         final InterfaceKey parentInterfacekey = id.firstKeyOf(Interface.class);
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -27,26 +27,26 @@ import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.vpp.util.SubInterfaceUtils;
 import io.fd.honeycomb.translate.write.WriteContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
+import io.fd.vpp.jvpp.VppBaseCallException;
 import javax.annotation.Nonnull;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.AccessLists;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterface;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterfaceKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.IetfAcl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.ietf.acl.Ingress;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Customizer for enabling/disabling ACLs for given sub-interface (as defined in ietf-acl model).
+ * Customizer for enabling/disabling ingress ACLs for given sub-interface (as defined in ietf-acl model).
  *
  * The customizer assumes it owns classify table management for sub-interfaces where ietf-acl container is present.
  * Using low level classifier model or direct changes to classify tables in combination with ietf-acls are not supported
  * and can result in unpredictable behaviour.
  */
-public class SubInterfaceIetfAclCustomizer implements WriterCustomizer<IetfAcl> {
+public class SubInterfaceIetfAclCustomizer implements WriterCustomizer<Ingress> {
 
     private static final Logger LOG = LoggerFactory.getLogger(SubInterfaceIetfAclCustomizer.class);
     private final IetfAClWriter aclWriter;
@@ -58,7 +58,7 @@ public class SubInterfaceIetfAclCustomizer implements WriterCustomizer<IetfAcl>
         this.interfaceContext = checkNotNull(interfaceContext, "interfaceContext should not be null");
     }
 
-    private String getSubInterfaceName(@Nonnull final InstanceIdentifier<IetfAcl> id) {
+    private String getSubInterfaceName(@Nonnull final InstanceIdentifier<Ingress> id) {
         final InterfaceKey parentInterfacekey = id.firstKeyOf(Interface.class);
         final SubInterfaceKey subInterfacekey = id.firstKeyOf(SubInterface.class);
         return SubInterfaceUtils
@@ -66,7 +66,7 @@ public class SubInterfaceIetfAclCustomizer implements WriterCustomizer<IetfAcl>
     }
 
     @Override
-    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<IetfAcl> id, @Nonnull final IetfAcl dataAfter,
+    public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final Ingress dataAfter,
                                        @Nonnull final WriteContext writeContext) throws WriteFailedException {
         final String subInterfaceName = getSubInterfaceName(id);
         final int subInterfaceIndex = interfaceContext.getIndex(subInterfaceName, writeContext.getMappingContext());
@@ -90,8 +90,8 @@ public class SubInterfaceIetfAclCustomizer implements WriterCustomizer<IetfAcl>
     }
 
     @Override
-    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<IetfAcl> id,
-                                        @Nonnull final IetfAcl dataBefore, @Nonnull final IetfAcl dataAfter,
+    public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id,
+                                        @Nonnull final Ingress dataBefore, @Nonnull final Ingress dataAfter,
                                         @Nonnull final WriteContext writeContext) throws WriteFailedException {
         LOG.debug("Sub-interface ACLs update: removing previously configured ACLs");
         deleteCurrentAttributes(id, dataBefore, writeContext);
@@ -101,8 +101,8 @@ public class SubInterfaceIetfAclCustomizer implements WriterCustomizer<IetfAcl>
     }
 
     @Override
-    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<IetfAcl> id,
-                                        @Nonnull final IetfAcl dataBefore, @Nonnull final WriteContext writeContext)
+    public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id,
+                                        @Nonnull final Ingress dataBefore, @Nonnull final WriteContext writeContext)
         throws WriteFailedException {
         final String subInterfaceName = getSubInterfaceName(id);
         final int subInterfaceIndex = interfaceContext.getIndex(subInterfaceName, writeContext.getMappingContext());
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfacesstate;
+package io.fd.honeycomb.translate.v3po.interfacesstate.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -22,31 +22,31 @@ import static com.google.common.base.Preconditions.checkNotNull;
 import io.fd.honeycomb.translate.read.ReadContext;
 import io.fd.honeycomb.translate.read.ReadFailedException;
 import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
 import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
 import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
-import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.vpp.jvpp.VppBaseCallException;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
+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.interfaces.rev140508.interfaces.state.Interface;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentationBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.AclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.acl.IngressBuilder;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Customizer for reading ACLs enabled on given interface.
+ * Customizer for reading ingress ACLs enabled on given interface.
  */
 public class AclCustomizer extends FutureJVppCustomizer
-        implements ReaderCustomizer<Acl, AclBuilder>, AclReader, JvppReplyConsumer {
+        implements ReaderCustomizer<Ingress, IngressBuilder>, AclReader, JvppReplyConsumer {
 
     private static final Logger LOG = LoggerFactory.getLogger(AclCustomizer.class);
     private final NamingContext interfaceContext;
@@ -60,18 +60,18 @@ public class AclCustomizer extends FutureJVppCustomizer
     }
 
     @Override
-    public void merge(@Nonnull final Builder<? extends DataObject> parentBuilder, @Nonnull final Acl readValue) {
-        ((VppInterfaceStateAugmentationBuilder) parentBuilder).setAcl(readValue);
+    public void merge(@Nonnull final Builder<? extends DataObject> parentBuilder, @Nonnull final Ingress readValue) {
+        ((AclBuilder) parentBuilder).setIngress(readValue);
     }
 
     @Nonnull
     @Override
-    public AclBuilder getBuilder(@Nonnull final InstanceIdentifier<Acl> id) {
-        return new AclBuilder();
+    public IngressBuilder getBuilder(@Nonnull final InstanceIdentifier<Ingress> id) {
+        return new IngressBuilder();
     }
 
     @Override
-    public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final AclBuilder builder,
+    public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final IngressBuilder builder,
                                       @Nonnull final ReadContext ctx) throws ReadFailedException {
         LOG.debug("Reading attributes for interface ACL: {}", id);
         final InterfaceKey interfaceKey = id.firstKeyOf(Interface.class);
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfacesstate;
+package io.fd.honeycomb.translate.v3po.interfacesstate.acl.ingress;
 
 import io.fd.honeycomb.translate.MappingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfacesstate;
+package io.fd.honeycomb.translate.v3po.interfacesstate.acl.ingress;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -23,33 +23,33 @@ import static io.fd.honeycomb.translate.vpp.util.SubInterfaceUtils.getSubInterfa
 import io.fd.honeycomb.translate.read.ReadContext;
 import io.fd.honeycomb.translate.read.ReadFailedException;
 import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
+import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
 import io.fd.honeycomb.translate.vpp.util.FutureJVppCustomizer;
 import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
-import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.vpp.jvpp.VppBaseCallException;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
+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.interfaces.rev140508.interfaces.state.Interface;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterface;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterfaceBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterfaceKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.AclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.IngressBuilder;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Customizer for reading ACLs enabled on given sub-interface.
+ * Customizer for reading ingress ACLs enabled on given sub-interface.
  */
 public class SubInterfaceAclCustomizer extends FutureJVppCustomizer
-        implements ReaderCustomizer<Acl, AclBuilder>, AclReader, JvppReplyConsumer {
+        implements ReaderCustomizer<Ingress, IngressBuilder>, AclReader, JvppReplyConsumer {
 
     private static final Logger LOG = LoggerFactory.getLogger(SubInterfaceAclCustomizer.class);
     private final NamingContext interfaceContext;
@@ -63,18 +63,18 @@ public class SubInterfaceAclCustomizer extends FutureJVppCustomizer
     }
 
     @Override
-    public void merge(@Nonnull final Builder<? extends DataObject> parentBuilder, @Nonnull final Acl readValue) {
-        ((SubInterfaceBuilder) parentBuilder).setAcl(readValue);
+    public void merge(@Nonnull final Builder<? extends DataObject> parentBuilder, @Nonnull final Ingress readValue) {
+        ((AclBuilder) parentBuilder).setIngress(readValue);
     }
 
     @Nonnull
     @Override
-    public AclBuilder getBuilder(@Nonnull final InstanceIdentifier<Acl> id) {
-        return new AclBuilder();
+    public IngressBuilder getBuilder(@Nonnull final InstanceIdentifier<Ingress> id) {
+        return new IngressBuilder();
     }
 
     @Override
-    public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Acl> id, @Nonnull final AclBuilder builder,
+    public void readCurrentAttributes(@Nonnull final InstanceIdentifier<Ingress> id, @Nonnull final IngressBuilder builder,
                                       @Nonnull final ReadContext ctx) throws ReadFailedException {
         LOG.debug("Reading attributes for sub-interface ACL: {}", id);
         final InterfaceKey parentInterfacekey = id.firstKeyOf(Interface.class);
index 734893b..4b7489f 100644 (file)
@@ -22,10 +22,14 @@ import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.verify;
 
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.AclCustomizer;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
 import io.fd.honeycomb.vpp.test.write.WriterCustomizerTest;
+import io.fd.vpp.jvpp.VppBaseCallException;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
@@ -35,11 +39,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2AclBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.AclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.acl.IngressBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.VppBaseCallException;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 
 public class AclCustomizerTest extends WriterCustomizerTest {
 
@@ -62,13 +64,13 @@ public class AclCustomizerTest extends WriterCustomizerTest {
             classifyTableContext);
     }
 
-    private InstanceIdentifier<Acl> getAclId(final String name) {
+    private InstanceIdentifier<Ingress> getAclId(final String name) {
         return InstanceIdentifier.create(Interfaces.class).child(Interface.class, new InterfaceKey(name)).augmentation(
-            VppInterfaceAugmentation.class).child(Acl.class);
+            VppInterfaceAugmentation.class).child(Acl.class).child(Ingress.class);
     }
 
-    private Acl generateAcl(final String tableName) {
-        final AclBuilder builder = new AclBuilder();
+    private Ingress generateAcl(final String tableName) {
+        final IngressBuilder builder = new IngressBuilder();
         final L2Acl l2Acl = new L2AclBuilder().setClassifyTable(tableName).build();
         builder.setL2Acl(l2Acl);
         return builder.build();
@@ -96,8 +98,8 @@ public class AclCustomizerTest extends WriterCustomizerTest {
 
     @Test
     public void testCreate() throws Exception {
-        final Acl acl = generateAcl(ACL_TABLE_NAME);
-        final InstanceIdentifier<Acl> id = getAclId(IF_NAME);
+        final Ingress acl = generateAcl(ACL_TABLE_NAME);
+        final InstanceIdentifier<Ingress> id = getAclId(IF_NAME);
 
         whenInputAclSetInterfaceThenSuccess();
 
@@ -108,8 +110,8 @@ public class AclCustomizerTest extends WriterCustomizerTest {
 
     @Test
     public void testCreateFailed() throws Exception {
-        final Acl acl = generateAcl(ACL_TABLE_NAME);
-        final InstanceIdentifier<Acl> id = getAclId(IF_NAME);
+        final Ingress acl = generateAcl(ACL_TABLE_NAME);
+        final InstanceIdentifier<Ingress> id = getAclId(IF_NAME);
 
         whenInputAclSetInterfaceThenFailure();
 
@@ -125,8 +127,8 @@ public class AclCustomizerTest extends WriterCustomizerTest {
 
     @Test
     public void testDelete() throws Exception {
-        final Acl acl = generateAcl(ACL_TABLE_NAME);
-        final InstanceIdentifier<Acl> id = getAclId(IF_NAME);
+        final Ingress acl = generateAcl(ACL_TABLE_NAME);
+        final InstanceIdentifier<Ingress> id = getAclId(IF_NAME);
 
         whenInputAclSetInterfaceThenSuccess();
 
@@ -137,8 +139,8 @@ public class AclCustomizerTest extends WriterCustomizerTest {
 
     @Test
     public void testDeleteFailed() throws Exception {
-        final Acl acl = generateAcl(ACL_TABLE_NAME);
-        final InstanceIdentifier<Acl> id = getAclId(IF_NAME);
+        final Ingress acl = generateAcl(ACL_TABLE_NAME);
+        final InstanceIdentifier<Ingress> id = getAclId(IF_NAME);
 
         whenInputAclSetInterfaceThenFailure();
 
index 98d645d..75059e4 100644 (file)
@@ -40,6 +40,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.AccessListsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.access.lists.AclBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.IetfAclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ietf.acl.IngressBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
 public class AclWriterTest extends WriterCustomizerTest {
@@ -51,11 +52,11 @@ public class AclWriterTest extends WriterCustomizerTest {
 
     @Mock
     private Acl acl;
-    private AclWriter customizer;
+    private IetfAclWriter customizer;
 
     @Override
     public void setUp() {
-        customizer = new AclWriter();
+        customizer = new IetfAclWriter();
         when(acl.getAclName()).thenReturn(ACL_NAME);
         doReturn(ACL_TYPE).when(acl).getAclType();
     }
@@ -87,9 +88,11 @@ public class AclWriterTest extends WriterCustomizerTest {
     public void testDeleteFailed() throws WriteFailedException {
         final Interface iface = new InterfaceBuilder().addAugmentation(VppInterfaceAugmentation.class,
             new VppInterfaceAugmentationBuilder().setIetfAcl(
-                new IetfAclBuilder().setAccessLists(
-                    new AccessListsBuilder().setAcl(
-                        Collections.singletonList(new AclBuilder().setName(ACL_NAME).setType(ACL_TYPE).build())
+                new IetfAclBuilder().setIngress(
+                    new IngressBuilder().setAccessLists(
+                        new AccessListsBuilder().setAcl(
+                            Collections.singletonList(new AclBuilder().setName(ACL_NAME).setType(ACL_TYPE).build())
+                        ).build()
                     ).build()
                 ).build()
             ).build()
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.mockito.MockitoAnnotations.initMocks;
 
+import io.fd.vpp.jvpp.core.dto.ClassifyAddDelSession;
+import io.fd.vpp.jvpp.core.dto.ClassifyAddDelTable;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
+import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
@@ -28,10 +32,6 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.cont
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.access.lists.acl.access.list.entries.ace.matches.ace.type.AceEth;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.access.lists.acl.access.list.entries.ace.matches.ace.type.AceEthBuilder;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress;
-import io.fd.vpp.jvpp.core.dto.ClassifyAddDelSession;
-import io.fd.vpp.jvpp.core.dto.ClassifyAddDelTable;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
-import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 
 public class AceEthWriterTest {
 
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
-import static io.fd.honeycomb.translate.v3po.interfaces.acl.AbstractAceWriter.VLAN_TAG_LEN;
-import static io.fd.honeycomb.translate.v3po.interfaces.acl.AceIpWriterTestUtils.assertArrayEqualsWithOffset;
+import static io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.AbstractAceWriter.VLAN_TAG_LEN;
 import static org.junit.Assert.assertEquals;
 import static org.mockito.MockitoAnnotations.initMocks;
 
@@ -75,7 +74,7 @@ public class AceIp4WriterTest {
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1,
             -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
         };
-        assertArrayEqualsWithOffset(expectedMask, request.mask, vlanTags * VLAN_TAG_LEN);
+        AceIpWriterTestUtils.assertArrayEqualsWithOffset(expectedMask, request.mask, vlanTags * VLAN_TAG_LEN);
 
     }
 
@@ -90,7 +89,7 @@ public class AceIp4WriterTest {
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 1, 2,
             4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
         };
-        assertArrayEqualsWithOffset(expectedMatch, request.match, vlanTags * VLAN_TAG_LEN);
+        AceIpWriterTestUtils.assertArrayEqualsWithOffset(expectedMatch, request.match, vlanTags * VLAN_TAG_LEN);
 
     }
 
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
-import static io.fd.honeycomb.translate.v3po.interfaces.acl.AbstractAceWriter.VLAN_TAG_LEN;
-import static io.fd.honeycomb.translate.v3po.interfaces.acl.AceIpWriterTestUtils.assertArrayEqualsWithOffset;
+import static io.fd.honeycomb.translate.v3po.interfaces.acl.ingress.AbstractAceWriter.VLAN_TAG_LEN;
 import static org.junit.Assert.assertEquals;
 import static org.mockito.MockitoAnnotations.initMocks;
 
@@ -88,7 +87,7 @@ public class AceIp6WriterTest {
             // padding to multiple of 16B:
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0
         };
-        assertArrayEqualsWithOffset(expectedMask, request.mask, vlanTags * VLAN_TAG_LEN);
+        AceIpWriterTestUtils.assertArrayEqualsWithOffset(expectedMask, request.mask, vlanTags * VLAN_TAG_LEN);
 
     }
 
@@ -113,7 +112,7 @@ public class AceIp6WriterTest {
             // padding to multiple of 16B:
             0, 0, 0, 0, 0, 0, 0, 0, 0, 0
         };
-        assertArrayEqualsWithOffset(expectedMatch, request.match, vlanTags * VLAN_TAG_LEN);
+        AceIpWriterTestUtils.assertArrayEqualsWithOffset(expectedMatch, request.match, vlanTags * VLAN_TAG_LEN);
 
     }
 
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.verify;
@@ -24,6 +24,13 @@ import com.google.common.base.Optional;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
 import io.fd.honeycomb.vpp.test.write.WriterCustomizerTest;
+import io.fd.vpp.jvpp.core.dto.ClassifyAddDelSessionReply;
+import io.fd.vpp.jvpp.core.dto.ClassifyAddDelTable;
+import io.fd.vpp.jvpp.core.dto.ClassifyAddDelTableReply;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 import java.util.Collections;
 import org.junit.Test;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.AclBase;
@@ -42,34 +49,28 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.AccessListsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.ietf.acl.base.attributes.access.lists.AclBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.IetfAcl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.IetfAclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ietf.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ietf.acl.IngressBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.dto.ClassifyAddDelSessionReply;
-import io.fd.vpp.jvpp.core.dto.ClassifyAddDelTable;
-import io.fd.vpp.jvpp.core.dto.ClassifyAddDelTableReply;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 
 public class IetfAclCustomizerTest extends WriterCustomizerTest {
 
     private static final String IFC_TEST_INSTANCE = "ifc-test-instance";
     private static final String IF_NAME = "local0";
     private static final int IF_INDEX = 1;
-    private static final InstanceIdentifier<IetfAcl> IID = InstanceIdentifier.create(Interfaces.class).child(Interface.class, new InterfaceKey(IF_NAME)).augmentation(
-        VppInterfaceAugmentation.class).child(IetfAcl.class);
+    private static final InstanceIdentifier<Ingress> IID = InstanceIdentifier.create(Interfaces.class).child(Interface.class, new InterfaceKey(IF_NAME)).augmentation(
+        VppInterfaceAugmentation.class).child(IetfAcl.class).child(Ingress.class);
     private static final String ACL_NAME = "acl1";
     private static final Class<? extends AclBase> ACL_TYPE = EthAcl.class;
 
     private IetfAclCustomizer customizer;
-    private IetfAcl acl;
+    private Ingress acl;
 
     @Override
     protected void setUp() {
         customizer = new IetfAclCustomizer(new IetfAClWriter(api), new NamingContext("prefix", IFC_TEST_INSTANCE));
         defineMapping(mappingContext, IF_NAME, IF_INDEX, IFC_TEST_INSTANCE);
-        acl = new IetfAclBuilder().setAccessLists(
+        acl = new IngressBuilder().setAccessLists(
             new AccessListsBuilder().setAcl(
                 Collections.singletonList(new AclBuilder()
                     .setName(ACL_NAME)
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
 import io.fd.honeycomb.vpp.test.write.WriterCustomizerTest;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
@@ -38,10 +40,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterface;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterfaceKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.AclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.IngressBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 
 public class SubInterfaceAclCustomizerTest extends WriterCustomizerTest {
     private static final String IFC_TEST_INSTANCE = "ifc-test-instance";
@@ -53,10 +54,10 @@ public class SubInterfaceAclCustomizerTest extends WriterCustomizerTest {
     private static final String TABLE_NAME = "table0";
     private static final int TABLE_INDEX = 123;
 
-    private static final InstanceIdentifier<Acl> IID =
+    private static final InstanceIdentifier<Ingress> IID =
         InstanceIdentifier.create(Interfaces.class).child(Interface.class, new InterfaceKey(IF_NAME)).augmentation(
             SubinterfaceAugmentation.class).child(SubInterfaces.class)
-            .child(SubInterface.class, new SubInterfaceKey(SUBIF_ID)).child(Acl.class);
+            .child(SubInterface.class, new SubInterfaceKey(SUBIF_ID)).child(Acl.class).child(Ingress.class);
 
     @Mock
     private VppClassifierContextManager classifyTableContext;
@@ -103,8 +104,8 @@ public class SubInterfaceAclCustomizerTest extends WriterCustomizerTest {
         customizer.deleteCurrentAttributes(IID, ip4Acl(), writeContext);
     }
 
-    private Acl ip4Acl() {
-        final AclBuilder builder = new AclBuilder();
+    private Ingress ip4Acl() {
+        final IngressBuilder builder = new IngressBuilder();
         final Ip4Acl acl = new Ip4AclBuilder().setClassifyTable(TABLE_NAME).build();
         builder.setIp4Acl(acl);
         return builder.build();
@@ -120,8 +121,8 @@ public class SubInterfaceAclCustomizerTest extends WriterCustomizerTest {
         return request;
     }
 
-    private Acl ip6Acl() {
-        final AclBuilder builder = new AclBuilder();
+    private Ingress ip6Acl() {
+        final IngressBuilder builder = new IngressBuilder();
         final Ip6Acl acl = new Ip6AclBuilder().setClassifyTable(TABLE_NAME).build();
         builder.setIp6Acl(acl);
         return builder.build();
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfaces.acl;
+package io.fd.honeycomb.translate.v3po.interfaces.acl.ingress;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.base.Optional;
+import io.fd.honeycomb.translate.v3po.interfaces.acl.IetfAclWriter;
 import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.write.WriteFailedException;
 import io.fd.honeycomb.vpp.test.write.WriterCustomizerTest;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
+import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 import java.util.Collections;
 import org.junit.Test;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.AclBase;
@@ -41,12 +46,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterfaceBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces._interface.sub.interfaces.SubInterfaceKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.IetfAcl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.IetfAclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.ietf.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.ietf.acl.IngressBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterface;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterface;
-import io.fd.vpp.jvpp.core.dto.InputAclSetInterfaceReply;
 
 public class SubInterfaceIetfAclCustomizerTest extends WriterCustomizerTest {
 
@@ -56,15 +58,15 @@ public class SubInterfaceIetfAclCustomizerTest extends WriterCustomizerTest {
     private static final String SUBIF_NAME = "local0.123";
     private static final int SUBIF_INDEX = 2;
     private static final long SUB_IF_ID = 123;
-    private static final InstanceIdentifier<IetfAcl> IID =
+    private static final InstanceIdentifier<Ingress> IID =
         InstanceIdentifier.create(Interfaces.class).child(Interface.class, new InterfaceKey(IF_NAME)).augmentation(
             SubinterfaceAugmentation.class).child(SubInterfaces.class)
-            .child(SubInterface.class, new SubInterfaceKey(SUB_IF_ID)).child(IetfAcl.class);
+            .child(SubInterface.class, new SubInterfaceKey(SUB_IF_ID)).child(IetfAcl.class).child(Ingress.class);
     private static final String ACL_NAME = "acl1";
     private static final Class<? extends AclBase> ACL_TYPE = EthAcl.class;
 
     private SubInterfaceIetfAclCustomizer customizer;
-    private IetfAcl acl;
+    private Ingress acl;
 
     @Override
     protected void setUp() {
@@ -72,7 +74,7 @@ public class SubInterfaceIetfAclCustomizerTest extends WriterCustomizerTest {
             new SubInterfaceIetfAclCustomizer(new IetfAClWriter(api), new NamingContext("prefix", IFC_TEST_INSTANCE));
         defineMapping(mappingContext, IF_NAME, IF_INDEX, IFC_TEST_INSTANCE);
 
-        acl = new IetfAclBuilder().setAccessLists(
+        acl = new IngressBuilder().setAccessLists(
             new AccessListsBuilder().setAcl(
                 Collections.singletonList(new AclBuilder()
                     .setName(ACL_NAME)
@@ -132,7 +134,7 @@ public class SubInterfaceIetfAclCustomizerTest extends WriterCustomizerTest {
             new SubInterfaceBuilder().build()
         ));
 
-        when(writeContext.readAfter(AclWriter.ACL_ID.child(
+        when(writeContext.readAfter(IetfAclWriter.ACL_ID.child(
             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.access.lists.Acl.class,
             new AclKey(ACL_NAME, ACL_TYPE)))).thenReturn(Optional.of(
             new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160708.access.lists.AclBuilder()
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfacesstate;
+package io.fd.honeycomb.translate.v3po.interfacesstate.acl.ingress;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
@@ -23,31 +23,32 @@ import static org.mockito.Mockito.when;
 
 import io.fd.honeycomb.translate.read.ReadFailedException;
 import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.vpp.test.read.ReaderCustomizerTest;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentationBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2AclBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.AclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.acl.IngressBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
 
-public class AclCustomizerTest extends ReaderCustomizerTest<Acl, AclBuilder> {
+public class AclCustomizerTest extends ReaderCustomizerTest<Ingress, IngressBuilder> {
 
     private static final String IF_NAME = "local0";
     private static final int IF_INDEX = 1;
     private static final int TABLE_INDEX = 123;
     private static final String TABLE_NAME = "table123";
-    private static final InstanceIdentifier<Acl> IID =
+    private static final InstanceIdentifier<Ingress> IID =
         InstanceIdentifier.create(InterfacesState.class).child(Interface.class, new InterfaceKey(IF_NAME))
-            .augmentation(VppInterfaceStateAugmentation.class).child(Acl.class);
+            .augmentation(VppInterfaceStateAugmentation.class).child(Acl.class).child(Ingress.class);
 
     private static final String IFC_CTX_NAME = "ifc-test-instance";
 
@@ -57,7 +58,7 @@ public class AclCustomizerTest extends ReaderCustomizerTest<Acl, AclBuilder> {
     private VppClassifierContextManager classifyTableContext;
 
     public AclCustomizerTest() {
-        super(Acl.class, VppInterfaceStateAugmentationBuilder.class);
+        super(Ingress.class, AclBuilder.class);
     }
 
     @Override
@@ -67,13 +68,13 @@ public class AclCustomizerTest extends ReaderCustomizerTest<Acl, AclBuilder> {
     }
 
     @Override
-    protected ReaderCustomizer<Acl, AclBuilder> initCustomizer() {
+    protected ReaderCustomizer<Ingress, IngressBuilder> initCustomizer() {
         return new AclCustomizer(api, interfaceContext, classifyTableContext);
     }
 
     @Test
     public void testRead() throws ReadFailedException {
-        final AclBuilder builder = mock(AclBuilder.class);
+        final IngressBuilder builder = mock(IngressBuilder.class);
 
         final ClassifyTableByInterfaceReply reply = new ClassifyTableByInterfaceReply();
         reply.l2TableId = TABLE_INDEX;
@@ -93,6 +94,6 @@ public class AclCustomizerTest extends ReaderCustomizerTest<Acl, AclBuilder> {
     @Test(expected = ReadFailedException.class)
     public void testReadFailed() throws ReadFailedException {
         when(api.classifyTableByInterface(any())).thenReturn(failedFuture());
-        getCustomizer().readCurrentAttributes(IID, mock(AclBuilder.class), ctx);
+        getCustomizer().readCurrentAttributes(IID, mock(IngressBuilder.class), ctx);
     }
 }
\ No newline at end of file
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package io.fd.honeycomb.translate.v3po.interfacesstate;
+package io.fd.honeycomb.translate.v3po.interfacesstate.acl.ingress;
 
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
@@ -23,9 +23,10 @@ import static org.mockito.Mockito.when;
 
 import io.fd.honeycomb.translate.read.ReadFailedException;
 import io.fd.honeycomb.translate.spi.read.ReaderCustomizer;
-import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
+import io.fd.honeycomb.translate.vpp.util.NamingContext;
 import io.fd.honeycomb.vpp.test.read.ReaderCustomizerTest;
+import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
@@ -36,14 +37,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.SubinterfaceStateAugmentation;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.SubInterfaces;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterface;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterfaceBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.interfaces.state._interface.sub.interfaces.SubInterfaceKey;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.Acl;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.AclBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.Ingress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev150527.sub._interface.base.attributes.acl.IngressBuilder;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import io.fd.vpp.jvpp.core.dto.ClassifyTableByInterfaceReply;
 
-public class SubInterfaceAclCustomizerTest extends ReaderCustomizerTest<Acl, AclBuilder> {
+public class SubInterfaceAclCustomizerTest extends ReaderCustomizerTest<Ingress, IngressBuilder> {
     private static final String IFC_CTX_NAME = "ifc-test-instance";
     private static final String IF_NAME = "local0";
     private static final int IF_INDEX = 1;
@@ -53,10 +54,10 @@ public class SubInterfaceAclCustomizerTest extends ReaderCustomizerTest<Acl, Acl
     private static final int TABLE_INDEX = 123;
     private static final String TABLE_NAME = "table123";
 
-    private static final InstanceIdentifier<Acl> IID =
+    private static final InstanceIdentifier<Ingress> IID =
         InstanceIdentifier.create(InterfacesState.class).child(Interface.class, new InterfaceKey(IF_NAME))
             .augmentation(SubinterfaceStateAugmentation.class).child(SubInterfaces.class)
-            .child(SubInterface.class, new SubInterfaceKey(SUB_IF_ID)).child(Acl.class);
+            .child(SubInterface.class, new SubInterfaceKey(SUB_IF_ID)).child(Acl.class).child(Ingress.class);
 
     private NamingContext interfaceContext;
 
@@ -64,7 +65,7 @@ public class SubInterfaceAclCustomizerTest extends ReaderCustomizerTest<Acl, Acl
     private VppClassifierContextManager classifyTableContext;
 
     public SubInterfaceAclCustomizerTest() {
-        super(Acl.class, SubInterfaceBuilder.class);
+        super(Ingress.class, AclBuilder.class);
     }
 
     @Override
@@ -75,13 +76,13 @@ public class SubInterfaceAclCustomizerTest extends ReaderCustomizerTest<Acl, Acl
     }
 
     @Override
-    protected ReaderCustomizer<Acl, AclBuilder> initCustomizer() {
+    protected ReaderCustomizer<Ingress, IngressBuilder> initCustomizer() {
         return new SubInterfaceAclCustomizer(api, interfaceContext, classifyTableContext);
     }
 
     @Test
     public void testRead() throws ReadFailedException {
-        final AclBuilder builder = mock(AclBuilder.class);
+        final IngressBuilder builder = mock(IngressBuilder.class);
 
         final ClassifyTableByInterfaceReply reply = new ClassifyTableByInterfaceReply();
         reply.swIfIndex = SUB_IF_INDEX;
@@ -102,6 +103,6 @@ public class SubInterfaceAclCustomizerTest extends ReaderCustomizerTest<Acl, Acl
     @Test(expected = ReadFailedException.class)
     public void testReadFailed() throws ReadFailedException {
         when(api.classifyTableByInterface(any())).thenReturn(failedFuture());
-        getCustomizer().readCurrentAttributes(IID, mock(AclBuilder.class), ctx);
+        getCustomizer().readCurrentAttributes(IID, mock(IngressBuilder.class), ctx);
     }
 }
\ No newline at end of file