<modules>
<module>bug527-test-model</module>
<module>bundle-test</module>
+ <module>test-models</module>
<module>regression-test-model</module>
<module>yang-runtime-tests</module>
</modules>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>integration-tests</artifactId>
+ <version>0.6.2-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>test-models</artifactId>
+ <packaging>pom</packaging>
+ <name>${project.artifactId}</name>
+ <description>${project.artifactId}</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <version>0.6.2-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+ <codeGenerators>
+ <generator>
+ <codeGeneratorClass>
+ org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
+ </codeGeneratorClass>
+ <outputBaseDir>
+ target/generated-sources/sal
+ </outputBaseDir>
+ </generator>
+ <generator>
+ <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
+ <outputBaseDir>target/site/restconf</outputBaseDir>
+ </generator>
+ <generator>
+ <codeGeneratorClass>org.opendaylight.yangtools.yang.wadl.generator.maven.WadlGenerator</codeGeneratorClass>
+ <outputBaseDir>target/site/restconf</outputBaseDir>
+ </generator>
+ </codeGenerators>
+ <inspectDependencies>true</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>0.6.2-SNAPSHOT</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>target/generated-sources/sal</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse
+ m2e settings only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <versionRange>[0.5,)</versionRange>
+ <goals>
+ <goal>
+ generate-sources
+ </goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <versionRange>[1.0,)</versionRange>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-binding</artifactId>
+ <version>0.6.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-common</artifactId>
+ <version>0.6.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+</project>
+
--- /dev/null
+module augment-target-augment {
+ yang-version 1;
+ namespace "odl:test:augment-target-augment";
+ prefix "ata";
+
+ import target {
+ prefix "t";
+ revision-date 2013-10-14;
+ }
+
+ import augment {
+ prefix "a";
+ revision-date 2013-10-15;
+ }
+
+ revision "2013-10-13" {
+ reference " WILL BE DEFINED LATER";
+ }
+
+
+ augment "/t:interfaces/t:ifEntry/a:augment-holder" {
+ when "if:ifType='ds0'";
+ leaf ds0ChannelNumber {
+ type string;
+ }
+ leaf interface-id {
+ type leafref {
+ path "/t:interfaces/t:ifEntry/t:ifMtu";
+ }
+ }
+ container schemas {
+ }
+ choice odl {
+ leaf id {
+ type int8;
+ }
+ case node1 {
+ description "node1";
+ }
+ case node2 {
+ description "node2";
+ }
+ container node3 {
+ description "node3";
+ }
+ }
+ }
+
+
+ uses a:target {
+ augment "how/interval" {
+ description "inner augment";
+ leaf name {
+ type string;
+ }
+ }
+ }
+
+}
--- /dev/null
+module augment {
+ yang-version 1;
+ namespace "odl:test:augment";
+ prefix "a";
+
+ import target {
+ prefix "t";
+ revision-date 2013-10-14;
+ }
+
+ revision "2013-10-15" {
+ reference " WILL BE DEFINED LATER";
+ }
+
+
+ augment "/t:interfaces/t:ifEntry" {
+ when "if:ifType='ds0'";
+ container augment-holder {
+ description "Description for augment holder";
+ }
+ }
+
+ augment "/t:interfaces/t:ifEntry" {
+ when "if:ifType='ds2'";
+ container augment-holder2 {
+ description "Description for augment holder";
+ }
+ }
+
+ augment "/t:controller/t:switch" {
+ leaf pause {
+ type int32;
+ }
+ }
+
+ grouping target {
+ anyxml data {
+ config true;
+ description "Copy of the source datastore subset.";
+ mandatory false;
+ must "test-condition-text";
+ reference "test-no-reference";
+ status "obsolete";
+ when "test-when-text";
+ }
+ choice how {
+ description "test choice description";
+ default interval;
+ case interval {
+ leaf interval {
+ type uint16;
+ default 30;
+ units minutes;
+ }
+ }
+ case daily {
+ leaf daily {
+ type empty;
+ }
+ leaf time-of-day {
+ type string;
+ units 24-hour-clock;
+ default 1am;
+ }
+ }
+ }
+ leaf address {
+ type string;
+ description "Target IP address";
+ mandatory true;
+ }
+ container port {
+ description "Target port container";
+ }
+ list addresses {
+ key "id";
+ leaf id {
+ type int8;
+ }
+ }
+ grouping target-inner {
+ description "target-inner default description";
+ leaf inner-grouping-id {
+ type int8;
+ }
+ }
+
+ t:opendaylight;
+ }
+
+}
--- /dev/null
+module target {
+ yang-version 1;
+ namespace "odl:test:target";
+ prefix "t";
+
+ revision "2013-10-14" {
+ reference " WILL BE DEFINED LATER";
+ }
+
+ container interfaces {
+ grouping ifEntry {
+ container augment-holder;
+ }
+ list ifEntry {
+ key "ifIndex";
+
+ leaf ifIndex {
+ type uint32;
+ units minutes;
+ }
+
+ leaf ifMtu {
+ type int32;
+ }
+
+ min-elements 1;
+ max-elements 11;
+ }
+ }
+
+ container controller {
+ choice switch {
+ case start {
+ leaf start {
+ type int8;
+ }
+ }
+ case stop {
+ leaf stop {
+ type int16;
+ }
+ }
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+module augment-in-uses {
+ yang-version 1;
+ namespace "odl:test:augment-in-uses";
+ prefix "aiu";
+
+ revision "2014-03-10" {
+ }
+
+ container links {
+ container link {
+ uses g1 {
+ augment nodes/node {
+ leaf id {
+ type string;
+ }
+ }
+ }
+ }
+ }
+
+ grouping g1 {
+ list nodes {
+ container node {
+ }
+ }
+ }
+
+}
--- /dev/null
+module cascade-uses {
+ yang-version 1;
+ namespace "odl:test:cascade-uses";
+ prefix "cu";
+
+ organization "OPEN DAYLIGHT";
+ contact "http://www.opendaylight.org/";
+
+ revision 2013-07-18 {
+ }
+
+ grouping grouping-U {
+ leaf leaf-grouping-U {
+ type string;
+ }
+ uses grouping-V;
+ uses grouping-X;
+ }
+
+ grouping grouping-V {
+ leaf leaf-grouping-V {
+ type string;
+ }
+ container container-grouping-V {
+ uses grouping-X;
+ }
+ uses grouping-Z;
+ uses grouping-ZZ;
+ }
+
+ grouping grouping-X {
+ leaf leaf-grouping-X {
+ type string;
+ }
+ uses grouping-Y;
+ }
+
+ grouping grouping-Y {
+ leaf leaf-grouping-Y {
+ type string;
+ }
+ }
+
+ grouping grouping-Z {
+ leaf leaf-grouping-Z {
+ type string;
+ }
+ }
+
+ grouping grouping-ZZ {
+ leaf leaf-grouping-ZZ {
+ type string;
+ }
+ }
+}
--- /dev/null
+module grouping-base {
+ yang-version 1;
+ namespace "odl:test:grouping-base";
+ prefix "gb";
+
+ import grouping-definitions { prefix gd; revision-date 2013-09-04; }
+
+ organization "opendaylight";
+ contact "asdf";
+
+ revision "2013-07-30" {
+ }
+
+
+ grouping bandwidth-object {
+ uses gd:object-header;
+
+ container bandwidth {
+ uses gd:ieee754-32;
+ }
+ }
+
+ grouping endpoints-object {
+ uses gd:object;
+
+ choice address-family {
+ case ipv4 {
+ leaf source-ipv4-address {
+ type string;
+ mandatory true;
+ }
+ }
+ case ipv6 {
+ leaf source-ipv6-address {
+ type string;
+ mandatory true;
+ }
+ }
+ }
+ }
+
+ grouping lsp-attributes {
+ container bandwidth {
+ uses bandwidth-object;
+ }
+ }
+
+ grouping metric-object {
+ uses gd:object;
+ leaf metric-type {
+ type uint8;
+ mandatory true;
+ }
+ }
+
+ grouping path-key-object {
+ uses gd:object-header;
+
+ list path-keys {
+ }
+ }
+
+ grouping route-object {
+ uses gd:object-header;
+
+ list subobjects {
+ }
+ }
+
+ grouping svec-object {
+ uses gd:object-header;
+
+ leaf link-diverse {
+ type boolean;
+ default false;
+ }
+ }
+
+
+ notification pcreq {
+ uses gd:message-header;
+
+ list requests {
+ container rp {
+ uses gd:rp-object;
+ }
+ container path-key-expansion {
+ when "rp/path-key = true";
+ container path-key {
+ uses path-key-object {
+ augment path-keys {
+ uses gd:message-header;
+ }
+ }
+ }
+ }
+ container segment-computation {
+ when "rp/path-key = false";
+
+ container p2p {
+ when "../rp/p2mp = false";
+
+ container endpoints {
+ uses endpoints-object;
+ }
+ container reported-route {
+ uses route-object;
+
+ container bandwidth {
+ uses bandwidth-object;
+ }
+ }
+
+ uses lsp-attributes;
+ }
+ }
+ }
+
+ list svec {
+ uses svec-object;
+ list metric {
+ uses metric-object;
+ }
+ }
+ }
+
+}
--- /dev/null
+module grouping-definitions {
+ yang-version 1;
+ namespace "odl:test:grouping-definitions";
+ prefix "gd";
+
+ organization "opendaylight";
+ contact "asdf";
+
+ revision "2013-09-04" {
+ }
+
+
+ typedef int-ext {
+ type string;
+ }
+
+ typedef protocol-version {
+ type uint8 {
+ range 1..7;
+ }
+ }
+
+ grouping base-header {
+ leaf delete {
+ type uint32;
+ mandatory true;
+ }
+ leaf setup {
+ type uint32;
+ mandatory true;
+ }
+ }
+
+ grouping ieee754-32 {
+ reference "IEEE 754-2008";
+ leaf fraction {
+ type uint32 {
+ range 0..1677215;
+ }
+ mandatory true;
+ }
+ }
+
+ grouping message-header {
+ leaf version {
+ type protocol-version;
+ default 1;
+ }
+ leaf type {
+ type int-ext;
+ }
+ }
+
+ grouping object {
+ uses object-header;
+
+ container box {
+ }
+ }
+
+ grouping object-header {
+ leaf processing-rule {
+ type boolean;
+ }
+ leaf ignore {
+ type boolean;
+ }
+ }
+
+ grouping rp-object {
+ uses object {
+ augment "box" {
+ container order {
+ uses base-header;
+ }
+ }
+ }
+
+ leaf priority {
+ type uint8 {
+ range 1..7;
+ }
+ }
+ }
+
+}