netconfcentral logo

ietf-yang-metadata@2015-09-17



  module ietf-yang-metadata {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-yang-metadata";

    prefix md;

    organization
      "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/netmod/>
     WG List:  <mailto:netmod@ietf.org>

     WG Chair: Thomas Nadeau
               <mailto:tnadeau@lucidvision.com>

     WG Chair: Juergen Schoenwaelder
               <mailto:j.schoenwaelder@jacobs-university.de>

     WG Chair: Kent Watsen
               <mailto:kwatsen@juniper.net>

     Editor:   Ladislav Lhotka
               <mailto:lhotka@nic.cz>";

    description
      "This YANG module defines an extension statement that allows for
     defining metadata annotations.

     Copyright (c) 2015 IETF Trust and the persons identified as
     authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Simplified BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
     'OPTIONAL' in the module text are to be interpreted as described
     in RFC 2119 (http://tools.ietf.org/html/rfc2119).

     This version of this YANG module is part of RFC XXXX
     (http://tools.ietf.org/html/rfcXXXX); see the RFC itself for
     full legal notices.";

    revision "2015-09-17" {
      description "Initial revision.";
      reference
        "RFC XXXX: Defining and Using Metadata with YANG";

    }


    extension annotation {
      argument "name" {
        yin-element false;
      }
      description
        "This extension allows for defining metadata annotations in
       YANG modules. The 'md:annotation' statement can appear only at
       the top level of a YANG module.

       The argument of the 'md:annotation' statement defines the name
       of the annotation. Syntactically it is a YANG identifier as
       defined in RFC 6020bis, sec. 6.2.

       An annotation defined with this extension statement inherits
       the namespace and other context from the YANG module in which
       it is defined.

       Data type of the annotation value is specified in the same way
       as for a leaf data node using the 'type' statement.

       Semantics of the annotation and other documentation can be
       specified using the following standard YANG substatements (all
       are optional): 'description', 'if-feature', 'reference',
       'status', and 'units'.

       A server announces support for a particular annotation by
       including the module in which the annotation is defined among
       the advertised YANG modules (e.g., in NETCONF hello message or
       yang-library). The annotation then can be attached to any
       instance of data node defined in any YANG module that is
       advertised by the server.

       XML and JSON encoding of annotations is defined in
       RFC XXXX.";
    }
  }  // module ietf-yang-metadata