BUG-2976: Resolve clash between current and feature cfg pusher
authorMaros Marsalek <mmarsale@cisco.com>
Mon, 18 May 2015 14:11:57 +0000 (16:11 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 29 May 2015 04:29:36 +0000 (04:29 +0000)
Current config pusher now stores list of features present in karaf with the
config snapshot itself. Feature pusher now looks at the list and ignores
features listed in current config in the initial push.

A WARN log message is emitted for each ignored config file + feature.

Change-Id: I6e71e692e56d5219cf02cd704dd78215f4a7f5a2
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
(cherry picked from commit fa8b972c6da7e3a24af396ea4bebe6d06f6a8d89)

opendaylight/netconf/config-persister-impl/src/test/java/org/opendaylight/controller/netconf/persist/impl/PersisterAggregatorTest.java

index e6464f8403b57859ce6ce2798a4c20a97cbe85f5..c962a46bb176f3e3ffc54424f9bcc9564a7ac36a 100644 (file)
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Properties;
+import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.config.persist.api.ConfigSnapshotHolder;
 import org.opendaylight.controller.config.persist.api.Persister;
@@ -67,6 +68,13 @@ public class PersisterAggregatorTest {
         }
     }
 
+    @Before
+    public void setUp() throws Exception {
+        if(XmlFileStorageAdapter.getInstance().isPresent()) {
+            XmlFileStorageAdapter.getInstance().get().reset();
+        }
+    }
+
     @Test
     public void testDummyAdapter() throws Exception {
         PersisterAggregator persisterAggregator = PersisterAggregator.createFromProperties(TestingPropertiesProvider.loadFile("test1.properties"));