From: Vratko Polak Date: Fri, 1 Apr 2016 10:05:04 +0000 (+0200) Subject: Add binding v2 model for testing identifier namespaces X-Git-Tag: release/boron~138 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=0e7a81aa4825013867128a564cdc48544843fc69;p=mdsal.git Add binding v2 model for testing identifier namespaces Just a Yang file, no actual unit test. Change-Id: I94ec9dca335a81b55b2aa23764bec6ea100ac7a4 Signed-off-by: Vratko Polak --- diff --git a/binding/mdsal-binding-spec-2/src/test/resources/odl-test-namespaces.yang b/binding/mdsal-binding-spec-2/src/test/resources/odl-test-namespaces.yang new file mode 100644 index 0000000000..9fd4d50588 --- /dev/null +++ b/binding/mdsal-binding-spec-2/src/test/resources/odl-test-namespaces.yang @@ -0,0 +1,78 @@ +module odl-test-namespaces { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:mdsal:binding2:test:namespaces"; + prefix "otn"; + + description + "Testing for the same identifier in different namespaces. + see http://tools.ietf.org/html/rfc6020#section-6.2.1 + + All module and submodule names share the same global module + identifier namespace."; + + revision "2016-03-31" { + description + "Initial revision, for ODL Boron."; + } + + extension odl-test-namespaces { + description + "All extension names defined in a module and its submodules share + the same extension identifier namespace."; + } + + feature odl-test-namespaces { + description + "All feature names defined in a module and its submodules share the + same feature identifier namespace."; + } + + identity odl-test-namespaces { + description + "All identity names defined in a module and its submodules share + the same identity identifier namespace."; + } + + typedef odl-test-namespaces { + description + "All derived type names defined within a parent node or at the top + level of the module or its submodules share the same type + identifier namespace."; + type string; + } + + grouping odl-test-namespaces { + description + "All grouping names defined within a parent node or at the top + level of the module or its submodules share the same grouping + identifier namespace."; + leaf odl-test-namespaces { + description + "This namespace is scoped to the parent node or module, unless the + parent node is a case node. In that case, the namespace is scoped + to the closest ancestor node that is not a case or choice node."; + type odl-test-namespaces; + } + } + + container odl-test-namespaces { + description + "All leafs, leaf-lists, lists, containers, choices, rpcs, actions, + notifications, anydatas, and anyxmls defined (directly or through + a uses statement) within a parent node or at the top level of the + module or its submodules share the same identifier namespace."; + choice nonconflict-identifier { + description + "The leaf from grouping would end up scoped under container, + so the choice has to have a different identifier."; + case odl-test-namespaces { + description + "All cases within a choice share the same case identifier + namespace. This namespace is scoped to the parent choice node."; + uses odl-test-namespaces; + // See descriptions of leaf and choice. + } + } + } + +}