From f4600723aa5e0fa99905eacd3338b33728a6c68f Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Wed, 26 Oct 2016 10:14:11 +0200 Subject: HONEYCOMB-266 - Test data injection with @InjectTestData Field/Method param injection of data from json files that are bindable/parsable by provided yang schema Change-Id: I726ef5d92e85d93d1e48175287b6192538965dd5 Signed-off-by: Maros Marsalek Signed-off-by: Jan Srnicek --- infra/test-utils/test-api/asciidoc/Readme.adoc | 3 + infra/test-utils/test-api/pom.xml | 41 +++++++++++++ .../test-utils/test-api/src/main/yang/hc-data.yang | 71 ++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 infra/test-utils/test-api/asciidoc/Readme.adoc create mode 100644 infra/test-utils/test-api/pom.xml create mode 100644 infra/test-utils/test-api/src/main/yang/hc-data.yang (limited to 'infra/test-utils/test-api') diff --git a/infra/test-utils/test-api/asciidoc/Readme.adoc b/infra/test-utils/test-api/asciidoc/Readme.adoc new file mode 100644 index 000000000..2add76702 --- /dev/null +++ b/infra/test-utils/test-api/asciidoc/Readme.adoc @@ -0,0 +1,3 @@ += test-api + +Overview of test-api \ No newline at end of file diff --git a/infra/test-utils/test-api/pom.xml b/infra/test-utils/test-api/pom.xml new file mode 100644 index 000000000..77db6a9b8 --- /dev/null +++ b/infra/test-utils/test-api/pom.xml @@ -0,0 +1,41 @@ + + + + + + api-parent + io.fd.honeycomb.common + 1.16.12-SNAPSHOT + + 4.0.0 + + io.fd.honeycomb.infra.test + test-api + + + + org.opendaylight.mdsal.model + yang-ext + + + org.opendaylight.controller + sal-binding-broker-impl + + + \ No newline at end of file diff --git a/infra/test-utils/test-api/src/main/yang/hc-data.yang b/infra/test-utils/test-api/src/main/yang/hc-data.yang new file mode 100644 index 000000000..a817a249f --- /dev/null +++ b/infra/test-utils/test-api/src/main/yang/hc-data.yang @@ -0,0 +1,71 @@ +module hc-data{ + + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:hc:data"; + prefix "hc-d-i"; + + revision "2015-01-05" { + description "Testing HC model for test data injection"; + } + + import yang-ext { + prefix "ext"; + } + + container simple-container{ + list simple-list{ + key name; + leaf name{ + type string; + } + container cont-under-list{ + leaf nested-name{ + type string; + } + } + } + + container nested-container{ + leaf name{ + type string; + } + } + + container nested-container-with-list{ + list nested-list{ + key name; + leaf name{ + type string; + } + } + } + + choice simple-choice{ + case first-case{ + leaf name{ + type string; + } + } + + case second-case{ + container case-container{ + leaf name{ + type string; + } + } + } + } + + container augmented-container{ + + } + } + + augment /hc-d-i:simple-container/hc-d-i:augmented-container{ + ext:augment-identifier "aug-container-augmentation"; + + leaf name-in-augment{ + type string; + } + } +} \ No newline at end of file -- cgit 1.2.3-korg