summaryrefslogtreecommitdiffstats
path: root/v3po/impl/src
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-05-12 16:05:46 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-05-23 09:23:40 +0000
commit0fbc1362777869101c375006d6db423ec868924b (patch)
tree674fb4e2b1f92db7451b58cec228729da201bf80 /v3po/impl/src
parentff272ca4bb768f9075fc3dcf9a2a2e8ef8be38fa (diff)
HONEYCOMB-61: Config persister
Add PersistingDataTree adapter for in memory config data tree Using JSON NormalizedNode writers from ODL Change-Id: Ida91fe6aa34aaeaedcd061ba1551afe49bbddbbb Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/impl/src')
-rw-r--r--v3po/impl/src/main/config/default-config.xml40
1 files changed, 38 insertions, 2 deletions
diff --git a/v3po/impl/src/main/config/default-config.xml b/v3po/impl/src/main/config/default-config.xml
index f679521d1..ca09d6e0b 100644
--- a/v3po/impl/src/main/config/default-config.xml
+++ b/v3po/impl/src/main/config/default-config.xml
@@ -47,15 +47,37 @@
</schema-service>
</module>
+ <!-- DataTree adapter with persistence for config DT -->
+ <module>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:persisting-data-tree-adapter</type>
+ <name>inmemory-persisted-config-data-tree</name>
+ <delegate>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>
+ <name>inmemory-config-data-tree</name>
+ </delegate>
+ <schema-service>
+ <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
+ <name>yang-schema-service</name>
+ </schema-service>
+ <persist-file-path>etc/opendaylight/honeycomb/config.json</persist-file-path>
+ </module>
+
<!-- HC config data tree -->
<module>
<type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:honeycomb-config-data-tree</type>
<name>config-data-tree</name>
+ <!-- Without persistence -->
+ <!--<data-tree>-->
+ <!--<type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>-->
+ <!--<name>inmemory-config-data-tree</name>-->
+ <!--</data-tree>-->
+ <!-- With persistence -->
<data-tree>
<type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>
- <name>inmemory-config-data-tree</name>
+ <name>inmemory-persisted-config-data-tree</name>
</data-tree>
+
<serializer>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-dom-mapping-service</type>
<name>runtime-mapping-singleton</name>
@@ -188,10 +210,19 @@
<module>
<type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:honeycomb-config-data-tree</type>
<name>cfg-init-config-data-tree</name>
+
+ <!--FIXME do we need/want persistence here ? Do initializers only merge the data ? -->
+ <!-- Without persistence -->
+ <!--<data-tree>-->
+ <!--<type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>-->
+ <!--<name>inmemory-config-data-tree</name>-->
+ <!--</data-tree>-->
+ <!-- With persistence -->
<data-tree>
<type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>
- <name>inmemory-config-data-tree</name>
+ <name>inmemory-persisted-config-data-tree</name>
</data-tree>
+
<serializer>
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-dom-mapping-service</type>
<name>runtime-mapping-singleton</name>
@@ -310,6 +341,11 @@
<provider>/modules/module[type='inmemory-config-data-tree'][name='inmemory-config-data-tree']
</provider>
</instance>
+ <instance>
+ <name>inmemory-persisted-config-data-tree</name>
+ <provider>/modules/module[type='persisting-data-tree-adapter'][name='inmemory-persisted-config-data-tree']
+ </provider>
+ </instance>
</service>
<service>