diff options
Diffstat (limited to 'v3po/data-impl')
-rw-r--r-- | v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java (renamed from v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModule.java) | 28 | ||||
-rw-r--r-- | v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java (renamed from v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModuleFactory.java) | 6 | ||||
-rw-r--r-- | v3po/data-impl/src/main/yang/data-impl.yang | 19 |
3 files changed, 31 insertions, 22 deletions
diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModule.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java index 9ae8a01f5..54c830ec0 100644 --- a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModule.java +++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java @@ -1,26 +1,21 @@ package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; -import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType; +import org.opendaylight.yangtools.yang.data.api.schema.tree.*; import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory; import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InMemoryConfigDataTreeModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryConfigDataTreeModule { +public class InMemoryDataTreeModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryDataTreeModule { - private static final Logger LOG = LoggerFactory.getLogger(InMemoryConfigDataTreeModule.class); + private static final Logger LOG = LoggerFactory.getLogger(InMemoryDataTreeModule.class); - public InMemoryConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { + public InMemoryDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { super(identifier, dependencyResolver); } - public InMemoryConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.InMemoryConfigDataTreeModule oldModule, java.lang.AutoCloseable oldInstance) { + public InMemoryDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.InMemoryDataTreeModule oldModule, java.lang.AutoCloseable oldInstance) { super(identifier, dependencyResolver, oldModule, oldInstance); } @@ -32,14 +27,17 @@ public class InMemoryConfigDataTreeModule extends org.opendaylight.yang.gen.v1.u @Override public java.lang.AutoCloseable createInstance() { LOG.debug("InMemoryConfigDataTreeModule.createInstance()"); - return new CloseableConfigDataTree(getSchemaServiceDependency().getGlobalContext()); + return new CloseableConfigDataTree(getSchemaServiceDependency().getGlobalContext(), getType()); } - private static class CloseableConfigDataTree implements AutoCloseable, DataTree { - private final DataTree dataTree; + private static class CloseableConfigDataTree implements AutoCloseable, + org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree { + private final org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree dataTree; - public CloseableConfigDataTree(final SchemaContext schemaContext) { - this.dataTree = InMemoryDataTreeFactory.getInstance().create(TreeType.CONFIGURATION); + public CloseableConfigDataTree(final SchemaContext schemaContext, final DatatreeType type) { + this.dataTree = InMemoryDataTreeFactory.getInstance().create( + type == DatatreeType.Config ? TreeType.CONFIGURATION : TreeType.OPERATIONAL + ); dataTree.setSchemaContext(schemaContext); } diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModuleFactory.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java index 504e007c0..34a543949 100644 --- a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryConfigDataTreeModuleFactory.java +++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java @@ -1,13 +1,13 @@ /* * Generated file * -* Generated from: yang module name: data-impl yang module local name: inmemory-config-data-tree +* Generated from: yang module name: data-impl yang module local name: inmemory-data-tree * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Tue Apr 12 07:26:54 CEST 2016 +* Generated at: Fri May 13 11:10:56 CEST 2016 * * Do not modify this file unless it is present under src/main directory */ package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411; -public class InMemoryConfigDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryConfigDataTreeModuleFactory { +public class InMemoryDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryDataTreeModuleFactory { } diff --git a/v3po/data-impl/src/main/yang/data-impl.yang b/v3po/data-impl/src/main/yang/data-impl.yang index fa6c6f06d..da1c02316 100644 --- a/v3po/data-impl/src/main/yang/data-impl.yang +++ b/v3po/data-impl/src/main/yang/data-impl.yang @@ -23,15 +23,22 @@ module data-impl { config:java-class org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; } - identity inmemory-config-data-tree { + identity inmemory-data-tree { base config:module-type; config:provided-service data-tree; - config:java-name-prefix InMemoryConfigDataTree; + config:java-name-prefix InMemoryDataTree; + } + + typedef datatree-type { + type enumeration { + enum config; + enum oper; + } } augment "/config:modules/config:module/config:configuration" { - case inmemory-config-data-tree { - when "/config:modules/config:module/config:type = 'inmemory-config-data-tree'"; + case inmemory-data-tree { + when "/config:modules/config:module/config:type = 'inmemory-data-tree'"; container schema-service { uses config:service-ref { @@ -41,6 +48,10 @@ module data-impl { } } } + + leaf type { + type datatree-type; + } } } |