<properties>
<aopalliance.version>1.0.0</aopalliance.version>
<appauth.version>0.4.2-SNAPSHOT</appauth.version>
- <!-- Controller Modules Versions -->
<aries.util.version>1.1.0</aries.util.version>
+ <!-- Controller Modules Versions -->
<arphandler.version>0.5.2-SNAPSHOT</arphandler.version>
<asm.version>4.1</asm.version>
<!-- Plugin Versions -->
<version>${netconf.version}</version>
<type>test-jar</type>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>netconf-netty-util</artifactId>
+ <version>${netconf.version}</version>
+ <type>test-jar</type>
+ </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>netconf-ssh</artifactId>
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
-
import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.FullyQualifiedNameHelper;
import org.opendaylight.yangtools.yang.common.QName;
private final Map<String, QName> providedServices;
private Collection<RuntimeBeanEntry> runtimeBeans;
+ private String nullableDummyContainerName;
ModuleMXBeanEntry(ModuleMXBeanEntryInitial initials, Map<String, AttributeIfc> yangToAttributes,
Map<String, QName> providedServices2, Collection<RuntimeBeanEntry> runtimeBeans) {
+ '\'' + '}';
}
+ public String getNullableDummyContainerName() {
+ return nullableDummyContainerName;
+ }
+
+ public void setNullableDummyContainerName(String nullableDummyContainerName) {
+ this.nullableDummyContainerName = nullableDummyContainerName;
+ }
+
+
static final class ModuleMXBeanEntryInitial {
private String localName;
*/
package org.opendaylight.controller.config.yangjmxgenerator;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+import static java.lang.String.format;
+import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.createConfigQName;
+
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.collect.Collections2;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.annotation.Nullable;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.AbstractDependencyAttribute;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.DependencyAttribute;
import org.opendaylight.yangtools.yang.model.api.ModuleImport;
import org.opendaylight.yangtools.yang.model.api.RevisionAwareXPath;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.SchemaNode;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.UsesNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nullable;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import static com.google.common.base.Preconditions.checkState;
-import static java.lang.String.format;
-import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.createConfigQName;
-
final class ModuleMXBeanEntryBuilder {
private Module currentModule;
return true;
}
- private void processChoiceCaseNode(Map<String, ModuleMXBeanEntry> result,
+ private <HAS_CHILDREN_AND_QNAME extends DataNodeContainer & SchemaNode> void processChoiceCaseNode(Map<String, ModuleMXBeanEntry> result,
Map<String, QName> uniqueGeneratedClassesNames, String configModulePrefix,
Map<String, IdentitySchemaNode> moduleIdentities,
Map<String, IdentitySchemaNode> unaugmentedModuleIdentities, AugmentationSchema augmentation,
// runtime-data
Collection<RuntimeBeanEntry> runtimeBeans = null;
+ HAS_CHILDREN_AND_QNAME dataNodeContainer = getDataNodeContainer(choiceCaseNode);
+
if (expectedConfigurationAugmentationSchemaPath.equals(augmentation.getTargetPath())) {
logger.debug("Parsing configuration of {}", moduleLocalNameFromXPath);
- yangToAttributes = fillConfiguration(choiceCaseNode, currentModule, typeProviderWrapper, qNamesToSIEs,
+ yangToAttributes = fillConfiguration(dataNodeContainer, currentModule, typeProviderWrapper, qNamesToSIEs,
schemaContext, packageName);
checkUniqueAttributesWithGeneratedClass(uniqueGeneratedClassesNames, when.getQName(), yangToAttributes);
} else if (expectedStateAugmentationSchemaPath.equals(augmentation.getTargetPath())) {
logger.debug("Parsing state of {}", moduleLocalNameFromXPath);
try {
- runtimeBeans = fillRuntimeBeans(choiceCaseNode, currentModule, typeProviderWrapper, packageName,
+ runtimeBeans = fillRuntimeBeans(dataNodeContainer, currentModule, typeProviderWrapper, packageName,
moduleLocalNameFromXPath, javaNamePrefix);
} catch (NameConflictException e) {
throw new NameConflictException(e.getConflictingName(), when.getQName(), when.getQName());
} else {
throw new IllegalArgumentException("Cannot parse augmentation " + augmentation);
}
+ boolean hasDummyContainer = choiceCaseNode.equals(dataNodeContainer) == false;
+
+ String nullableDummyContainerName = hasDummyContainer ? dataNodeContainer.getQName().getLocalName() : null;
if (result.containsKey(moduleLocalNameFromXPath)) {
- // either fill runtimeBeans or yangToAttributes
+ // either fill runtimeBeans or yangToAttributes, merge
ModuleMXBeanEntry moduleMXBeanEntry = result.get(moduleLocalNameFromXPath);
if (yangToAttributes != null && moduleMXBeanEntry.getAttributes() == null) {
moduleMXBeanEntry.setYangToAttributes(yangToAttributes);
} else if (runtimeBeans != null && moduleMXBeanEntry.getRuntimeBeans() == null) {
moduleMXBeanEntry.setRuntimeBeans(runtimeBeans);
}
+ checkState(Objects.equals(nullableDummyContainerName, moduleMXBeanEntry.getNullableDummyContainerName()),
+ "Mismatch in module " + moduleMXBeanEntry.toString() + " - dummy container must be present/missing in" +
+ " both state and configuration");
} else {
ModuleMXBeanEntry.ModuleMXBeanEntryInitial initial = new ModuleMXBeanEntry.ModuleMXBeanEntryInitialBuilder()
.setIdSchemaNode(moduleIdentity).setPackageName(packageName).setJavaNamePrefix(javaNamePrefix)
moduleMXBeanEntry.setYangModuleName(currentModule.getName());
moduleMXBeanEntry.setYangModuleLocalname(moduleLocalNameFromXPath);
+ moduleMXBeanEntry.setNullableDummyContainerName(nullableDummyContainerName);
result.put(moduleLocalNameFromXPath, moduleMXBeanEntry);
}
}
}
private void checkUniqueTOAttr(Map<String, QName> uniqueGeneratedClassNames, QName parentQName, TOAttribute attr) {
- final String upperCaseCammelCase = attr.getUpperCaseCammelCase();
- if (uniqueGeneratedClassNames.containsKey(upperCaseCammelCase)) {
- QName firstDefinedQName = uniqueGeneratedClassNames.get(upperCaseCammelCase);
- throw new NameConflictException(upperCaseCammelCase, firstDefinedQName, parentQName);
+ final String upperCaseCamelCase = attr.getUpperCaseCammelCase();
+ if (uniqueGeneratedClassNames.containsKey(upperCaseCamelCase)) {
+ QName firstDefinedQName = uniqueGeneratedClassNames.get(upperCaseCamelCase);
+ throw new NameConflictException(upperCaseCamelCase, firstDefinedQName, parentQName);
} else {
- uniqueGeneratedClassNames.put(upperCaseCammelCase, parentQName);
+ uniqueGeneratedClassNames.put(upperCaseCamelCase, parentQName);
}
}
- private Collection<RuntimeBeanEntry> fillRuntimeBeans(ChoiceCaseNode choiceCaseNode, Module currentModule,
+ private Collection<RuntimeBeanEntry> fillRuntimeBeans(DataNodeContainer dataNodeContainer, Module currentModule,
TypeProviderWrapper typeProviderWrapper, String packageName, String moduleLocalNameFromXPath,
String javaNamePrefix) {
- return RuntimeBeanEntry.extractClassNameToRuntimeBeanMap(packageName, choiceCaseNode, moduleLocalNameFromXPath,
+ return RuntimeBeanEntry.extractClassNameToRuntimeBeanMap(packageName, dataNodeContainer, moduleLocalNameFromXPath,
typeProviderWrapper, javaNamePrefix, currentModule).values();
}
- private Map<String, AttributeIfc> fillConfiguration(ChoiceCaseNode choiceCaseNode, Module currentModule,
+ /**
+ * Since each case statement within a module must provide unique child nodes, it is allowed to wrap
+ * the actual configuration with a container node with name equal to case name.
+ *
+ * @param choiceCaseNode state or configuration case statement
+ * @return either choiceCaseNode or its only child container
+ */
+ private <HAS_CHILDREN_AND_QNAME extends DataNodeContainer & SchemaNode> HAS_CHILDREN_AND_QNAME getDataNodeContainer(ChoiceCaseNode choiceCaseNode) {
+ Set<DataSchemaNode> childNodes = choiceCaseNode.getChildNodes();
+ if (childNodes.size() == 1) {
+ DataSchemaNode onlyChild = childNodes.iterator().next();
+ if (onlyChild instanceof ContainerSchemaNode) {
+ ContainerSchemaNode onlyContainer = (ContainerSchemaNode) onlyChild;
+ if (Objects.equals(onlyContainer.getQName().getLocalName(), choiceCaseNode.getQName().getLocalName())) {
+ // the actual configuration is inside dummy container
+ return (HAS_CHILDREN_AND_QNAME) onlyContainer;
+ }
+ }
+ }
+ return (HAS_CHILDREN_AND_QNAME) choiceCaseNode;
+ }
+
+ private Map<String, AttributeIfc> fillConfiguration(DataNodeContainer dataNodeContainer, Module currentModule,
TypeProviderWrapper typeProviderWrapper, Map<QName, ServiceInterfaceEntry> qNamesToSIEs,
SchemaContext schemaContext, String packageName) {
Map<String, AttributeIfc> yangToAttributes = new HashMap<>();
- for (DataSchemaNode attrNode : choiceCaseNode.getChildNodes()) {
+ Set<DataSchemaNode> childNodes = dataNodeContainer.getChildNodes();
+ for (DataSchemaNode attrNode : childNodes) {
AttributeIfc attributeValue = getAttributeValue(attrNode, currentModule, qNamesToSIEs, typeProviderWrapper,
schemaContext, packageName);
yangToAttributes.put(attributeValue.getAttributeYangName(), attributeValue);
String prefix = m.group(1);
ModuleImport moduleImport = findModuleImport(currentModule, prefix);
foundModule = schemaContext.findModuleByName(moduleImport.getModuleName(), moduleImport.getRevision());
- checkState(foundModule != null, format("Module not found in SchemaContext by %s", moduleImport));
+ checkNotNull(foundModule, format("Module not found in SchemaContext by %s", moduleImport));
localSIName = m.group(2);
} else {
foundModule = currentModule; // no prefix => SIE is in currentModule
*/
package org.opendaylight.controller.config.yangjmxgenerator;
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkState;
+
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListAttribute;
import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.FullyQualifiedNameHelper;
import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.NameConflictException;
import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.UsesNode;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Deque;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkState;
-
/**
* Holds information about runtime bean to be generated. There are two kinds of
* RuntimeBeanEntry instances: if isRoot flag is set to true, this bean
@VisibleForTesting
RuntimeBeanEntry(String packageName,
- DataSchemaNode nodeForReporting, String yangName,
+ DataNodeContainer nodeForReporting, String yangName,
String javaNamePrefix, boolean isRoot,
Optional<String> keyYangName, List<AttributeIfc> attributes,
List<RuntimeBeanEntry> children, Set<Rpc> rpcs) {
* not contain special configuration for it.
*/
public static Map<String, RuntimeBeanEntry> extractClassNameToRuntimeBeanMap(
- String packageName, ChoiceCaseNode container,
+ String packageName, DataNodeContainer container,
String moduleYangName, TypeProviderWrapper typeProviderWrapper,
String javaNamePrefix, Module currentModule) {
}
private static RuntimeBeanEntry createRoot(String packageName,
- DataSchemaNode nodeForReporting, String attributeYangName,
+ DataNodeContainer nodeForReporting, String attributeYangName,
List<AttributeIfc> attributes, String javaNamePrefix,
List<RuntimeBeanEntry> children, Set<Rpc> rpcs) {
return new RuntimeBeanEntry(packageName, nodeForReporting,
*/
package org.opendaylight.controller.config.yangjmxgenerator;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.format;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.junit.Assert;
import org.junit.Before;
import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.YangModelSearchUtils;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.format;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
public abstract class AbstractYangTest {
protected SchemaContext context;
protected Map<String, Module> namesToModules; // are module names globally
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
+import com.google.common.base.Optional;
import java.net.URI;
import java.util.Collections;
import java.util.List;
-
import org.junit.Test;
import org.opendaylight.controller.config.yangjmxgenerator.RuntimeBeanEntry.Rpc;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
import org.opendaylight.yangtools.sal.binding.model.api.Type;
import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
-import com.google.common.base.Optional;
-
public class RuntimeRegistratorTest {
// TODO add more tests
protected RuntimeBeanEntry prepareRootRB(List<RuntimeBeanEntry> children) {
- DataSchemaNode dataSchemaNodeForReporting = mock(DataSchemaNode.class);
- doReturn("DataSchemaNode").when(dataSchemaNodeForReporting).toString();
- return new RuntimeBeanEntry("pa.cka.ge", dataSchemaNodeForReporting,
+ DataNodeContainer nodeContainer = mock(DataNodeContainer.class);
+ doReturn("DataSchemaNode").when(nodeContainer).toString();
+ return new RuntimeBeanEntry("pa.cka.ge", nodeContainer,
"module-name", "ModuleName", true, Optional.<String> absent(),
Collections.<AttributeIfc> emptyList(), children,
Collections.<Rpc> emptySet());
protected RuntimeBeanEntry prepareChildRB(List<RuntimeBeanEntry> children,
String prefix) {
- DataSchemaNode dataSchemaNodeForReporting = mock(DataSchemaNode.class);
- doReturn("DataSchemaNode").when(dataSchemaNodeForReporting).toString();
- return new RuntimeBeanEntry("pa.cka.ge", dataSchemaNodeForReporting,
+ DataNodeContainer nodeContainer = mock(DataNodeContainer.class);
+ doReturn("DataSchemaNode").when(nodeContainer).toString();
+ return new RuntimeBeanEntry("pa.cka.ge", nodeContainer,
prefix + "child-name", capitalize(prefix) + "ChildName", false,
Optional.<String> absent(),
Collections.<AttributeIfc> emptyList(), children,
augment "/config:modules/config:module/config:state" {
case bgp-listener-impl {
when "/config:modules/config:module/config:type = 'bgp-listener-impl'";
- list peers {
- config:inner-state-bean;
- leaf port {
- type inet:port-number;
- default 179;
+ container bgp-listener-impl {
+ list peers {
+ config:inner-state-bean;
+ leaf port {
+ type inet:port-number;
+ default 179;
+ }
+ leaf core-size {
+ type uint32;
+ }
}
- leaf core-size {
- type uint32;
- }
- }
- leaf as-number {
- mandatory true;
- type inet:as-number;
+ leaf as-number {
+ mandatory true;
+ type inet:as-number;
+ }
}
}
}
augment "/config:modules/config:module/config:configuration" {
case threadpool-dynamic {
when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
- leaf core-size {
- type uint32;
- }
+ container threadpool-dynamic {
+ leaf core-size {
+ type uint32;
+ }
- leaf keep-alive {
- type uint32;
- units seconds;
- default 10;
- }
+ leaf keep-alive {
+ type uint32;
+ units seconds;
+ default 10;
+ }
- leaf maximum-size {
- type uint32;
- description "maximum-size description";
- }
+ leaf maximum-size {
+ type uint32;
+ description "maximum-size description";
+ }
- leaf binary {
- type binary;
- }
+ leaf binary {
+ type binary;
+ }
- container threadfactory {
- description "threadfactory description";
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity th2:threadfactory;
+ container threadfactory {
+ description "threadfactory description";
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity th2:threadfactory;
+ }
}
}
- }
- leaf-list users {
- type string;
- }
+ leaf-list users {
+ type string;
+ }
- leaf-list users-numbers {
- type uint32;
- description "numbers of users description";
+ leaf-list users-numbers {
+ type uint32;
+ description "numbers of users description";
+ }
}
}
}
augment "/config:modules/config:module/config:state" {
case threadpool-dynamic {
when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
- // root runtime bean
- leaf created-sessions {
- type uint32;
+ container threadpool-dynamic {
+ // root runtime bean
+ leaf created-sessions {
+ type uint32;
+ }
}
}
}
augment "/config:modules/config:module/config:configuration" {
case impl-netconf {
when "/config:modules/config:module/config:type = 'impl-netconf'";
- leaf binaryLeaf {
- type binary;
- default ZGVmYXVsdEJpbg==;
- }
-
- leaf type {
- type string;
- default "default-string";
- }
+ container impl-netconf {
+ leaf binaryLeaf {
+ type binary;
+ default ZGVmYXVsdEJpbg==;
+ }
- leaf extended {
- type tt:extend-once;
- default 1;
- }
+ leaf type {
+ type string;
+ default "default-string";
+ }
- leaf extended-twice {
- type tt:extend-twice;
- default 2;
- }
+ leaf extended {
+ type tt:extend-once;
+ default 1;
+ }
- leaf extended-enum {
- type tt:extend-enum;
- default ONE;
- }
+ leaf extended-twice {
+ type tt:extend-twice;
+ default 2;
+ }
- leaf ip {
- type inet:ip-address;
- default 0:0:0:0:0:0:0:1;
- }
+ leaf extended-enum {
+ type tt:extend-enum;
+ default ONE;
+ }
- leaf union-test-attr {
- type tt:unionTest;
- default 456;
- }
+ leaf ip {
+ type inet:ip-address;
+ default 0:0:0:0:0:0:0:1;
+ }
- leaf sleep-factor {
- type decimal64 {
- fraction-digits 2;
+ leaf union-test-attr {
+ type tt:unionTest;
+ default 456;
}
- default 2.00;
- }
- container dto-c {
- leaf simple-arg {
- type uint32;
+ leaf sleep-factor {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ default 2.00;
}
- container dto-a-inner {
+ container dto-c {
leaf simple-arg {
type uint32;
}
- container dto-a-inner-inner {
+ container dto-a-inner {
leaf simple-arg {
type uint32;
}
+
+ container dto-a-inner-inner {
+ leaf simple-arg {
+ type uint32;
+ }
+ }
}
}
- }
-
- leaf simpleInt {
- type uint32;
- }
-
- leaf simpleBoolean {
- type boolean;
- default false;
- }
-
- leaf simple-long {
- type int64;
- default -45;
- }
-
- leaf simple-long-2 {
- type uint32;
- default 445;
- }
- leaf simple-BigInteger {
- type uint64;
- default 545454;
- }
+ leaf simpleInt {
+ type uint32;
+ }
- leaf simple-byte {
- type int8;
- default -4;
- }
+ leaf simpleBoolean {
+ type boolean;
+ default false;
+ }
- leaf simple-short {
- type uint8;
- default 45;
- }
+ leaf simple-long {
+ type int64;
+ default -45;
+ }
- leaf simple-test {
- type uint16;
- default 99;
- }
+ leaf simple-long-2 {
+ type uint32;
+ default 445;
+ }
- leaf-list simple-list {
- type uint16;
- }
+ leaf simple-BigInteger {
+ type uint64;
+ default 545454;
+ }
- container dto_d {
- leaf simple-int1 {
- type uint32;
+ leaf simple-byte {
+ type int8;
+ default -4;
}
- leaf simple-int2 {
- type uint32;
+ leaf simple-short {
+ type uint8;
+ default 45;
}
- leaf simple-int3 {
+ leaf simple-test {
type uint16;
+ default 99;
}
leaf-list simple-list {
type uint16;
}
- list complex-dto-bInner {
- leaf-list simple-list {
- type uint16;
+ container dto_d {
+ leaf simple-int1 {
+ type uint32;
}
+
+ leaf simple-int2 {
+ type uint32;
+ }
+
leaf simple-int3 {
type uint16;
}
- container deep {
+ leaf-list simple-list {
+ type uint16;
+ }
+
+ list complex-dto-bInner {
+ leaf-list simple-list {
+ type uint16;
+ }
leaf simple-int3 {
type uint16;
- default 0;
+ }
+
+ container deep {
+ leaf simple-int3 {
+ type uint16;
+ default 0;
+ }
}
}
}
- }
- list complex-list {
- list simple-list {
- leaf simple-int3 {
- type uint16;
+ list complex-list {
+ list simple-list {
+ leaf simple-int3 {
+ type uint16;
+ }
}
}
- }
- list peers {
- leaf port {
- type string;
- }
- leaf core-size {
- type uint32;
- }
- leaf simple-int3 {
- type uint16;
- }
- }
+ list peers {
+ leaf port {
+ type string;
+ }
+ leaf core-size {
+ type uint32;
+ }
+ leaf simple-int3 {
+ type uint16;
+ }
+ }
- container testing-dep {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity test:testing;
+ container testing-dep {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity test:testing;
+ }
}
}
- }
- list testing-deps {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity test:testing;
+ list testing-deps {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity test:testing;
+ }
}
}
}
augment "/config:modules/config:module/config:state" {
case impl-netconf {
when "/config:modules/config:module/config:type = 'impl-netconf'";
- // rpc
- rpcx:rpc-context-instance "test-rpc";
-
- // root runtime bean
- leaf created-sessions {
- type uint32;
- }
-
- container asdf {
- leaf simpleInt {
- type uint16;
- }
+ container impl-netconf {
+ // rpc
+ rpcx:rpc-context-instance "test-rpc";
- leaf simpleString {
- type string;
+ // root runtime bean
+ leaf created-sessions {
+ type uint32;
}
- }
+ container asdf {
+ leaf simpleInt {
+ type uint16;
+ }
- list inner-running-data-additional {
- config:inner-state-bean;
+ leaf simpleString {
+ type string;
+ }
+ }
- // rpc
- rpcx:rpc-context-instance "inner-test-rpc";
- key "simpleString";
+ list inner-running-data-additional {
+ config:inner-state-bean;
- leaf simple-int3 {
- type uint16;
- }
+ // rpc
+ rpcx:rpc-context-instance "inner-test-rpc";
- leaf simpleString {
- type string;
- }
+ key "simpleString";
- container deep4 {
- leaf boool {
- type boolean;
+ leaf simple-int3 {
+ type uint16;
}
- }
- }
-
- list inner-running-data {
- config:inner-state-bean;
- key "simple-int3";
-
- leaf simple-int3 {
- type uint16;
+ leaf simpleString {
+ type string;
}
- container deep2 {
- leaf boool {
- type boolean;
+ container deep4 {
+ leaf boool {
+ type boolean;
+ }
}
- }
+ }
- list inner-inner-running-data {
+ list inner-running-data {
config:inner-state-bean;
- rpcx:rpc-context-instance "inner-inner-test-rpc";
- rpcx:rpc-context-instance "complex-output-rpc";
-
key "simple-int3";
leaf simple-int3 {
- type uint16;
- }
+ type uint16;
+ }
- leaf-list list-of-strings {
- type string;
- }
+ container deep2 {
+ leaf boool {
+ type boolean;
+ }
+ }
- list not-state-bean {
- leaf element {
- type string;
+ list inner-inner-running-data {
+ config:inner-state-bean;
+
+ rpcx:rpc-context-instance "inner-inner-test-rpc";
+ rpcx:rpc-context-instance "complex-output-rpc";
+
+ key "simple-int3";
+
+ leaf simple-int3 {
+ type uint16;
}
- list not-state-bean-internal {
- // This should be ignored
- config:inner-state-bean;
+ leaf-list list-of-strings {
+ type string;
+ }
- leaf element2 {
+ list not-state-bean {
+ leaf element {
type string;
}
+
+ list not-state-bean-internal {
+ // This should be ignored
+ config:inner-state-bean;
+
+ leaf element2 {
+ type string;
+ }
+ }
}
- }
- container deep3 {
- leaf boool {
- type boolean;
+ container deep3 {
+ leaf boool {
+ type boolean;
+ }
}
}
}
import org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditStrategyType;
import org.opendaylight.controller.netconf.util.xml.XmlElement;
import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants;
+import org.opendaylight.controller.netconf.util.xml.XmlUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
private static final Logger logger = LoggerFactory.getLogger(InstanceConfig.class);
private final Map<String, AttributeIfc> yangToAttrConfig;
+ private final String nullableDummyContainerName;
private final Map<String, AttributeIfc> jmxToAttrConfig;
private final ConfigRegistryClient configRegistryClient;
- public InstanceConfig(ConfigRegistryClient configRegistryClient, Map<String, AttributeIfc> yangNamesToAttributes) {
+ public InstanceConfig(ConfigRegistryClient configRegistryClient, Map<String, AttributeIfc> yangNamesToAttributes,
+ String nullableDummyContainerName) {
+
this.yangToAttrConfig = yangNamesToAttributes;
+ this.nullableDummyContainerName = nullableDummyContainerName;
this.jmxToAttrConfig = reverseMap(yangNamesToAttributes);
this.configRegistryClient = configRegistryClient;
}
}
public Element toXml(ObjectName on, String namespace, Document document, Element rootElement) {
-
Map<String, AttributeWritingStrategy> strats = new ObjectXmlWriter().prepareWriting(yangToAttrConfig, document);
-
Map<String, Object> mappedConfig = getMappedConfiguration(on);
-
+ Element parentElement;
+ if (nullableDummyContainerName != null) {
+ Element dummyElement = XmlUtil.createElement(document, nullableDummyContainerName, Optional.of(namespace));
+ rootElement.appendChild(dummyElement);
+ parentElement = dummyElement;
+ } else {
+ parentElement = rootElement;
+ }
for (Entry<String, ?> mappingEntry : mappedConfig.entrySet()) {
try {
- strats.get(mappingEntry.getKey()).writeElement(rootElement, namespace, mappingEntry.getValue());
+ strats.get(mappingEntry.getKey()).writeElement(parentElement, namespace, mappingEntry.getValue());
} catch (Exception e) {
throw new IllegalStateException("Unable to write value " + mappingEntry.getValue() + " for attribute "
+ mappingEntry.getValue(), e);
}
}
-
return rootElement;
}
Map<String, AttributeReadingStrategy> strats = new ObjectXmlReader().prepareReading(yangToAttrConfig, identityMap);
List<XmlElement> recognisedChildren = Lists.newArrayList();
- XmlElement type;
- XmlElement name;
- type = moduleElement.getOnlyChildElementWithSameNamespace(XmlNetconfConstants.TYPE_KEY);
- name = moduleElement.getOnlyChildElementWithSameNamespace(XmlNetconfConstants.NAME_KEY);
- List<XmlElement> typeAndName = Lists.newArrayList(type, name);
+ XmlElement typeElement = moduleElement.getOnlyChildElementWithSameNamespace(XmlNetconfConstants.TYPE_KEY);
+ XmlElement nameElement = moduleElement.getOnlyChildElementWithSameNamespace(XmlNetconfConstants.NAME_KEY);
+ List<XmlElement> typeAndNameElements = Lists.newArrayList(typeElement, nameElement);
+
+ // if dummy container was defined in yang, set moduleElement to its content
+ if (nullableDummyContainerName != null) {
+ int size = moduleElement.getChildElements().size();
+ int expectedChildNodes = 1 + typeAndNameElements.size();
+ if (size > expectedChildNodes) {
+ throw new NetconfDocumentedException("Error reading module " + typeElement.getTextContent() + " : " +
+ nameElement.getTextContent() + " - Expected " + expectedChildNodes +" child nodes, " +
+ "one of them with name " + nullableDummyContainerName +
+ ", got " + size + " elements.");
+ }
+ if (size == expectedChildNodes) {
+ try {
+ moduleElement = moduleElement.getOnlyChildElement(nullableDummyContainerName, moduleNamespace);
+ } catch (NetconfDocumentedException e) {
+ throw new NetconfDocumentedException("Error reading module " + typeElement.getTextContent() + " : " +
+ nameElement.getTextContent() + " - Expected child node with name " + nullableDummyContainerName +
+ "." + e.getMessage());
+ }
+ } // else 2 elements, no need to descend
+ }
for (Entry<String, AttributeReadingStrategy> readStratEntry : strats.entrySet()) {
List<XmlElement> configNodes = getConfigNodes(moduleElement, moduleNamespace, readStratEntry.getKey(),
- recognisedChildren, typeAndName);
+ recognisedChildren, typeAndNameElements);
AttributeConfigElement readElement = readStratEntry.getValue().readElement(configNodes);
retVal.put(readStratEntry.getKey(), readElement);
}
- recognisedChildren.addAll(typeAndName);
- moduleElement.checkUnrecognisedElements(recognisedChildren);
-
+ recognisedChildren.addAll(typeAndNameElements);
+ try {
+ moduleElement.checkUnrecognisedElements(recognisedChildren);
+ } catch (NetconfDocumentedException e) {
+ throw new NetconfDocumentedException("Error reading module " + typeElement.getTextContent() + " : " +
+ nameElement.getTextContent() + " - " +
+ e.getMessage(), e.getErrorType(), e.getErrorTag(),e.getErrorSeverity(),e.getErrorInfo());
+ }
// TODO: add check for conflicts between global and local edit strategy
String perInstanceEditStrategy = moduleElement.getAttribute(XmlNetconfConstants.OPERATION_ATTR_KEY,
XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
String moduleName = moduleNameToMbe.getKey();
ModuleMXBeanEntry moduleMXBeanEntry = moduleNameToMbe.getValue();
- ModuleConfig moduleConfig = new ModuleConfig(moduleName, new InstanceConfig(configRegistryClient,
- moduleMXBeanEntry.getAttributes()));
+ ModuleConfig moduleConfig = new ModuleConfig(moduleName,
+ new InstanceConfig(configRegistryClient,moduleMXBeanEntry.getAttributes(), moduleMXBeanEntry.getNullableDummyContainerName()));
Map<String, ModuleConfig> moduleNameToModuleConfig = namespaceToModuleNameToModuleConfig.get(namespace);
if(moduleNameToModuleConfig == null) {
Map<RuntimeBeanEntry, InstanceConfig> cache = Maps.newHashMap();
RuntimeBeanEntry root = null;
for (RuntimeBeanEntry rbe : mbe.getRuntimeBeans()) {
- cache.put(rbe, new InstanceConfig(configRegistryClient, rbe.getYangPropertiesToTypesMap()));
+ cache.put(rbe, new InstanceConfig(configRegistryClient, rbe.getYangPropertiesToTypesMap(), mbe.getNullableDummyContainerName()));
if (rbe.isRoot()){
root = rbe;
}
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
import org.opendaylight.controller.config.yang.test.impl.NetconfTestImplModuleFactory;
import org.opendaylight.controller.config.yang.test.impl.NetconfTestImplModuleMXBean;
import org.opendaylight.controller.config.yang.test.impl.Peers;
+import org.opendaylight.controller.config.yang.test.impl.TestImplModuleFactory;
import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
import org.opendaylight.controller.netconf.confignetconfconnector.operations.Commit;
import org.opendaylight.controller.netconf.mapping.api.NetconfOperation;
import org.opendaylight.controller.netconf.mapping.api.NetconfOperationChainedExecution;
import org.opendaylight.controller.netconf.util.test.XmlFileLoader;
-import org.opendaylight.controller.netconf.util.xml.XmlElement;
import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants;
import org.opendaylight.controller.netconf.util.xml.XmlUtil;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.test.types.rev131127.TestIdentity1;
private NetconfTestImplModuleFactory factory;
private DepTestImplModuleFactory factory2;
private IdentityTestModuleFactory factory3;
+ private TestImplModuleFactory factory4;
@Mock
YangStoreSnapshot yangStoreSnapshot;
this.factory = new NetconfTestImplModuleFactory();
this.factory2 = new DepTestImplModuleFactory();
this.factory3 = new IdentityTestModuleFactory();
+ factory4 = new TestImplModuleFactory();
super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext, this.factory, this.factory2,
- this.factory3));
+ this.factory3, factory4));
transactionProvider = new TransactionProvider(this.configRegistryClient, NETCONF_SESSION_ID);
}
assertEquals(2, afterReplace);
}
- @Test(expected = NetconfDocumentedException.class)
+ @Test
public void testSameAttrDifferentNamespaces() throws Exception {
try {
edit("netconfMessages/namespaces/editConfig_sameAttrDifferentNamespaces.xml");
+ fail();
} catch (NetconfDocumentedException e) {
String message = e.getMessage();
- assertContainsString(message, "Element simple-long-2 present multiple times with different namespaces");
+ assertContainsString(message, "Element simpleInt present multiple times with different namespaces");
assertContainsString(message, TEST_NAMESPACE);
assertContainsString(message, XmlNetconfConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG);
- throw e;
}
}
- @Test(expected = NetconfDocumentedException.class)
+ @Test
public void testDifferentNamespaceInTO() throws Exception {
try {
edit("netconfMessages/namespaces/editConfig_differentNamespaceTO.xml");
+ fail();
} catch (NetconfDocumentedException e) {
String message = e.getMessage();
assertContainsString(message, "Unrecognised elements");
assertContainsString(message, "simple-int2");
assertContainsString(message, "dto_d");
- throw e;
}
}
- @Test(expected = NetconfDocumentedException.class)
+ @Test
public void testSameAttrDifferentNamespacesList() throws Exception {
try {
edit("netconfMessages/namespaces/editConfig_sameAttrDifferentNamespacesList.xml");
+ fail();
} catch (NetconfDocumentedException e) {
String message = e.getMessage();
- assertContainsString(message, "Element binaryLeaf present multiple times with different namespaces");
+ assertContainsString(message, "Element allow-user present multiple times with different namespaces");
assertContainsString(message, TEST_NAMESPACE);
assertContainsString(message, XmlNetconfConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG);
- throw e;
}
}
for (int i = 0; i < TESTS_COUNT; i++) {
String file = String.format(format, i + 1);
+ logger.info("Reading {}", file);
try {
edit(file);
} catch (NetconfDocumentedException e) {
assertThat(string, JUnitMatchers.containsString(substring));
}
- private void checkEnum(final Document response) throws NetconfDocumentedException {
- XmlElement modulesElement = XmlElement.fromDomElement(response.getDocumentElement()).getOnlyChildElement("data")
- .getOnlyChildElement("modules");
+ private void checkEnum(final Document response) throws Exception {
- String enumName = "extended-enum";
- String enumContent = "TWO";
+ String expectedEnumContent = "TWO";
- for (XmlElement moduleElement : modulesElement.getChildElements("module")) {
- String name = moduleElement.getOnlyChildElement("name").getTextContent();
- if(name.equals(INSTANCE_NAME)) {
- XmlElement enumAttr = moduleElement.getOnlyChildElement(enumName);
- assertEquals(enumContent, enumAttr.getTextContent());
- return;
- }
- }
-
- fail("Enum attribute " + enumName + ":" + enumContent + " not present in " + XmlUtil.toString(response));
+ XMLAssert.assertXpathEvaluatesTo(expectedEnumContent,
+ getXpathForNetconfImplSubnode(INSTANCE_NAME,"extended-enum"),
+ response);
}
private void checkTestingDeps(Document response) {
assertEquals(2, testingDepsSize);
}
- private void checkTypeConfigAttribute(Document response) throws NetconfDocumentedException {
-
- XmlElement modulesElement = XmlElement.fromDomElement(response.getDocumentElement()).getOnlyChildElement("data")
- .getOnlyChildElement("modules");
-
- List<String> expectedValues = Lists.newArrayList("default-string", "configAttributeType");
- Set<String> configAttributeType = Sets.newHashSet();
+ private String getXpathForNetconfImplSubnode(String instanceName, String subnode) {
+ return "/urn:ietf:params:xml:ns:netconf:base:1.0:rpc-reply" +
+ "/urn:ietf:params:xml:ns:netconf:base:1.0:data" +
+ "/urn:opendaylight:params:xml:ns:yang:controller:config:modules" +
+ "/module[name='"+instanceName+"']" +
+ "/urn:opendaylight:params:xml:ns:yang:controller:test:impl:impl-netconf" +
+ "/urn:opendaylight:params:xml:ns:yang:controller:test:impl:"+subnode;
+ }
- for (XmlElement moduleElement : modulesElement.getChildElements("module")) {
- for (XmlElement type : moduleElement.getChildElements("type")) {
- if (type.getNamespaceOptionally().isPresent()) {
- configAttributeType.add(type.getTextContent());
- }
- }
- }
+ private void checkTypeConfigAttribute(Document response) throws Exception {
- for (String expectedValue : expectedValues) {
- assertTrue(configAttributeType.contains(expectedValue));
+ Map<String,String> namesToTypeValues = ImmutableMap.of("instance-from-code", "configAttributeType",
+ "test2", "default-string");
+ for (Entry<String, String> nameToExpectedValue : namesToTypeValues.entrySet()) {
+ XMLAssert.assertXpathEvaluatesTo(nameToExpectedValue.getValue(),
+ getXpathForNetconfImplSubnode(nameToExpectedValue.getKey(),"type"),
+ response);
}
}
private final ErrorSeverity errorSeverity;
private final Map<String, String> errorInfo;
+ public NetconfDocumentedException(String message) {
+ this(message,
+ NetconfDocumentedException.ErrorType.application,
+ NetconfDocumentedException.ErrorTag.invalid_value,
+ NetconfDocumentedException.ErrorSeverity.error
+ );
+ }
+
public NetconfDocumentedException(final String message, final ErrorType errorType, final ErrorTag errorTag,
final ErrorSeverity errorSeverity) {
this(message, errorType, errorTag, errorSeverity, Collections.<String, String> emptyMap());
import org.custommonkey.xmlunit.NodeTest;
import org.custommonkey.xmlunit.NodeTestException;
import org.custommonkey.xmlunit.NodeTester;
+import org.opendaylight.controller.netconf.util.xml.XmlUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@Override
public void noMoreNodes(NodeTest forTest) throws NodeTestException {
- assertTrue(elementFound);
+ assertTrue(XmlUtil.toString(doc), elementFound);
}
};
assertNodeTestPasses(nt, tester, new short[]{Node.ELEMENT_NODE}, true);
</type>
<name>instance-from-code</name>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <sleep-factor>
+ 2.58
+ </sleep-factor>
- <sleep-factor>
- 2.58
- </sleep-factor>
+ <extended>
+ 10
+ </extended>
- <extended>
- 10
- </extended>
+ <extended-twice>
+ 20
+ </extended-twice>
- <extended-twice>
- 20
- </extended-twice>
+ <extended-enum>
+ TWO
+ </extended-enum>
- <extended-enum>
- TWO
- </extended-enum>
+ <simple-long-2>44</simple-long-2>
+ <binaryLeaf>YmluYXJ5</binaryLeaf>
- <simple-long-2>44</simple-long-2>
- <binaryLeaf>YmluYXJ5</binaryLeaf>
-
- <type xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">configAttributeType</type>
- <dto_d xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
- <simple-int1>444</simple-int1>
- <simple-int2>4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
+ <type xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">configAttributeType</type>
+ <dto_d xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-int1>444</simple-int1>
+ <simple-int2>4444</simple-int2>
+ <simple-int3>454</simple-int3>
+ <complex-dto-bInner>
+ <simple-int3>44</simple-int3>
+ <deep>
+ <simple-int3>4</simple-int3>
+ </deep>
+ <simple-list>4</simple-list>
+ </complex-dto-bInner>
<simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep_user</name>
- </testing-dep>
+ </dto_d>
+ <simpleInt>44</simpleInt>
+ <simple-test>545</simple-test>
+ <simple-long>454545</simple-long>
+ <simpleBoolean>false</simpleBoolean>
+ <dto-c>
+ <dto-a-inner>
+ <dto-a-inner-inner>
+ <simple-arg>456</simple-arg>
+ </dto-a-inner-inner>
+ <simple-arg>44</simple-arg>
+ </dto-a-inner>
+ </dto-c>
+ <simple-short>4</simple-short>
+ <simple-BigInteger>999</simple-BigInteger>
+ <simple-byte>4</simple-byte>
+ <peers>
+ <port>port1</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <peers>
+ <port>port23</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep_user</name>
+ </testing-dep>
- <testing-deps>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep_user</name>
- </testing-deps>
- <testing-deps>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep_user_two</name>
- </testing-deps>
+ <testing-deps>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep_user</name>
+ </testing-deps>
+ <testing-deps>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep_user_two</name>
+ </testing-deps>
+ </impl-netconf>
</module>
<module>
test-impl:impl-netconf
</type>
<name>test2</name>
- <simple-short>4</simple-short>
-
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep_user_two</name>
- </testing-dep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-short>4</simple-short>
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep_user_two</name>
+ </testing-dep>
+ </impl-netconf>
</module>
</modules>
test-impl:impl-netconf
</type>
<name>instance-from-code</name>
- <simple-long-2>44</simple-long-2>
- <binaryLeaf>8ad1</binaryLeaf>
- <dto_d>
- <simple-int1>444</simple-int1>
- <simple-int2>4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-long-2>44</simple-long-2>
+ <binaryLeaf>8ad1</binaryLeaf>
+ <dto_d>
+ <simple-int1>444</simple-int1>
+ <simple-int2>4444</simple-int2>
+ <simple-int3>454</simple-int3>
+ <complex-dto-bInner>
+ <simple-int3>44</simple-int3>
+ <deep>
+ <simple-int3>4</simple-int3>
+ </deep>
+ <simple-list>4</simple-list>
+ </complex-dto-bInner>
<simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
+ </dto_d>
+ <simpleInt>44</simpleInt>
+ <simple-test>545</simple-test>
+ <simple-long>454545</simple-long>
+ <simpleBoolean>false</simpleBoolean>
+ <dto-c>
+ <dto-a-inner>
+ <dto-a-inner-inner>
+ <simple-arg>456</simple-arg>
+ </dto-a-inner-inner>
+ <simple-arg>44</simple-arg>
+ </dto-a-inner>
+ </dto-c>
+ <simple-short>4</simple-short>
+ <simple-BigInteger>999</simple-BigInteger>
+ <simple-byte>4</simple-byte>
+ <peers>
+ <port>port1</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <peers>
+ <port>port23</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ </impl-netconf>
</module>
<module>
<type xmlns:test-impl="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
</type>
<name>instance-from-code</name>
-
- <ip xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">127.1.2.3</ip>
- <union-test-attr xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">randomStringForUnion</union-test-attr>
-
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <ip xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">127.1.2.3</ip>
+ <union-test-attr xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">randomStringForUnion</union-test-attr>
+ </impl-netconf>
</module>
</modules>
</type>
<name>test1</name>
-
- <simple-long-2>44</simple-long-2>
- <binaryLeaf>8545649856</binaryLeaf>
- <type xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">configAttributeType</type>
- <dto_d>
- <simple-int1>444</simple-int1>
- <simple-int2 xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-long-2>44</simple-long-2>
+ <binaryLeaf>8545649856</binaryLeaf>
+ <type xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">configAttributeType</type>
+ <dto_d>
+ <simple-int1>444</simple-int1>
+ <simple-int2 xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl2">4444</simple-int2>
+ <simple-int3>454</simple-int3>
+ <complex-dto-bInner>
+ <simple-int3>44</simple-int3>
+ <deep>
+ <simple-int3>4</simple-int3>
+ </deep>
+ <simple-list>4</simple-list>
+ </complex-dto-bInner>
<simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ </dto_d>
+ <simpleInt>44</simpleInt>
+ <simple-test>545</simple-test>
+ <simple-long>454545</simple-long>
+ <simpleBoolean>false</simpleBoolean>
+ <dto-c>
+ <dto-a-inner>
+ <dto-a-inner-inner>
+ <simple-arg>456</simple-arg>
+ </dto-a-inner-inner>
+ <simple-arg>44</simple-arg>
+ </dto-a-inner>
+ </dto-c>
+ <simple-short>4</simple-short>
+ <simple-BigInteger>999</simple-BigInteger>
+ <simple-byte>4</simple-byte>
+ <peers>
+ <port>port1</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <peers>
+ <port>port23</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
<module>
test-impl:impl-netconf
</type>
<name>test2</name>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
</modules>
</type>
</module>
+ <module>
+ <type xmlns:test-impl="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ test-impl:impl
+ </type>
+
+ <name>testimpl</name>
+ <simpleInt>1</simpleInt>
+ <simpleInt xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">2</simpleInt>
+ </module>
+
<module>
<type xmlns:test-impl="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
test-impl:impl-netconf
</type>
<name>test1</name>
-
- <simple-long-2>44</simple-long-2>
- <simple-long-2 xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">44</simple-long-2>
- <binaryLeaf>8</binaryLeaf>
- <binaryLeaf>1</binaryLeaf>
- <binaryLeaf>0</binaryLeaf>
- <type xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">configAttributeType</type>
- <dto_d xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
- <simple-int1>444</simple-int1>
- <simple-int2>4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-long-2>44</simple-long-2>
+ <simple-long-2 xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">44</simple-long-2>
+ <binaryLeaf></binaryLeaf>
+ <type xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">configAttributeType</type>
+ <dto_d xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-int1>444</simple-int1>
+ <simple-int2>4444</simple-int2>
+ <simple-int3>454</simple-int3>
+ <complex-dto-bInner>
+ <simple-int3>44</simple-int3>
+ <deep>
+ <simple-int3>4</simple-int3>
+ </deep>
+ <simple-list>4</simple-list>
+ </complex-dto-bInner>
<simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ </dto_d>
+ <simpleInt>44</simpleInt>
+ <simple-test>545</simple-test>
+ <simple-long>454545</simple-long>
+ <simpleBoolean>false</simpleBoolean>
+ <dto-c>
+ <dto-a-inner>
+ <dto-a-inner-inner>
+ <simple-arg>456</simple-arg>
+ </dto-a-inner-inner>
+ <simple-arg>44</simple-arg>
+ </dto-a-inner>
+ </dto-c>
+ <simple-short>4</simple-short>
+ <simple-BigInteger>999</simple-BigInteger>
+ <simple-byte>4</simple-byte>
+ <peers>
+ <port>port1</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <peers>
+ <port>port23</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
<module>
test-impl:impl-netconf
</type>
<name>test2</name>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
</modules>
<module>
<type xmlns:test-impl="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
- test-impl:impl-netconf
+ test-impl:impl
</type>
<name>test1</name>
-
- <simple-long-2>44</simple-long-2>
- <binaryLeaf>8</binaryLeaf>
- <binaryLeaf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">1</binaryLeaf>
- <binaryLeaf>0</binaryLeaf>
- <type xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">configAttributeType</type>
- <dto_d xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
- <simple-int1>444</simple-int1>
- <simple-int2>4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
- <simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ <allow-user>1</allow-user>
+ <allow-user xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">2</allow-user>
</module>
<module>
test-impl:impl-netconf
</type>
<name>test2</name>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
</modules>
<services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <instance>
- <name>ref_dep</name>
- <provider>/modules/module[type='impl-dep'][name='dep']
- </provider>
- </instance>
- <instance>
- <name>ref_dep_2</name>
- <provider>/modules/module[type='impl-dep'][name='dep2']
- </provider>
- </instance>
- <instance>
- <name>ref_test1</name>
- <provider>
- /modules/module[type='impl-netconf'][name='test1']
- </provider>
- </instance>
- </service>
+
</services>
</config>
</edit-config>
</type>
<name>test1</name>
-
- <simple-long-2>44</simple-long-2>
- <binaryLeaf>8545649856</binaryLeaf>
- <dto_d xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
- <simple-int1>444</simple-int1>
- <simple-int2>4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-long-2>44</simple-long-2>
+ <binaryLeaf>8545649856</binaryLeaf>
+ <dto_d xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-int1>444</simple-int1>
+ <simple-int2>4444</simple-int2>
+ <simple-int3>454</simple-int3>
+ <complex-dto-bInner>
+ <simple-int3>44</simple-int3>
+ <deep>
+ <simple-int3>4</simple-int3>
+ </deep>
+ <simple-list>4</simple-list>
+ </complex-dto-bInner>
<simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ </dto_d>
+ <simpleInt>44</simpleInt>
+ <simple-test>545</simple-test>
+ <simple-long>454545</simple-long>
+ <simpleBoolean>false</simpleBoolean>
+ <dto-c>
+ <dto-a-inner>
+ <dto-a-inner-inner>
+ <simple-arg>456</simple-arg>
+ </dto-a-inner-inner>
+ <simple-arg>44</simple-arg>
+ </dto-a-inner>
+ </dto-c>
+ <simple-short>4</simple-short>
+ <simple-BigInteger>999</simple-BigInteger>
+ <simple-byte>4</simple-byte>
+ <peers>
+ <port>port1</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <peers>
+ <port>port23</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
<module>
test-impl:impl-netconf
</type>
<name>test2</name>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
</modules>
</type>
<name>test1</name>
-
- <simple-long-2>44</simple-long-2>
- <binaryLeaf>8545649856</binaryLeaf>
- <dto_d>
- <unknownAttribute>error</unknownAttribute>
- <simple-int1>444</simple-int1>
- <simple-int2>4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-long-2>44</simple-long-2>
+ <binaryLeaf>8545649856</binaryLeaf>
+ <dto_d>
+ <unknownAttribute>error</unknownAttribute>
+ <simple-int1>444</simple-int1>
+ <simple-int2>4444</simple-int2>
+ <simple-int3>454</simple-int3>
+ <complex-dto-bInner>
+ <simple-int3>44</simple-int3>
+ <deep>
+ <simple-int3>4</simple-int3>
+ </deep>
+ <simple-list>4</simple-list>
+ </complex-dto-bInner>
<simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ </dto_d>
+ <simpleInt>44</simpleInt>
+ <simple-test>545</simple-test>
+ <simple-long>454545</simple-long>
+ <simpleBoolean>false</simpleBoolean>
+ <dto-c>
+ <dto-a-inner>
+ <dto-a-inner-inner>
+ <simple-arg>456</simple-arg>
+ </dto-a-inner-inner>
+ <simple-arg>44</simple-arg>
+ </dto-a-inner>
+ </dto-c>
+ <simple-short>4</simple-short>
+ <simple-BigInteger>999</simple-BigInteger>
+ <simple-byte>4</simple-byte>
+ <peers>
+ <port>port1</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <peers>
+ <port>port23</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
<module>
test-impl:impl-netconf
</type>
<name>test2</name>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
</modules>
</type>
<name>test1</name>
-
- <simple-long-2>44</simple-long-2>
- <binaryLeaf>8545649856</binaryLeaf>
- <dto_d>
- <simple-int1>444</simple-int1>
- <simple-int2>4444</simple-int2>
- <simple-int3>454</simple-int3>
- <complex-dto-bInner>
- <simple-int3>44</simple-int3>
- <deep>
- <simple-int3>4</simple-int3>
- </deep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <simple-long-2>44</simple-long-2>
+ <binaryLeaf>8545649856</binaryLeaf>
+ <dto_d>
+ <simple-int1>444</simple-int1>
+ <simple-int2>4444</simple-int2>
+ <simple-int3>454</simple-int3>
+ <complex-dto-bInner>
+ <simple-int3>44</simple-int3>
+ <deep>
+ <simple-int3>4</simple-int3>
+ </deep>
+ <simple-list>4</simple-list>
+ </complex-dto-bInner>
<simple-list>4</simple-list>
- </complex-dto-bInner>
- <simple-list>4</simple-list>
- </dto_d>
- <simpleInt>44</simpleInt>
- <simple-test>545</simple-test>
- <simple-long>454545</simple-long>
- <simpleBoolean>false</simpleBoolean>
- <dto-c>
- <dto-a-inner>
- <dto-a-inner-inner>
- <simple-arg>456</simple-arg>
- </dto-a-inner-inner>
- <simple-arg>44</simple-arg>
- </dto-a-inner>
- </dto-c>
- <simple-short>4</simple-short>
- <simple-BigInteger>999</simple-BigInteger>
- <simple-byte>4</simple-byte>
- <peers>
- <port>port1</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- </peers>
- <peers>
- <port>port23</port>
- <simple-int3>456</simple-int3>
- <core-size>44</core-size>
- <unknownAttribute>error</unknownAttribute>
- </peers>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ </dto_d>
+ <simpleInt>44</simpleInt>
+ <simple-test>545</simple-test>
+ <simple-long>454545</simple-long>
+ <simpleBoolean>false</simpleBoolean>
+ <dto-c>
+ <dto-a-inner>
+ <dto-a-inner-inner>
+ <simple-arg>456</simple-arg>
+ </dto-a-inner-inner>
+ <simple-arg>44</simple-arg>
+ </dto-a-inner>
+ </dto-c>
+ <simple-short>4</simple-short>
+ <simple-BigInteger>999</simple-BigInteger>
+ <simple-byte>4</simple-byte>
+ <peers>
+ <port>port1</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ </peers>
+ <peers>
+ <port>port23</port>
+ <simple-int3>456</simple-int3>
+ <core-size>44</core-size>
+ <unknownAttribute>error</unknownAttribute>
+ </peers>
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
<module>
test-impl:impl-netconf
</type>
<name>test2</name>
- <testing-dep>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
- <name>ref_dep</name>
- </testing-dep>
+ <impl-netconf xmlns="urn:opendaylight:params:xml:ns:yang:controller:test:impl">
+ <testing-dep>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:test">prefix:testing</type>
+ <name>ref_dep</name>
+ </testing-dep>
+ </impl-netconf>
</module>
</modules>