Binding Codecs support of APPEARED,DISAPPEARED. 58/35058/2
authorTony Tkacik <ttkacik@cisco.com>
Fri, 19 Feb 2016 10:55:13 +0000 (11:55 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 19 Feb 2016 13:03:35 +0000 (13:03 +0000)
In BE two new modification types were introduced for
structural containers, but binding codecs were not
updated accordingly.

Frontend mapping is simple:
  APPEARED -> SUBTREE_MODIFIED
  DISAPPEARED -> DELETE

Change-Id: I62810c501234a62343150c328c6f2802402669c5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataObjectModification.java

index 1170828..d81765e 100644 (file)
@@ -140,11 +140,12 @@ final class LazyDataObjectModification<T extends DataObject> implements DataObje
         switch(domData.getModificationType()) {
             case WRITE:
                 return DataObjectModification.ModificationType.WRITE;
+            case APPEARED:
             case SUBTREE_MODIFIED:
                 return DataObjectModification.ModificationType.SUBTREE_MODIFIED;
+            case DISAPPEARED:
             case DELETE:
                 return DataObjectModification.ModificationType.DELETE;
-
             default:
                 // TODO: Should we lie about modification type instead of exception?
                 throw new IllegalStateException("Unsupported DOM Modification type " + domData.getModificationType());