Lisp model changes due to decrease version of ODL 10/5110/4
authorJan Srnicek <[email protected]>
Mon, 13 Feb 2017 12:49:15 +0000 (13:49 +0100)
committerMarek Gradzki <[email protected]>
Fri, 17 Feb 2017 13:13:03 +0000 (14:13 +0100)
Change-Id: I589b6480853ea4716f60301e2b53bdd82db3dde1
Signed-off-by: Jan Srnicek <[email protected]>
lisp/api/src/main/yang/lisp.yang
lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/BridgeDomainSubtableCustomizer.java
lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/write/VrfSubtableCustomizer.java
vpp-integration/minimal-distribution/pom.xml

index 933211c..cf508c6 100755 (executable)
@@ -257,7 +257,8 @@ module lisp {
           leaf table-id {
              type uint32;
              description "table-id";
-             mandatory true;
+             // TODO - HC2VPP-73 - commented due to ODL Boron issues
+             //mandatory true;
           }
 
           uses dp-subtable-grouping;
@@ -268,7 +269,8 @@ module lisp {
           leaf bridge-domain-ref {
             type string;
             description "Name reference to existing bridge domain";
-            mandatory true;
+            // TODO - HC2VPP-73 - commented due to ODL Boron issues
+            // mandatory true;
           }
 
           uses dp-subtable-grouping;
index 25c17f8..2d1be41 100644 (file)
@@ -52,6 +52,8 @@ public class BridgeDomainSubtableCustomizer extends FutureJVppCustomizer
     public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<BridgeDomainSubtable> id,
                                        @Nonnull final BridgeDomainSubtable dataAfter,
                                        @Nonnull final WriteContext writeContext) throws WriteFailedException {
+        // TODO - HC2VPP-73 - remove after resolving ODL Boron issues
+        checkNotNull(dataAfter.getBridgeDomainRef(), "Bridge domain reference must be present");
         LOG.debug("Writing Id {} ", id);
 
         try {
@@ -76,6 +78,8 @@ public class BridgeDomainSubtableCustomizer extends FutureJVppCustomizer
     public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<BridgeDomainSubtable> id,
                                         @Nonnull final BridgeDomainSubtable dataBefore,
                                         @Nonnull final WriteContext writeContext) throws WriteFailedException {
+        // TODO - HC2VPP-73 - remove after resolving ODL Boron issues
+        checkNotNull(dataBefore.getBridgeDomainRef(), "Bridge domain reference must be present");
         LOG.debug("Removing Id {}", id);
 
         try {
index 49375f6..fc23796 100644 (file)
@@ -30,6 +30,8 @@ import io.fd.vpp.jvpp.core.future.FutureJVppCore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 public class VrfSubtableCustomizer extends FutureJVppCustomizer
         implements WriterCustomizer<VrfSubtable>, SubtableWriter {
 
@@ -43,7 +45,8 @@ public class VrfSubtableCustomizer extends FutureJVppCustomizer
     public void writeCurrentAttributes(@Nonnull final InstanceIdentifier<VrfSubtable> id,
                                        @Nonnull final VrfSubtable dataAfter, @Nonnull final WriteContext writeContext)
             throws WriteFailedException {
-
+        // TODO - HC2VPP-73 - remove after resolving ODL Boron issues
+        checkNotNull(dataAfter.getTableId(), "Table id must be present");
         LOG.debug("Writing Id[{}]/Data[{}]", id, dataAfter);
 
         try {
@@ -66,7 +69,8 @@ public class VrfSubtableCustomizer extends FutureJVppCustomizer
     public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<VrfSubtable> id,
                                         @Nonnull final VrfSubtable dataBefore, @Nonnull final WriteContext writeContext)
             throws WriteFailedException {
-
+        // TODO - HC2VPP-73 - remove after resolving ODL Boron issues
+        checkNotNull(dataBefore.getTableId(), "Table id must be present");
         LOG.debug("Removing Id[{}]/Data[{}]", id, dataBefore);
 
         try {
index 9764652..d6f773d 100644 (file)
@@ -42,8 +42,7 @@
 
     <distribution.modules>
       io.fd.hc2vpp.common.integration.VppCommonModule,
-      <!--TODO update lisp model (workaround for ODL berilium issues -->
-      <!-- io.fd.hc2vpp.lisp.LispModule,-->
+      io.fd.hc2vpp.lisp.LispModule,
       io.fd.hc2vpp.v3po.V3poModule,
       // io.fd.hc2vpp.v3po.ClassifierIetfAclModule,
       <!-- Classifier Acl's module disabled by default, can't run in the same time with AclModule -->