CBOR Encoding of Data Modeled with YANG
draft-ietf-core-yang-cbor-10

Document Type Active Internet-Draft (core WG)
Last updated 2019-04-08
Replaces draft-veillette-core-yang-cbor-mapping
Stream IETF
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream WG state WG Document
Document shepherd No shepherd assigned
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
Internet Engineering Task Force                        M. Veillette, Ed.
Internet-Draft                                   Trilliant Networks Inc.
Intended status: Standards Track                          I. Petrov, Ed.
Expires: October 10, 2019                                       A. Pelov
                                                                  Acklio
                                                          April 08, 2019

                CBOR Encoding of Data Modeled with YANG
                      draft-ietf-core-yang-cbor-10

Abstract

   This document defines encoding rules for serializing configuration
   data, state data, RPC input and RPC output, Action input, Action
   output and notifications defined within YANG modules using the
   Concise Binary Object Representation (CBOR) [RFC7049].

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 https://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 10, 2019.

Copyright Notice

   Copyright (c) 2019 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
   (https://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

Veillette, et al.       Expires October 10, 2019                [Page 1]
Internet-Draft   CBOR Encoding of Data Modeled with YANG      April 2019

   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Terminology and Notation  . . . . . . . . . . . . . . . . . .   3
   3.  Properties of the CBOR Encoding . . . . . . . . . . . . . . .   4
     3.1.  CBOR diagnostic notation  . . . . . . . . . . . . . . . .   5
     3.2.  YANG Schema Item iDentifier (SID) . . . . . . . . . . . .   6
     3.3.  Name  . . . . . . . . . . . . . . . . . . . . . . . . . .   7
   4.  Encoding of YANG Schema Node Instances  . . . . . . . . . . .   9
     4.1.  The 'leaf'  . . . . . . . . . . . . . . . . . . . . . . .   9
     4.2.  The 'container' and other collections . . . . . . . . . .   9
       4.2.1.  SIDs as keys  . . . . . . . . . . . . . . . . . . . .  10
       4.2.2.  Names as keys . . . . . . . . . . . . . . . . . . . .  11
     4.3.  The 'leaf-list' . . . . . . . . . . . . . . . . . . . . .  13
     4.4.  The 'list' and 'list' instance(s) . . . . . . . . . . . .  14
       4.4.1.  SIDs as keys  . . . . . . . . . . . . . . . . . . . .  15
       4.4.2.  Names as keys . . . . . . . . . . . . . . . . . . . .  17
     4.5.  The 'anydata' . . . . . . . . . . . . . . . . . . . . . .  19
     4.6.  The 'anyxml'  . . . . . . . . . . . . . . . . . . . . . .  21
   5.  Encoding of YANG data templates . . . . . . . . . . . . . . .  22
     5.1.  SIDs as keys  . . . . . . . . . . . . . . . . . . . . . .  23
     5.2.  Names as keys . . . . . . . . . . . . . . . . . . . . . .  24
   6.  Representing YANG Data Types in CBOR  . . . . . . . . . . . .  25
     6.1.  The unsigned integer Types  . . . . . . . . . . . . . . .  25
     6.2.  The integer Types . . . . . . . . . . . . . . . . . . . .  26
     6.3.  The 'decimal64' Type  . . . . . . . . . . . . . . . . . .  26
     6.4.  The 'string' Type . . . . . . . . . . . . . . . . . . . .  27
     6.5.  The 'boolean' Type  . . . . . . . . . . . . . . . . . . .  27
     6.6.  The 'enumeration' Type  . . . . . . . . . . . . . . . . .  27
     6.7.  The 'bits' Type . . . . . . . . . . . . . . . . . . . . .  28
     6.8.  The 'binary' Type . . . . . . . . . . . . . . . . . . . .  30
     6.9.  The 'leafref' Type  . . . . . . . . . . . . . . . . . . .  30
     6.10. The 'identityref' Type  . . . . . . . . . . . . . . . . .  31
       6.10.1.  SIDs as identityref  . . . . . . . . . . . . . . . .  31
       6.10.2.  Name as identityref  . . . . . . . . . . . . . . . .  32
     6.11. The 'empty' Type  . . . . . . . . . . . . . . . . . . . .  32
     6.12. The 'union' Type  . . . . . . . . . . . . . . . . . . . .  33
     6.13. The 'instance-identifier' Type  . . . . . . . . . . . . .  34
Show full document text