Defining and Using Metadata with YANG
draft-ietf-netmod-yang-metadata-03

The information below is for an old version of the document
Document Type Active Internet-Draft (netmod WG)
Last updated 2016-02-24 (latest revision 2016-01-28)
Replaces draft-lhotka-netmod-yang-metadata
Stream IETF
Intended RFC status Proposed Standard
Formats pdf htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Kent Watsen
Shepherd write-up Show (last changed 2016-02-23)
IESG IESG state AD Evaluation
Consensus Boilerplate Unknown
Telechat date
Responsible AD BenoƮt Claise
Send notices to (None)
NETMOD Working Group                                           L. Lhotka
Internet-Draft                                                    CZ.NIC
Intended status: Standards Track                        January 28, 2016
Expires: July 31, 2016

                 Defining and Using Metadata with YANG
                   draft-ietf-netmod-yang-metadata-03

Abstract

   This document defines a YANG extension statement that allows for
   defining metadata annotations in YANG modules.  The document also
   specifies XML and JSON encoding of annotations and other rules for
   annotating instances of YANG data nodes.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on July 31, 2016.

Copyright Notice

   Copyright (c) 2016 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Lhotka                    Expires July 31, 2016                 [Page 1]
Internet-Draft                YANG Metadata                 January 2016

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   4
     2.1.  Keywords  . . . . . . . . . . . . . . . . . . . . . . . .   4
     2.2.  Terms Defined in Other Documents  . . . . . . . . . . . .   4
     2.3.  Namespaces and Prefixes . . . . . . . . . . . . . . . . .   6
     2.4.  Definitions of New Terms  . . . . . . . . . . . . . . . .   6
   3.  Defining Annotations in YANG  . . . . . . . . . . . . . . . .   6
     3.1.  Example Definition  . . . . . . . . . . . . . . . . . . .   7
   4.  Using Annotations . . . . . . . . . . . . . . . . . . . . . .   8
   5.  The Encoding of Annotations . . . . . . . . . . . . . . . . .   9
     5.1.  XML Encoding  . . . . . . . . . . . . . . . . . . . . . .   9
     5.2.  JSON Encoding . . . . . . . . . . . . . . . . . . . . . .   9
       5.2.1.  Metadata Object and Annotations . . . . . . . . . . .  10
       5.2.2.  Adding Annotations to Anydata, Container and List
               Entries . . . . . . . . . . . . . . . . . . . . . . .  10
       5.2.3.  Adding Annotations to Anyxml and Leaf Instances . . .  11
       5.2.4.  Adding Annotations to Leaf-list Entries . . . . . . .  12
   6.  Representing Annotations in DSDL Schemas  . . . . . . . . . .  12
   7.  Metadata YANG Module  . . . . . . . . . . . . . . . . . . . .  14
   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  16
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .  16
   10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  17
   11. References  . . . . . . . . . . . . . . . . . . . . . . . . .  17
     11.1.  Normative References . . . . . . . . . . . . . . . . . .  17
     11.2.  Informative References . . . . . . . . . . . . . . . . .  18
   Appendix A.  Change Log . . . . . . . . . . . . . . . . . . . . .  18
     A.1.  Changes Between Revisions -01 and -02 . . . . . . . . . .  18
     A.2.  Changes Between Revisions -01 and -02 . . . . . . . . . .  19
     A.3.  Changes Between Revisions -00 and -01 . . . . . . . . . .  19
     A.4.  Changes Between draft-lhotka-netmod-yang-metadata-01 and
           draft-ietf-netmod-yang-metadata-00  . . . . . . . . . . .  19
     A.5.  Changes Between draft-lhotka-netmod-yang-metadata-00 and
           -01 . . . . . . . . . . . . . . . . . . . . . . . . . . .  19
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  20

1.  Introduction

   There is a need to be able to annotate instances of
   YANG [I-D.ietf-netmod-rfc6020bis] data nodes with metadata.  Typical
   use cases are:

   o  Complementing regular data model information with instance-
      specific metadata, comments etc.

   o  Providing information about data rendering in user interfaces.
Show full document text