summaryrefslogtreecommitdiffstats
path: root/v3po/impl
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-05-16 10:43:29 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-05-23 09:23:58 +0000
commit9e59a344c5a5b81fb7b7292184e849ad0fc9507c (patch)
tree8cb2394ef4e80389ec3d6cecc68a0eafc93bf841 /v3po/impl
parent5f10c13fc3bff497f6556f0538b08060e4f28105 (diff)
HONEYCOMB-61: Add context data tree
For storing mapping related context necessary for the plugins Add naming context adapter to store naming contexts in the data tree + Enable persistence for context data tree Change-Id: I2ac531e80e71a48d313b065997d134da2ae7ee12 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/impl')
-rw-r--r--v3po/impl/pom.xml5
-rw-r--r--v3po/impl/src/main/config/context-datatree-config.xml79
-rw-r--r--v3po/impl/src/main/config/default-config.xml9
3 files changed, 89 insertions, 4 deletions
diff --git a/v3po/impl/pom.xml b/v3po/impl/pom.xml
index 053e0ffc4..6db420bef 100644
--- a/v3po/impl/pom.xml
+++ b/v3po/impl/pom.xml
@@ -111,6 +111,11 @@
<classifier>netconf</classifier>
</artifact>
<artifact>
+ <file>src/main/config/context-datatree-config.xml</file>
+ <type>xml</type>
+ <classifier>context</classifier>
+ </artifact>
+ <artifact>
<file>src/main/config/restconf-north-config.xml</file>
<type>xml</type>
<classifier>restconf</classifier>
diff --git a/v3po/impl/src/main/config/context-datatree-config.xml b/v3po/impl/src/main/config/context-datatree-config.xml
new file mode 100644
index 000000000..c9f9902f3
--- /dev/null
+++ b/v3po/impl/src/main/config/context-datatree-config.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2016 Cisco and/or its affiliates.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at:
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+
+<snapshot>
+ <required-capabilities>
+ <capability>urn:opendaylight:params:xml:ns:yang:v3po:impl?module=v3po-impl&amp;revision=2014-12-10</capability>
+ <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&amp;revision=2016-04-06</capability>
+ <capability>urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg?module=vpp-jvpp-cfg&amp;revision=2016-04-06</capability>
+ <capability>urn:honeycomb:params:xml:ns:yang:vpp:data:init?module=vpp-cfg-init&amp;revision=2016-04-07</capability>
+ <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&amp;revision=2016-04-11</capability>
+ <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&amp;revision=2016-04-11</capability>
+ <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+ </required-capabilities>
+ <configuration>
+
+ <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+
+ <!-- TODO provide information stored in context data-tree to users as part of operational data -->
+ <!-- In-memory data tree for context(special data required for YANG <-> VPP mapping) data -->
+ <module>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:inmemory-data-tree</type>
+ <name>inmemory-context-data-tree</name>
+ <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>
+ <type xmlns="urn:honeycomb:params:xml:ns:yang:data:impl">oper</type>
+ </module>
+
+ <!-- DataTree adapter with persistence for context DT -->
+ <module>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:persisting-data-tree-adapter</type>
+ <name>inmemory-persisted-context-data-tree</name>
+ <delegate>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
+ <name>inmemory-context-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/context.json</persist-file-path>
+ </module>
+ </modules>
+ <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+ <service>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
+ <instance>
+ <name>inmemory-context-data-tree</name>
+ <provider>/modules/module[type='inmemory-data-tree'][name='inmemory-context-data-tree']
+ </provider>
+ </instance>
+ <instance>
+ <name>inmemory-persisted-context-data-tree</name>
+ <provider>/modules/module[type='persisting-data-tree-adapter'][name='inmemory-persisted-context-data-tree']
+ </provider>
+ </instance>
+ </service>
+ </services>
+ </data>
+ </configuration>
+</snapshot>
diff --git a/v3po/impl/src/main/config/default-config.xml b/v3po/impl/src/main/config/default-config.xml
index 61fe1c68d..89e1f7ce2 100644
--- a/v3po/impl/src/main/config/default-config.xml
+++ b/v3po/impl/src/main/config/default-config.xml
@@ -20,6 +20,7 @@
<capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&amp;revision=2016-04-06</capability>
<capability>urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg?module=vpp-jvpp-cfg&amp;revision=2016-04-06</capability>
<capability>urn:honeycomb:params:xml:ns:yang:vpp:data:init?module=vpp-cfg-init&amp;revision=2016-04-07</capability>
+ <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&amp;revision=2016-04-11</capability>
<capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&amp;revision=2016-04-11</capability>
<capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
</required-capabilities>
@@ -53,7 +54,7 @@
<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>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
<name>inmemory-config-data-tree</name>
</delegate>
<schema-service>
@@ -75,7 +76,7 @@
<!--</data-tree>-->
<!-- With persistence -->
<data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
<name>inmemory-persisted-config-data-tree</name>
</data-tree>
@@ -220,7 +221,7 @@
<!--</data-tree>-->
<!-- With persistence -->
<data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
<name>inmemory-persisted-config-data-tree</name>
</data-tree>
@@ -336,7 +337,7 @@
</service>
<service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>
+ <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
<instance>
<name>inmemory-config-data-tree</name>
<provider>/modules/module[type='inmemory-data-tree'][name='inmemory-config-data-tree']