Populate xpath/ hierarchy
[yangtools.git] / yang / rfc7952-parser-support / src / test / resources / ietf-yang-metadata@2016-08-05.yang
1 module ietf-yang-metadata {
2
3   namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata";
4
5   prefix "md";
6
7   organization
8     "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
9
10   contact
11     "WG Web:   <https://datatracker.ietf.org/wg/netmod/>
12
13      WG List:  <mailto:netmod@ietf.org>
14
15      WG Chair: Lou Berger
16                <mailto:lberger@labn.net>
17
18      WG Chair: Kent Watsen
19                <mailto:kwatsen@juniper.net>
20
21      Editor:   Ladislav Lhotka
22                <mailto:lhotka@nic.cz>";
23
24   description
25     "This YANG module defines an 'extension' statement that allows
26      for defining metadata annotations.
27
28      Copyright (c) 2016 IETF Trust and the persons identified as
29      authors of the code.  All rights reserved.
30
31      Redistribution and use in source and binary forms, with or
32      without modification, is permitted pursuant to, and subject to
33      the license terms contained in, the Simplified BSD License set
34      forth in Section 4.c of the IETF Trust's Legal Provisions
35      Relating to IETF Documents
36      (http://trustee.ietf.org/license-info).
37
38      This version of this YANG module is part of RFC 7952
39      (http://www.rfc-editor.org/info/rfc7952); see the RFC itself
40      for full legal notices.";
41
42   revision 2016-08-05 {
43     description
44       "Initial revision.";
45     reference
46       "RFC 7952: Defining and Using Metadata with YANG";
47   }
48
49   extension annotation {
50     argument name;
51     description
52       "This extension allows for defining metadata annotations in
53        YANG modules.  The 'md:annotation' statement can appear only
54        at the top level of a YANG module or submodule, i.e., it
55        becomes a new alternative in the ABNF production rule for
56        'body-stmts' (Section 14 in RFC 7950).
57
58        The argument of the 'md:annotation' statement defines the name
59        of the annotation.  Syntactically, it is a YANG identifier as
60        defined in Section 6.2 of RFC 7950.
61
62        An annotation defined with this 'extension' statement inherits
63        the namespace and other context from the YANG module in which
64        it is defined.
65
66        The data type of the annotation value is specified in the same
67        way as for a leaf data node using the 'type' statement.
68
69        The semantics of the annotation and other documentation can be
70        specified using the following standard YANG substatements (all
71        are optional): 'description', 'if-feature', 'reference',
72        'status', and 'units'.
73
74        A server announces support for a particular annotation by
75        including the module in which the annotation is defined among
76        the advertised YANG modules, e.g., in a NETCONF <hello>
77        message or in the YANG library (RFC 7950).  The annotation can
78        then be attached to any instance of a data node defined in any
79        YANG module that is advertised by the server.
80
81        XML encoding and JSON encoding of annotations are defined in
82        RFC 7952.";
83   }
84 }