Network Working Group J. Schoenwaelder Internet-Draft V. Bajpai Intended status: Standards Track Jacobs University Bremen Expires: January 9, 2017 July 8, 2016 Using RESTCONF with LMAP Measurement Agents draft-ietf-lmap-restconf-03.txt Abstract This document describes how RESTCONF can be used with a YANG data model for Large-Scale Measurement Platforms (LMAP). 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 January 9, 2017. 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. Schoenwaelder & Bajpai Expires January 9, 2017 [Page 1] Internet-Draft LMAP using RESTCONF July 2016 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 2. Overview of RESTCONF . . . . . . . . . . . . . . . . . . . . 3 3. RESTCONF as LMAP Control Protocol . . . . . . . . . . . . . . 3 4. RESTCONF as LMAP Report Protocol . . . . . . . . . . . . . . 3 5. RESTCONF Configuration for LMAP . . . . . . . . . . . . . . . 4 6. Security Considerations . . . . . . . . . . . . . . . . . . . 4 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 4 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 9.1. Normative References . . . . . . . . . . . . . . . . . . 4 9.2. Informative References . . . . . . . . . . . . . . . . . 4 Appendix A. Example RESTCONF Control Protocol Exchange . . . . . 5 Appendix B. Example RESTCONF Report Protocol Exchange . . . . . 7 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 1. Introduction This document discusses how a Controller can use the RESTCONF protocol [I-D.ietf-netconf-restconf] to configure Large-Scale Measurement of Broadband Performance (LMAP) Measurement Agents [RFC7594]. It also discusses how RESTCONF can be used by a Measurement Agent to report measurement results to a Collector. Measurement Agents may be deployed as separate hardware devices or as functions embedded in consumer electronic devices and home routers or as pure software solutions that can be installed on off-the-shelf computing equipment. Measurement Agents receive instructions from a Controller about when and how to conduct what measurements (the measurement schedule) and how and when to report measurement results to a data Collector (the report schedule). Further information about the interaction between Measurement Agents and Controllers and Collectors can be found in [RFC7594]. The LMAP information model [I-D.ietf-lmap-information-model] defines the information exchanged between a Controller and an Measurement Agent and the information exchanged between an Measurement Agent and a Collector. An information model is conceptual and protocol- independent. A concrete YANG [RFC6020] data model derived from the conceptual information model is defined in [I-D.ietf-lmap-yang]. 1.1. Terminology This document uses the LMAP terminology defined in [RFC7594]. Schoenwaelder & Bajpai Expires January 9, 2017 [Page 2] Internet-Draft LMAP using RESTCONF July 2016 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. 2. Overview of RESTCONF The RESTCONF protocol [I-D.ietf-netconf-restconf] provides a REST- like interface to access and manipulate a so-called unified YANG datastore [RFC6020]. The basic idea behind RESTCONF is expose a YANG datastores as a collection of Web resources that can be manipulated using standard HTTP [RFC7230] DELETE, PATCH, POST, and PUT methods. The resource hierarchy is derived from the nesting structure of the YANG schema tree, leading to a so-called data model driven REST API. RESTCONF is essentially a convention how to use HTTP over TLS to access a datastore that has a structure defined by a YANG data model. The data is exchanged in XML encoding or JSON encoding. The normal mode of operation is that the RESTCONF client initiates a secure transport to the RESTCONF server. For devices located behind a NAT, a so called 'call-home' mechanism has been defined [I-D.ietf-netconf-call-home] that enables the RESTCONF server to establish a secure transport to a RESTCONF client. Note that call home only changes the TCP connection establishment, the TLS and HTTP client/server roles do not change. The policy used to call home can be configured through a configuration data model [I-D.ietf-netconf-server-model]. This model provides a mechanism to configure a list of redundant endpoints and it provides control over call-home policies (e.g, call-home frequency, idle-timers, keep-alive timers). 3. RESTCONF as LMAP Control Protocol It is straight-forward to use RESTCONF as a control protocol. The YANG data model [I-D.ietf-lmap-yang] derived from the underlying information model [I-D.ietf-lmap-information-model] translates into a collection of RESTCONF resources that can be manipulated at various levels of granularity using DELETE, PATCH, POST, and PUT methods. An example exchange showing a REST call to create a schedule object is shown in Appendix A. 4. RESTCONF as LMAP Report Protocol For reporting results from the Measurement Agent to a Collector, the Collector is assumed to act as a RESTCONF server. The Measurement Agent pushes results to the Collector by invoking an operation on the Controller. Schoenwaelder & Bajpai Expires January 9, 2017 [Page 3] Internet-Draft LMAP using RESTCONF July 2016 5. RESTCONF Configuration for LMAP XXX: This section should explain how an LMAP implementation needs to be configured to make use of the call-home mechanism and how report tasks refer to the configuration (if any standardized) needed to obtain the necessary credentials to report results. This needs to be worked through in detail. 6. Security Considerations TBD 7. IANA Considerations This document has no requests for IANA. 8. Acknowledgements Juergen Schoenwaelder and Vaibhav Bajpai worked in part on the Leone research project, which received funding from the European Union Seventh Framework Programme [FP7/2007-2013] under grant agreement number 317647. Juergen Schoenwaelder and Vaibhav Bajpai were partly funded by Flamingo, a Network of Excellence project (ICT-318488) supported by the European Commission under its Seventh Framework Programme. 9. References 9.1. Normative References [I-D.ietf-lmap-yang] Schoenwaelder, J. and V. Bajpai, "A YANG Data Model for LMAP Measurement Agents", draft-ietf-lmap-yang-04 (work in progress), March 2016. [I-D.ietf-netconf-restconf] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF Protocol", draft-ietf-netconf-restconf-14 (work in progress), June 2016. 9.2. Informative References [I-D.ietf-lmap-information-model] Burbridge, T., Eardley, P., Bagnulo, M., and J. Schoenwaelder, "Information Model for Large-Scale Measurement Platforms (LMAP)", draft-ietf-lmap- information-model-09 (work in progress), March 2016. Schoenwaelder & Bajpai Expires January 9, 2017 [Page 4] Internet-Draft LMAP using RESTCONF July 2016 [I-D.ietf-netconf-call-home] Watsen, K., "NETCONF Call Home and RESTCONF Call Home", draft-ietf-netconf-call-home-17 (work in progress), December 2015. [I-D.ietf-netconf-server-model] Watsen, K. and J. Schoenwaelder, "NETCONF Server and RESTCONF Server Configuration Models", draft-ietf-netconf- server-model-09 (work in progress), March 2016. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ RFC2119, March 1997, . [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010, . [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing", RFC 7230, DOI 10.17487/RFC7230, June 2014, . [RFC7594] Eardley, P., Morton, A., Bagnulo, M., Burbridge, T., Aitken, P., and A. Akhter, "A Framework for Large-Scale Measurement of Broadband Performance (LMAP)", RFC 7594, DOI 10.17487/RFC7594, September 2015, . Appendix A. Example RESTCONF Control Protocol Exchange Below is a YANG tree diagram of a part of the data model covering schedules. This is taken from [I-D.ietf-lmap-yang]. Schoenwaelder & Bajpai Expires January 9, 2017 [Page 5] Internet-Draft LMAP using RESTCONF July 2016 module: ietf-lmap-control +--rw lmap +--rw schedules +--rw schedule* [name] +--rw name lmap:identifier +--rw event event-ref +--rw execution-mode enumeration +--rw action* [name] +--rw name string +--rw task task-ref +--rw option* [name] | +--rw id lmap:identifier | +--rw name? string | +--rw value? string +--rw destination* leafref Below is an XML representation of instance data conforming to the YANG data model is shown below. Note that some of the strings are references to other portions of the instance data not show here. This is again taken from [I-D.ietf-lmap-yang]. hourly-schedule hourly sequential icmp-latency-hourly icmp-latency-measurement daily Below is an example showing how RESTCONF can be used to create the above schedule. The prefix C: indicates the Controller, the prefix M: indicates the Measurement Agent. This example uses a JSON encoding (and note that much of the white-space can be removed, this is only there to help with readability). Schoenwaelder & Bajpai Expires January 9, 2017 [Page 6] Internet-Draft LMAP using RESTCONF July 2016 C: POST /restconf/data/ietf-lmap-control:lmap/schedules HTTP/1.1 C: Host: example.com C: Content-Type: application/yang.data+json C: C: { C: "ietf-lmap-control:schedule": { C: "name": "hourly-schedule", C: "event": "hourly", C: "execution-mode": "sequential", C: "action": [ C: { C: "name": "icmp-latency-hourly", C: "task": "icmp-latency-measurement", C: "destination": "daily", C: } C: ] C: } C: } M: HTTP/1.1 201 Created M: Date: Mon, 26 Mar 2015 17:01:00 GMT M: Server: example-server M: Location: https://example.com/restconf/data M: /ietf-lmap-control:lmap/schedules/schedule=hourly-schedule M: Last-Modified: Mon, 26 Mar 2015 17:01:00 GMT M: ETag: b3a3e673be2 Appendix B. Example RESTCONF Report Protocol Exchange Below is an example showing how a Measurement Agent can submit results to a Collector running an RESTCONF server. The prefix C: indicates the Collector, the prefix M: indicates the Measurement Agent. M: POST /restconf/operations/ietf-lmap-report:report HTTP/1.1 M: Host: example.com M: Content-Type: application/yang.operation+xml M: M: M: 2015-10-28T13:27:42+02:00 M: 550e8400-e29b-41d4-a716-446655440000 M: wireless measurement at the north-pole M: M: pinger M: fping M: fping Schoenwaelder & Bajpai Expires January 9, 2017 [Page 7] Internet-Draft LMAP using RESTCONF July 2016 M: M: M: M: M: M: M: 2016-03-21T10:48:55+01:00 M: 2016-03-21T10:48:57+01:00 M: 0 M: M: target M: ip M: rtt-1 M: rtt-2 M: rtt-3 M: rtt-4 M: rtt-5 M: M: www.example.org M: 2001:db8::1 M: 14.15 M: 14.14 M: 14.09 M: 14.17 M: 14.51 M: M: M: mail.example.org M: 2001:db8::2 Schoenwaelder & Bajpai Expires January 9, 2017 [Page 8] Internet-Draft LMAP using RESTCONF July 2016 M: 12.24 M: 11.99 M: 12.49 M: 11.87 M: 12.45 M: M:
M:
M: C: HTTP/1.1 200 OK Authors' Addresses Juergen Schoenwaelder Jacobs University Bremen Email: j.schoenwaelder@jacobs-university.de Vaibhav Bajpai Jacobs University Bremen Email: v.bajpai@jacobs-university.de Schoenwaelder & Bajpai Expires January 9, 2017 [Page 9]