Application of YANG Modeling to JSON RPCs for Interoperability Purposes
draft-yang-json-rpc-00

Document Type Active Internet-Draft (individual)
Last updated 2017-02-22
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                          A. Ivanov
Internet-Draft                                                 D. Spence
Intended status: Informational                                 S. Saxena
Expires: August 26, 2017                                       T. Nadeau
                                                                 Brocade
                                                       February 22, 2017

Application of YANG Modeling to JSON RPCs for Interoperability Purposes
                         draft-yang-json-rpc-00

Abstract

   This document specifies the application of YANG modeling language to
   JSON RPC 2.0 for the purposes of achieving interoperability between
   implementations.

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 August 26, 2017.

Copyright Notice

   Copyright (c) 2017 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.

Ivanov, et al.           Expires August 26, 2017                [Page 1]
Internet-Draft                      0                      February 2017

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology and Notation  . . . . . . . . . . . . . . . . . .   3
   3.  Modeling of JSON RPC 2.0 Interfaces in YANG . . . . . . . . .   3
   3.1.  Optionality . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.2.  Default values  . . . . . . . . . . . . . . . . . . . . . .   7
   3.3.  The idl:value-type YANG Extension . . . . . . . . . . . . .   8
   3.4.  Modeling of JSON RPC 2.0 RPCs . . . . . . . . . . . . . . .   9
   3.4.1.  Representing results  . . . . . . . . . . . . . . . . . .   9
   3.4.2.  Modeling and expressing in JSON of data structures fully
           described by model  . . . . . . . . . . . . . . . . . . .  10
   3.4.3.  Modeling and expressing in JSON of data structures with
           elements outside model scope  . . . . . . . . . . . . . .  12
   3.5.  Modeling of JSON RPC 2.0 Notifications  . . . . . . . . . .  15
   3.5.1.  Modeling and expressing in JSON of notifications with
           fully modeled data payload  . . . . . . . . . . . . . . .  15
   3.5.2.  Modeling and expressing in JSON of notifications with
           data payload outside model scope  . . . . . . . . . . . .  16
   3.6.  Addressing Modeled Data - Yang Paths  . . . . . . . . . . .  17
   3.6.1.  Addressing anything but an individual list element  . . .  17
   3.6.2.  Addressing an individual list element . . . . . . . . . .  18
   3.6.3.  Addressing inside an individual list element  . . . . . .  18
   4.  Normative References  . . . . . . . . . . . . . . . . . . . .  19
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  20

1.  Introduction

   A key use case for JSON encoding of data is the transfer and
   interchange of such data between applications.  While some of the
   semantics desribed here will be of value for any such interchange,
   this document will concentrate on two specific use cases - Remote
   Procedure Calls (RPCs) and Notifications.  There is a standard
   specification for using JSON in both - it is the JSON RPC 2.0
   specification maintained by JSON RPC working group at jsonrpc.org
   [JSONRPC20].  This specification uses JSON as described in [RFC7159]
   in messages transported over a variety of transports.  For example -
   HTTP [RFC7230], ZMQ [ZEROMQ], RabbitMQ [RABBITMQ] etc.

   The JSON RPC 2.0 specification [JSONRPC20] has a number of well known
   shortcomings.  There are no means of describing and documenting a
   particular API method.  There are no means to specify how to
Show full document text