From 677a81daf4349220de65880fcac26537bcd9cb0c Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 16 Jan 2018 13:59:41 +0100 Subject: Improve integration tests for SubtreeWriter Change-Id: I20209b800eaa892e0fb742066003e956d00bbb22 Signed-off-by: Marek Gradzki --- .../io/fd/honeycomb/subtree/test/model/Ids.java | 33 ++++++++++++++++++++++ .../test-model/src/main/yang/hc-subtree-test.yang | 30 ++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 infra/it/test-model/src/main/java/io/fd/honeycomb/subtree/test/model/Ids.java create mode 100644 infra/it/test-model/src/main/yang/hc-subtree-test.yang (limited to 'infra/it/test-model/src/main') diff --git a/infra/it/test-model/src/main/java/io/fd/honeycomb/subtree/test/model/Ids.java b/infra/it/test-model/src/main/java/io/fd/honeycomb/subtree/test/model/Ids.java new file mode 100644 index 000000000..52e838418 --- /dev/null +++ b/infra/it/test-model/src/main/java/io/fd/honeycomb/subtree/test/model/Ids.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018 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. + */ + +package io.fd.honeycomb.subtree.test.model; + +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.subtree.test.rev180116.C1; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.subtree.test.rev180116.c1.C2; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.subtree.test.rev180116.c1.C3; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hc.subtree.test.rev180116.c1.C4; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; + +/** + * Instance identifiers referencing all complex nodes within honeycomb's subtree test model. + */ +public interface Ids { + InstanceIdentifier C1_ID = InstanceIdentifier.create(C1.class); + InstanceIdentifier C2_ID = C1_ID.child(C2.class); + InstanceIdentifier C3_ID = C1_ID.child(C3.class); + InstanceIdentifier C4_ID = C1_ID.child(C4.class); +} diff --git a/infra/it/test-model/src/main/yang/hc-subtree-test.yang b/infra/it/test-model/src/main/yang/hc-subtree-test.yang new file mode 100644 index 000000000..09b3fc737 --- /dev/null +++ b/infra/it/test-model/src/main/yang/hc-subtree-test.yang @@ -0,0 +1,30 @@ +module hc-subtree-test { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:hc:subtree:test"; + prefix "hc-subtree-test"; + + revision "2018-01-16" { + description "HC model for testing subtree writers."; + } + + container c1 { + leaf leaf1 { + type string; + } + container c2 { + leaf leaf2 { + type int32; + } + } + container c3 { + leaf leaf3 { + type int32; + } + } + container c4 { + leaf leaf4 { + type int32; + } + } + } +} -- cgit 1.2.3-korg