diff options
author | 2016-06-14 10:48:26 +0200 | |
---|---|---|
committer | 2016-06-15 08:59:04 +0200 | |
commit | cd27d3d1e8d0a1d086c60ea841da62142483a3fb (patch) | |
tree | ef692178760061bc75dcd3606885147d63965545 /v3po/vpp-cfg-init | |
parent | 8dbdffd7d25174dd8032fc80141f27a94225d984 (diff) |
HONEYCOMB-92: Process modifications recursively
+ Fix update subtree, child writer lookup
+ Change initializers operation to merge
Change-Id: I6ece7eb3d17d5a0b4a413189ddd383567d7e2270
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/vpp-cfg-init')
-rw-r--r-- | v3po/vpp-cfg-init/src/main/java/io/fd/honeycomb/v3po/vpp/data/init/AbstractDataTreeConverter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/v3po/vpp-cfg-init/src/main/java/io/fd/honeycomb/v3po/vpp/data/init/AbstractDataTreeConverter.java b/v3po/vpp-cfg-init/src/main/java/io/fd/honeycomb/v3po/vpp/data/init/AbstractDataTreeConverter.java index 575f1d860..f0058264e 100644 --- a/v3po/vpp-cfg-init/src/main/java/io/fd/honeycomb/v3po/vpp/data/init/AbstractDataTreeConverter.java +++ b/v3po/vpp-cfg-init/src/main/java/io/fd/honeycomb/v3po/vpp/data/init/AbstractDataTreeConverter.java @@ -97,7 +97,10 @@ public abstract class AbstractDataTreeConverter<O extends DataObject, C extends private void writeData(final C configData) throws TransactionCommitFailedException { final WriteTransaction writeTx = bindingDataBroker.newWriteOnlyTransaction(); - writeTx.put(LogicalDatastoreType.CONFIGURATION, idConfig, configData); + // Merge(instead of put) has to be used due to dynamic start, this might be executed multiple times + // and might overwrite config restored from persisted file with the same incomplete config. + // Making the entire configuration trigger VPP twice (on second persis ... and VPP does not like that + writeTx.merge(LogicalDatastoreType.CONFIGURATION, idConfig, configData); writeTx.submit().checkedGet(); } |