diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-06-14 10:48:26 +0200 |
---|---|---|
committer | Maros Marsalek <mmarsale@cisco.com> | 2016-06-15 08:59:04 +0200 |
commit | d23f4be2c62a8fbab984fc7dea8ec2e317b8a662 (patch) | |
tree | 1c974f2ac8bd68a098ff9407e454c97d16b83475 /v3po/vpp-cfg-init/src | |
parent | 9ad6dfd73089e26bb74cea9ab775cb9030dacb46 (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/src')
-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(); } |