BUG 2970 : Create a PruningDataTreeModification 16/21016/7
authorMoiz Raja <moraja@cisco.com>
Sat, 23 May 2015 00:22:02 +0000 (17:22 -0700)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 29 May 2015 02:50:25 +0000 (22:50 -0400)
commit759e3c83955458b56d5d3e5a64521e0662b41004
tree00921a1e530ad2f93b57d02ad2859501e7fae808
parent1ae90cd1a9a8000a66942e38a4d1c13d3630c4f8
BUG 2970 : Create a PruningDataTreeModification

The PruningDataTreeModification automatically tries to prune the passed
in NormalizedNode if an IllegalArgumentException is thrown when doing
a write or a merge on the DataTreeModification.

*I know* that doing the pruning on IllegalArgumentException is flaky but
that is the best I can do unless we can change the implementation in yangtools
to throw a more specific exception when the data node does not map to a
the schema context

Change-Id: Iea0cea82eda8bd51c1f3f07b063404458798c348
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePruner.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeSnapshot.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/PruningDataTreeModification.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeSnapshotTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/PruningDataTreeModificationTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/md/cluster/datastore/model/SchemaContextHelper.java