summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/v3po2vpp/src/main/java')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/SubInterfaceInitializationUtils.java12
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/VppClasifierInitializer.java9
2 files changed, 11 insertions, 10 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/SubInterfaceInitializationUtils.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/SubInterfaceInitializationUtils.java
index 51adcc8f5..aa717cf98 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/SubInterfaceInitializationUtils.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/SubInterfaceInitializationUtils.java
@@ -78,11 +78,13 @@ final class SubInterfaceInitializationUtils {
subInterfaceCfgBuilder.setIpv4(operationalData.getIpv4());
subInterfaceCfgBuilder.setIpv6(operationalData.getIpv6());
- final AclBuilder aclBuilder = new AclBuilder();
- aclBuilder.setL2Acl(operationalData.getAcl().getL2Acl());
- aclBuilder.setIp4Acl(operationalData.getAcl().getIp4Acl());
- aclBuilder.setIp6Acl(operationalData.getAcl().getIp6Acl());
- subInterfaceCfgBuilder.setAcl(aclBuilder.build());
+ if (operationalData.getAcl() != null) {
+ final AclBuilder aclBuilder = new AclBuilder();
+ aclBuilder.setL2Acl(operationalData.getAcl().getL2Acl());
+ aclBuilder.setIp4Acl(operationalData.getAcl().getIp4Acl());
+ aclBuilder.setIp6Acl(operationalData.getAcl().getIp6Acl());
+ subInterfaceCfgBuilder.setAcl(aclBuilder.build());
+ }
return subInterfaceCfgBuilder.build();
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/VppClasifierInitializer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/VppClasifierInitializer.java
index 74a1cfdee..0881f1aee 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/VppClasifierInitializer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/v3po/translate/v3po/initializers/VppClasifierInitializer.java
@@ -17,13 +17,11 @@
package io.fd.honeycomb.v3po.translate.v3po.initializers;
import io.fd.honeycomb.v3po.vpp.data.init.AbstractDataTreeConverter;
-import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifier;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifierBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifierState;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.vpp.classifier.ClassifyTableBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
@@ -41,9 +39,10 @@ public class VppClasifierInitializer extends AbstractDataTreeConverter<VppClassi
@Override
protected VppClassifier convert(final VppClassifierState operationalData) {
final VppClassifierBuilder builder = new VppClassifierBuilder();
- builder.setClassifyTable(operationalData.getClassifyTable().stream()
- .map(oper -> new ClassifyTableBuilder(oper).build())
- .collect(Collectors.toList()));
+ // TODO finish translation classify table key + mandatory fields at least must be set
+// builder.setClassifyTable(operationalData.getClassifyTable().stream()
+// .map(oper -> new ClassifyTableBuilder(oper).build())
+// .collect(Collectors.toList()));
return builder.build();
}
}