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

Document Type Active Internet-Draft (core WG)
Last updated 2019-09-11
Replaces draft-veillette-core-yang-cbor-mapping
Stream IETF
Intended RFC status (None)
Formats plain text xml pdf htmlized 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: March 12, 2020                                         A. Pelov
                                                                  Acklio
                                                      September 09, 2019

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

Abstract

   This document defines encoding rules for serializing configuration
   data, state data, RPC input and RPC output, Action input, Action
   output, notifications and yang data template 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 March 12, 2020.

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 March 12, 2020                 [Page 1]
Internet-Draft   CBOR Encoding of Data Modeled with YANG  September 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 . . . . . . . . . . . . . . .   5
     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.1.1.  Using SIDs in keys  . . . . . . . . . . . . . . . . .   9
       4.1.2.  Using names in keys . . . . . . . . . . . . . . . . .   9
     4.2.  The 'container' and other collections . . . . . . . . . .  10
       4.2.1.  Using SIDs in keys  . . . . . . . . . . . . . . . . .  11
       4.2.2.  Using names in keys . . . . . . . . . . . . . . . . .  12
     4.3.  The 'leaf-list' . . . . . . . . . . . . . . . . . . . . .  13
       4.3.1.  Using SIDs in keys  . . . . . . . . . . . . . . . . .  14
       4.3.2.  Using names in keys . . . . . . . . . . . . . . . . .  14
     4.4.  The 'list' and 'list' instance(s) . . . . . . . . . . . .  15
       4.4.1.  Using SIDs in keys  . . . . . . . . . . . . . . . . .  16
       4.4.2.  Using names in keys . . . . . . . . . . . . . . . . .  18
     4.5.  The 'anydata' . . . . . . . . . . . . . . . . . . . . . .  20
       4.5.1.  Using SIDs in keys  . . . . . . . . . . . . . . . . .  21
       4.5.2.  Using names in keys . . . . . . . . . . . . . . . . .  22
     4.6.  The 'anyxml'  . . . . . . . . . . . . . . . . . . . . . .  23
       4.6.1.  Using SIDs in keys  . . . . . . . . . . . . . . . . .  23
       4.6.2.  Using names in keys . . . . . . . . . . . . . . . . .  24
   5.  Encoding of YANG data templates . . . . . . . . . . . . . . .  24
     5.1.  Using SIDs in keys  . . . . . . . . . . . . . . . . . . .  25
     5.2.  Using names in keys . . . . . . . . . . . . . . . . . . .  26
   6.  Representing YANG Data Types in CBOR  . . . . . . . . . . . .  27
     6.1.  The unsigned integer Types  . . . . . . . . . . . . . . .  27
     6.2.  The integer Types . . . . . . . . . . . . . . . . . . . .  28
     6.3.  The 'decimal64' Type  . . . . . . . . . . . . . . . . . .  28
     6.4.  The 'string' Type . . . . . . . . . . . . . . . . . . . .  29
     6.5.  The 'boolean' Type  . . . . . . . . . . . . . . . . . . .  29
     6.6.  The 'enumeration' Type  . . . . . . . . . . . . . . . . .  29
     6.7.  The 'bits' Type . . . . . . . . . . . . . . . . . . . . .  30
Show full document text