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

The information below is for an old version of the document
Document Type Active Internet-Draft (netmod WG)
Last updated 2015-05-22 (latest revision 2015-04-16)
Stream IETF
Intended RFC status (None)
Formats plain text pdf html bibtex
Stream WG state WG Document
Document shepherd Kent Watsen
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to "Kent Watsen" <kwatsen@juniper.net>
NETMOD Working Group                                           L. Lhotka
Internet-Draft                                                    CZ.NIC
Intended status: Standards Track                          April 16, 2015
Expires: October 18, 2015

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

Abstract

   This document defines a YANG extension statement that allows for
   defining syntax of metadata annotions 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 October 18, 2015.

Copyright Notice

   Copyright (c) 2015 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 October 18, 2015                [Page 1]
Internet-Draft                YANG Metadata                   April 2015

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  Defining Annotations in YANG  . . . . . . . . . . . . . . . .   5
   4.  The Encoding of Annotations . . . . . . . . . . . . . . . . .   7
     4.1.  XML Encoding  . . . . . . . . . . . . . . . . . . . . . .   7
     4.2.  JSON Encoding . . . . . . . . . . . . . . . . . . . . . .   7
       4.2.1.  Metadata Object and Annotations . . . . . . . . . . .   8
       4.2.2.  Adding Annotations to Container and List Instances  .   8
       4.2.3.  Adding Annotations to Anyxml and Leaf Instances . . .   9
       4.2.4.  Adding Annotations to Leaf-list Instances . . . . . .   9
   5.  Representing Annotations in DSDL Schemas  . . . . . . . . . .  10
   6.  Metadata YANG Module  . . . . . . . . . . . . . . . . . . . .  11
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  13
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .  14
   9.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  14
   10. References  . . . . . . . . . . . . . . . . . . . . . . . . .  14
     10.1.  Normative References . . . . . . . . . . . . . . . . . .  14
     10.2.  Informative References . . . . . . . . . . . . . . . . .  15
   Appendix A.  Change Log . . . . . . . . . . . . . . . . . . . . .  15
     A.1.  Changes Between draft-lhotka-netmod-yang-metadata-01 and
           draft-ietf-netmod-yang-metadata-00  . . . . . . . . . . .  15
     A.2.  Changes Between draft-lhotka-netmod-yang-metadata-00 and
           -01 . . . . . . . . . . . . . . . . . . . . . . . . . . .  16
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  16

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  Deactivating a subtree in a configuration datastore while keeping
      the data in place.

   o  Complementing data model information with instance-specific data.

   o  RPC operations may use metadata annotations for various purposes
      in both requests and responses.  For example, the <edit-config>
      operation in the NETCONF protocol (see section 7.2 of [RFC6241])
      uses annotations in the form of XML attributes for identifying the
      point in the configuration and type of the operation.

   However, metadata annotations could potentially lead to
   interoperability problems if they are used in an ad hoc fashion by
   different organizations and/or without proper documentation.  A sound

Lhotka                  Expires October 18, 2015                [Page 2]
Internet-Draft                YANG Metadata                   April 2015

   metadata framework for YANG should therefore satisfy these
Show full document text