1 module ietf-yang-metadata {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-yang-metadata";
8 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
11 "WG Web: <https://datatracker.ietf.org/wg/netmod/>
13 WG List: <mailto:netmod@ietf.org>
16 <mailto:lberger@labn.net>
19 <mailto:kwatsen@juniper.net>
21 Editor: Ladislav Lhotka
22 <mailto:lhotka@nic.cz>";
25 "This YANG module defines an 'extension' statement that allows
26 for defining metadata annotations.
28 Copyright (c) 2016 IETF Trust and the persons identified as
29 authors of the code. All rights reserved.
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).
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.";
46 "RFC 7952: Defining and Using Metadata with YANG";
49 extension annotation {
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).
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.
62 An annotation defined with this 'extension' statement inherits
63 the namespace and other context from the YANG module in which
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.
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'.
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.
81 XML encoding and JSON encoding of annotations are defined in