MDSAL-298: properly handle unkeyed lists 64/67664/6
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 29 Jan 2018 13:22:35 +0000 (14:22 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 6 Mar 2018 14:11:41 +0000 (14:11 +0000)
commit73b138d9a09d44a760c92a64a53164a2fa6618f5
treec8b236e215a4a563e65a2209d3e211fd3941771a
parentb8716b003471f99e74609e34f761a053ff70b934
MDSAL-298: properly handle unkeyed lists

Unkeyed lists are not representable in binding, which means they
cannot be reported as modified children, either. This has implications
for any data change which contains unrepresentable fields as child
modifications.

Previously we would report SUBTREE_MODIFIED for the container node,
but would fail to report any children, which is obviously wrong, as the
user is left guessing as to what exactly happened.

This patch modifies LazyDataObjectModification to report a WRITE event
if modifications to unrepresentable children are found in SUBTREE_MODIFIED
case.

It also reuses BindingStructuralType from md-sal, so that we do not have
two copies of this critical class lying around requiring maintenance.

Change-Id: I30599bc26d3c993c5b6c5e2f9e6f66144a530cb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d6dc62697ecc8fea9098fb2011a666312c1f0ff7)
opendaylight/md-sal/sal-binding-broker/pom.xml
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingStructuralType.java [deleted file]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/LazyDataObjectModification.java