summaryrefslogtreecommitdiffstats
path: root/v3po/it/test-model
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/it/test-model')
-rw-r--r--v3po/it/test-model/pom.xml36
-rw-r--r--v3po/it/test-model/src/main/yang/hc-test.yang113
2 files changed, 149 insertions, 0 deletions
diff --git a/v3po/it/test-model/pom.xml b/v3po/it/test-model/pom.xml
new file mode 100644
index 000000000..f92109f6e
--- /dev/null
+++ b/v3po/it/test-model/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 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.
+-->
+<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>io.fd.honeycomb.common</groupId>
+ <artifactId>api-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../common/api-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>honeycomb-test-model</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>yang-ext</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/v3po/it/test-model/src/main/yang/hc-test.yang b/v3po/it/test-model/src/main/yang/hc-test.yang
new file mode 100644
index 000000000..204c5c089
--- /dev/null
+++ b/v3po/it/test-model/src/main/yang/hc-test.yang
@@ -0,0 +1,113 @@
+module hc-test {
+ yang-version 1;
+ namespace "urn:opendaylight:params:xml:ns:yang:hc:test";
+ prefix "hct";
+
+ revision "2015-01-05" {
+ description "Testing HC model with bindings";
+ }
+
+ import yang-ext {
+ prefix "ext";
+ }
+
+ // ORDER 3
+ container simple-container {
+ leaf simple-container-name {
+ type string;
+ }
+ }
+
+ grouping some-attributes {
+ leaf leaf-from-grouping {
+ type string;
+ }
+
+ // ORDER 5
+ container container-from-grouping {
+ leaf leaf-in-container-from-grouping {
+ type int32;
+ }
+ }
+ }
+
+ // ORDER 9 (no real attributes though)
+ container container-with-list {
+ // ORDER 7
+ list list-in-container {
+ key "id";
+
+ leaf id {
+ type uint32;
+ }
+
+ // ORDER 8
+ container container-in-list {
+ leaf name {
+ type string;
+ }
+
+ // ORDER 6
+ list nested-list {
+ key "nested-id";
+
+ leaf nested-id {
+ type string;
+ }
+
+ leaf nested-name {
+ type string;
+ }
+ }
+ }
+ }
+ }
+
+ // ORDER 4
+ container container-with-choice {
+ leaf name {
+ type string;
+ }
+
+ uses some-attributes;
+
+ choice choice {
+ leaf c1 {
+ type string;
+ }
+
+ leaf c2 {
+ type string;
+ }
+
+ // ORDER: 2
+ container c3 {
+ leaf name {
+ type string;
+ }
+ }
+ }
+ }
+
+ // ORDER: 2
+ augment "/hct:simple-container" {
+ ext:augment-identifier "simple-augment";
+
+ leaf simple-augment-leaf {
+ type string;
+ }
+ }
+
+ // UNORDERED
+ augment "/hct:simple-container" {
+ ext:augment-identifier "complex-augment";
+
+ // ORDER: 1
+ container complex-augment-container {
+ leaf some-leaf {
+ type string;
+ }
+ }
+ }
+
+}