Internet DRAFT - draft-schoenw-lmap-yang
draft-schoenw-lmap-yang
Network Working Group J. Schoenwaelder
Internet-Draft V. Bajpai
Intended status: Standards Track Jacobs University Bremen
Expires: July 27, 2015 January 23, 2015
A YANG Data Model for LMAP Measurement Agents
draft-schoenw-lmap-yang-02.txt
Abstract
This document defines a data model for Large-Scale Measurement
Platforms (LMAP). The data model is defined using the YANG data
modeling language.
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 July 27, 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.
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 1]
Internet-Draft LMAP Data Model January 2015
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2
1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 2
2. Data Model Overview . . . . . . . . . . . . . . . . . . . . . 3
3. Relationship to the Information Model . . . . . . . . . . . . 6
4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 7
5. Security Considerations . . . . . . . . . . . . . . . . . . . 27
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 27
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.1. Normative References . . . . . . . . . . . . . . . . . . 27
8.2. Informative References . . . . . . . . . . . . . . . . . 28
Appendix A. Example Configuration (XML) . . . . . . . . . . . . 28
Appendix B. Example Configuration (JSON) . . . . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 38
1. Introduction
This document defines a data model for Large-Scale Measurement
Platforms (LMAP) [I-D.ietf-lmap-framework]. The data model is
defined using the YANG [RFC6020] data modeling language. It aims to
be consistent with the LMAP Information Model
[I-D.ietf-lmap-information-model].
1.1. Terminology
This document uses the LMAP terminology defined in
[I-D.ietf-lmap-framework].
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].
1.2. Tree Diagrams
A simplified graphical representation of the data model is used in
this document. The meaning of the symbols in these diagrams is as
follows:
o Brackets "[" and "]" enclose list keys.
o Abbreviations before data node names: "rw" means configuration
(read-write), and "ro" means state data (read-only).
o Symbols after data node names: "?" means an optional node, "!"
means a presence container, and "*" denotes a list and leaf-list.
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 2]
Internet-Draft LMAP Data Model January 2015
o Parentheses enclose choice and case nodes, and case nodes are also
marked with a colon (":").
o Ellipsis ("...") stands for contents of subtrees that are not
shown.
2. Data Model Overview
The tree diagram below shows the structure of the configuration
model.
module: ietf-lmap
+--rw lmap
+--rw agent
| +--rw agent-id? yang:uuid
| +--rw device-id? inet:uri
| +--rw credentials? string
| +--rw group-id? string
| +--rw report-agent-id? boolean
+--rw schedules
| +--rw schedule* [name]
| +--rw name string
| +--rw action* [name]
| | +--rw name string
| | +--rw task -> /lmap/tasks/task/name
| | +--rw option* [name]
| | | +--rw name string
| | | +--rw value? string
| | +--rw destination* [name]
| | +--rw name string
| | +--rw output* uint16
| | +--rw schedule -> /lmap/schedules/schedule/name
| | +--rw action -> /lmap/schedules/schedule[name = current()/../schedule]/action/name
| +--rw timing -> /lmap/timings/timing/name
+--rw suppression
| +--rw enabled? boolean
| +--rw stop-ongoing-tasks? boolean
| +--rw start? yang:date-and-time
| +--rw end? yang:date-and-time
| +--rw task* -> /lmap/tasks/task/name
| +--rw schedule* -> /lmap/schedules/schedule/name
+--rw channels
| +--rw channel* [name]
| +--rw name string
| +--rw url? inet:uri
| +--rw credentials? string
| +--rw interface? -> /if:interfaces/interface/name
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 3]
Internet-Draft LMAP Data Model January 2015
+--rw tasks
| +--rw task* [name]
| +--rw name string
| +--rw (task-identification)
| | +--:(registry)
| | | +--rw registry? inet:uri
| | +--:(program)
| | +--rw program? string
| +--rw option* [name]
| | +--rw name string
| | +--rw value? string
| +--rw tag* string
| +--rw suppress-by-default? boolean
+--rw timings
+--rw timing* [name]
+--rw name string
+--rw (timing-type)?
| +--:(periodic)
| | +--rw periodic
| | +--rw interval uint32
| | +--rw start? yang:date-and-time
| | +--rw end? yang:date-and-time
| +--:(calendar)
| | +--rw calendar
| | +--rw month* month
| | +--rw weekday* weekday
| | +--rw day-of-months* int8
| | +--rw hour* int8
| | +--rw minute* int8
| | +--rw second* int8
| | +--rw timezone-offset? timezone-offset
| | +--rw start? yang:date-and-time
| | +--rw end? yang:date-and-time
| +--:(one-off)
| | +--rw one-off-time yang:date-and-time
| +--:(immediate)
| | +--rw immediate empty
| +--:(startup)
| +--rw startup empty
+--rw random-spread? int32
The tree diagram below shows the structure of the state model.
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 4]
Internet-Draft LMAP Data Model January 2015
module: ietf-lmap
+--ro lmap-state
+--ro agent
| +--ro agent-id yang:uuid
| +--ro device-id inet:uri
| +--ro hardware string
| +--ro firmware string
| +--ro version string
+--ro tasks
+--ro task* [name]
+--ro name string
+--ro (task-identification)
| +--:(registry)
| | +--ro registry? inet:uri
| +--:(program)
| +--ro program? string
+--ro last-execution? yang:date-and-time
+--ro last-status? string
+--ro last-message? string
+--ro last-failed-execution? yang:date-and-time
+--ro last-failed-status? string
+--ro last-failed-message? string
The tree diagram below shows the structure of the notification
(reporting) model.
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 5]
Internet-Draft LMAP Data Model January 2015
notifications:
+---n report
+--ro date yang:date-and-time
+--ro agent-id? yang:uuid
+--ro group-id? string
+--ro task* [name]
| +--ro name string
| +--ro (task-identification)
| | +--:(registry)
| | | +--ro registry? inet:uri
| | +--:(program)
| | +--ro program? string
| +--ro option* [name]
| | +--ro name string
| | +--ro value? string
| +--ro tag* string
| +--ro suppress-by-default? boolean
+--ro header
| +--ro column* string
+--ro row*
+--ro start yang:date-and-time
+--ro end? yang:date-and-time
+--ro conflict* string
+--ro cross-traffic? uint64
+--ro value* string
3. Relationship to the Information Model
The LMAP information model [I-D.ietf-lmap-information-model] is
devided into six sections. They are mapped into the YANG data model
as explained below:
o Pre-Configuration Information: This is not modeled explicitly
since it is a subset of the configuration information.
o Configuration Information: This is modeled in the /lmap/agent
subtree and the /lmap/schedules, /lmap/tasks, and /lmap/channels
subtrees described below. Some items have been left out because
they are expected to be dealt with by the underlying protocol.
o Instruction Information: This is modeled in the /lmap/suppression
subtree and the /lmap/schedules, /lmap/tasks, and /lmap/channels
subtrees described below.
o Logging Information: Some of the logging information, in
particular 'success/failure/warning messages in response to
information updates from the Controller', will be handled by the
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 6]
Internet-Draft LMAP Data Model January 2015
protocol used to manipulate the lmap specific configuration.
[[CREF1: It needs to be discussed whether we can rely on informal
syslog messages that can be accessed via protocols such RFC 5277
or whether we want to define specific notifications in the YANG
data model. --JS]]
o Capability and Status Information: Some of the status information
is modeled in the /lmap-state/agent subtree. Information about
network interfaces can be obtained from the interfaces YANG data
model [RFC7223]. The list of supported tasks is modeled in the
/lmap-state/tasks subtree including information about the last
execution and the last failed execution.
o Reporting Information: This is modeled by the report notification.
These six sections are build on the following common information
objects:
o Schedules: This is modeled in the /lmap/schedules subtree.
o Channels: This is modeled in the /lmap/channels subtree.
o Task Configurations: This is modeled in the /lmap/tasks subtree.
o Timing Information: This is modeled in the /lmap/timings subtree.
4. YANG Module
This module imports definitions from [RFC6991] and [RFC7223].
<CODE BEGINS> file "ietf-lmap@2015-01-23.yang"
module ietf-lmap {
namespace "urn:ietf:params:xml:ns:yang:ietf-lmap";
prefix "lmap";
import ietf-yang-types {
prefix yang;
}
import ietf-inet-types {
prefix inet;
}
import ietf-interfaces {
prefix if;
}
organization
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 7]
Internet-Draft LMAP Data Model January 2015
"IETF Large-Scale Measurement Platforms Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/lmap/>
WG List: <mailto:lmap@ietf.org>
Editor: Juergen Schoenwaelder
<j.schoenwaelder@jacobs-university.de>
Editor: Vaibhav Bajpai
<v.bajpai@jacobs-university.de>";
description
"This module defines a data model for Large-Scale Measurement
Platforms (LMAP).";
revision "2015-01-23" {
description
"Initial version";
reference
"RFC XXX: A YANG Data Model for LMAP Measurement Agents";
}
/*
* Typedefs
*/
typedef weekday {
type enumeration {
enum sunday {
description "Sunday of the week";
}
enum monday {
description "Monday of the week";
}
enum tuesday {
description "Tuesday of the week";
}
enum wednesday {
description "Wednesday of the week";
}
enum thursday {
description "Thursday of the week";
}
enum friday {
description "Friday of the week";
}
enum saturdary {
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 8]
Internet-Draft LMAP Data Model January 2015
description "Saturday of the week";
}
}
description
"A type modeling the weekdays in the Greco-Roman
tradition.";
}
typedef month {
type enumeration {
enum january {
description "January of the Julian and Gregorian calendar";
}
enum february {
description "February of the Julian and Gregorian calendar";
}
enum march {
description "March of the Julian and Gregorian calendar";
}
enum april {
description "April of the Julian and Gregorian calendar";
}
enum may {
description "May of the Julian and Gregorian calendar";
}
enum june {
description "June of the Julian and Gregorian calendar";
}
enum july {
description "July of the Julian and Gregorian calendar";
}
enum august {
description "August of the Julian and Gregorian calendar";
}
enum september {
description "September of the Julian and Gregorian calendar";
}
enum october {
description "October of the Julian and Gregorian calendar";
}
enum november {
description "November of the Julian and Gregorian calendar";
}
enum december {
description "December of the Julian and Gregorian calendar";
}
}
description
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 9]
Internet-Draft LMAP Data Model January 2015
"A type modeling the month in the Julian and Gregorian
tradition.";
}
typedef timezone-offset {
type string {
pattern 'Z|[\+\-]\d{2}:\d{2}';
}
description
"A timezone-offset as it is use in the yang:date-and-time
type. The value Z is equivalent to +00:00. The value -00:00
indicates and unknown time-offset.";
}
/*
* Groupings
*/
grouping timing-start-end-grouping {
description
"A grouping that provides start and end times for
timing objects.";
leaf start {
type yang:date-and-time;
description
"The date and time when the timing object
starts to create triggers.";
}
leaf end {
type yang:date-and-time;
description
"The date and time when the timing object
stops to create triggers.
It is generally a good idea to always configure
an end time and to refresh the configuration
of timing object as needed to ensure that agents
that loose connectivity to their controller
do not continue their tasks forever.";
}
}
grouping task-options-grouping {
description
"A list of options of a task. Each option is a name/value
pair (where the value may be absent).";
list option {
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 10]
Internet-Draft LMAP Data Model January 2015
key "name";
ordered-by user;
description
"A list of options passed to the task. It is a list of
key / value pairs and may be used to model options.
Options may be used to identify the role of a task
or to pass a channel name to a task.";
leaf name {
type string;
description
"The name of the option.";
}
leaf value {
type string;
description
"The value of the option.";
}
}
}
grouping task-grouping {
description
"A grouping that defines the configuration of a task.";
list task {
key name;
description
"The list of tasks configured on the LMAP agent.";
leaf name {
type string;
description
"The unique name of a task.";
}
choice task-identification {
mandatory true;
description
"Information that identifies the task.";
leaf registry {
type inet:uri;
description
"The registry entry identifying the configured task.";
}
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 11]
Internet-Draft LMAP Data Model January 2015
leaf program {
type string;
description
"The (local) program to invoke in order to execute
the task.";
}
}
uses task-options-grouping {
description
"The list of task specific options.";
}
leaf-list tag {
type string;
description
"A tag contains additional information that is passed
with the result record to the collector. A tag can be
used to carry the Measurement Cycle ID.";
}
leaf suppress-by-default {
type boolean;
default true;
description
"Indicates whether the task will be suppressed by
a default supression.";
}
}
}
/*
* Configuration data nodes
*/
container lmap {
description
"Configuration of the LMAP agent.";
/*
* Common Information Objects: Configuration
*/
container agent {
description
"Configuration of parameters affecting the whole
measurement agent.";
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 12]
Internet-Draft LMAP Data Model January 2015
leaf agent-id {
type yang:uuid;
description
"The agent-id identifies a measurement agent with
a very low probability of collision. In certain
deployments, the agent-id may be considered
sensitive and hence this object is optional.";
}
leaf device-id {
type inet:uri;
description
"The device-id identifies a property of the
device running the measurement agent. In certain
deployments, the device-id may be considered
sensitive and hence this object is optional.";
}
leaf credentials {
type string;
description
"The credentials of the agent.";
// XXX: This is way too simplistic. Credentials are
// specific to the authentication mechanism used
// by a protocol. Hence, this needs to be a far
// more complex and extensible choice or it might
// not be needed since the protocol data models
// already cover it.
}
leaf group-id {
type string;
description
"The group-id identifies a group of measurement
agents. In certain deployments, the group-id
may be considered less sensitive than the
agent-id.";
}
leaf report-agent-id {
type boolean;
default false;
// XXX: write a must expression that requires
// group-id to be configured when this is true?
description
"The 'report-agent-id' controls whether the
'agent-id' is reported to collectors if the
'group-id' is configured. If the 'group-id'
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 13]
Internet-Draft LMAP Data Model January 2015
is not configured, the agent-id is always
reported.";
}
}
/*
* Common Information Objects: Schedules
*/
container schedules {
description
"Configuration of LMAP schedules. Schedules control with
tasks are executed by the LMAP implementation.";
list schedule {
key name;
description
"Configuration of a particular schedule.";
leaf name {
type string;
description
"The locally-unique, administratively assigned name for
this scheduled task.";
}
list action {
key name;
description
"An action describes a task that is invoked by the
schedule. Multiple actions are invoked sequentially.";
leaf name {
type string;
description
"The unique identifier for this action.";
}
leaf task {
type leafref {
path "/lmap/tasks/task/name";
}
mandatory true;
description
"The tasks invoked by this action.";
}
uses task-options-grouping {
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 14]
Internet-Draft LMAP Data Model January 2015
description
"The list of action specific options that are
appended to the list of task specific options.";
}
list destination {
key "name";
description
"A destination receives information from the task
associated with this action. A queue is internally
used to pass the information to another (scheduled)
action.";
leaf name {
type string;
description
"The name of this destination (queue) that passes
information to another (scheduled) action.";
}
leaf-list output {
type uint16;
description
"The list of outputs of a task directed to another
(scheduled) action. If no output is specified,
then all output is directed to another (scheduled)
action.";
}
leaf schedule {
type leafref {
path "/lmap/schedules/schedule/name";
}
mandatory true;
description
"The schedule of the (scheduled) action receiving
the output.";
}
leaf action {
type leafref {
path "/lmap/schedules/schedule"
+ "[name = current()/../schedule]"
+ "/action/name";
}
mandatory true;
description
"The (scheduled) action receiving the output (the
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 15]
Internet-Draft LMAP Data Model January 2015
destination consuming the data from the queue).";
}
}
}
leaf timing {
type leafref {
path "/lmap/timings/timing/name";
}
mandatory true;
description
"The timing source controlling the start of the scheduled
tasks.";
}
}
}
/*
* Suppression
*/
container suppression {
description
"Suppression information to prevent schedules to start
certain tasks.";
leaf enabled {
type boolean;
default false;
description
"Setting 'enabled' to true will suppress all tasks that
where suppress-by-default is true.";
}
leaf stop-ongoing-tasks {
type boolean;
default false;
description
"Setting 'stop-ongoing-tasks' to true will cause
running tasks to be terminated if 'enabled' is set
to true. Otherwise, running tasks will not be
affected.";
}
leaf start {
type yang:date-and-time;
description
"The date and time when supression starts to
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 16]
Internet-Draft LMAP Data Model January 2015
become effective. If not present, supression
becomes effective immeditately when 'enabled'
is set to true.";
}
leaf end {
type yang:date-and-time;
description
"The date and time when supression stops to
be effective. If not present, supression
continues indefinite until 'enabled' is set
to false.";
}
leaf-list task {
type leafref {
path "/lmap/tasks/task/name";
}
description
"A specific task to suppress. If no tasks are
listed, then all tasks will be suppressed.";
}
leaf-list schedule {
type leafref {
path "/lmap/schedules/schedule/name";
}
description
"A specific schedule to suppress. If no schedules
are listed, then all schedules will be suppressed.";
}
}
/*
* Common Information Objects: Channels
*/
container channels {
description
"A channel describes properties of an LMAP control or
reporting channel.";
list channel {
key name;
description
"The list of channels configured on the LMAP agent.";
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 17]
Internet-Draft LMAP Data Model January 2015
leaf name {
type string;
description
"The unique name of a channel.";
}
leaf url {
type inet:uri;
description
"The remote endpoint of the channel.";
}
leaf credentials {
type string;
description
"The credentials of the channel.";
// XXX: This is way too simplistic. Credentials are
// specific to the authentication mechanism used
// by a protocol. Hence, this needs to be a far
// more complex and extensible choice.
}
leaf interface {
type leafref {
path "/if:interfaces/if:interface/if:name";
}
description
"The local interface to use for reaching the remote
endpoint of the channel.";
}
}
}
/*
* Common Information Objects: Task Configurations
*/
container tasks {
description
"Configuration of LMAP tasks.";
uses task-grouping;
}
/*
* Common Information Objects: Timing Information
*/
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 18]
Internet-Draft LMAP Data Model January 2015
container timings {
description
"Configuration of LMAP timings.
Implementations may be forced to delay acting
upon triggers in the face of local constraints.
A task triggered therefore not rely on the accuracy
provided by the scheduler implementation.";
list timing {
key name;
description
"The list of timings configured on the LMAP agent.";
leaf name {
type string;
description
"The unique name of a timing.";
}
choice timing-type {
description
"Different types of timing objects are handled by
different branches of this choices.";
case periodic {
container periodic {
description
"A periodic timing object triggers periodically
driven by a regular interval.";
leaf interval {
type uint32;
units "milliseconds";
mandatory true;
description
"The number of milliseconds between two triggers
generated by this periodic timing object.
The execution system must not generate triggers
for periodic timing objects that have a interval
value of 0. A timing object with an interval of
0 milliseconds will therefore never trigger.";
}
uses timing-start-end-grouping;
}
}
case calendar {
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 19]
Internet-Draft LMAP Data Model January 2015
container calendar {
description
"A calendar timing object trigger based on the
current calendar date and time.";
leaf-list month {
type month;
description
"A month at which this calendar timing will
trigger.";
}
leaf-list weekday {
type weekday;
description
"A weekday at which this calendar timing will
trigger.";
}
leaf-list day-of-months {
type int8 {
range "-31..-1 | 1..31";
}
description
"A day in the months at which this calendar
timing will trigger. Negative numbers indicate
days counted backwards from the end of the
months.";
}
leaf-list hour {
type int8 {
range "0..23";
}
description
"An hour at which this calendar timing will
trigger.";
}
leaf-list minute {
type int8 {
range "0..59";
}
description
"A minute at which this calendar timing will
trigger.";
}
leaf-list second {
type int8 {
range "0..59";
}
description
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 20]
Internet-Draft LMAP Data Model January 2015
"A second at which this calendar timing will
trigger.";
}
leaf timezone-offset {
type timezone-offset;
description
"The timezone in which this calendar timing
object will be evaluated.";
}
uses timing-start-end-grouping;
}
}
case one-off {
leaf one-off-time {
type yang:date-and-time;
mandatory true;
description
"This one-off timing object triggers once at the
configured one-off-time.";
}
}
case immediate {
leaf immediate {
type empty;
mandatory true;
description
"This immediate timing object triggers immediately
when it is configured.";
}
}
case startup {
leaf startup {
type empty;
mandatory true;
description
"This startup timing object triggers whenever the
LMAP agent (re)starts.";
}
}
}
leaf random-spread {
type int32;
units milliseconds;
description
"This optional leaf adds a random spread to the
computation of the trigger.";
}
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 21]
Internet-Draft LMAP Data Model January 2015
}
}
}
/*
* The state subtree provides information about the capabilities
* and the current status of the MA.
*/
container lmap-state {
config false;
description
"A tree exporting state information about the LMAP agent.";
container agent {
description
"Operations state of the measurement agent.";
leaf agent-id {
type yang:uuid;
mandatory true;
description
"The agent-id identifies a measurement agent with
a very low probability of collision. In certain
deployments, the agent-id may be considered
sensitive and hence this object is optional.";
}
leaf device-id {
type inet:uri;
mandatory true;
description
"The device-id identifies a property of the
device running the measurement agent. In certain
deployments, the device-id may be considered
sensitive and hence this object is optional.";
}
leaf hardware {
type string;
mandatory true;
description
"A short description of the hardware the measurement
agent is running on. This should include the version
number of the hardware";
}
leaf firmware {
type string;
mandatory true;
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 22]
Internet-Draft LMAP Data Model January 2015
description
"A short description of the firmware the measurement
agent is running on. This should include the version
number of the firmware.";
}
leaf version {
type string;
mandatory true;
description
"A short description of the software implementing the
measurement agent. This should include the version
number of the measurement agent software.";
}
}
container tasks {
description
"Available LMAP tasks, including information about their
last execution and their last failed execution.";
list task {
key name;
description
"The list of tasks available on the LMAP agent.";
leaf name {
type string;
description
"The unique name of a task.";
}
choice task-identification {
mandatory true;
description
"Information that identifies the task.";
leaf registry {
type inet:uri;
description
"The registry entry identifying the configured task.";
}
leaf program {
type string;
description
"The (local) program to invoke in order to execute
the task.";
}
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 23]
Internet-Draft LMAP Data Model January 2015
}
leaf last-execution {
type yang:date-and-time;
description
"The date and time of the last invocation of this task.";
}
leaf last-status {
type string; // XXX should this be an enum?
description
"The status code returned by the last execution of
this task.";
}
leaf last-message {
type string;
description
"The status message produced by the last execution
of this task.";
}
leaf last-failed-execution {
type yang:date-and-time;
description
"The date and time of the last failed invocation
of this task.";
}
leaf last-failed-status {
type string; // XXX should this be an enum?
description
"The status code returned by the last failed execution
of this task.";
}
leaf last-failed-message {
type string;
description
"The status message produced by the last failed
execution of this task.";
}
}
}
}
notification report {
description
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 24]
Internet-Draft LMAP Data Model January 2015
"The result record produced by a certain task.";
leaf date {
type yang:date-and-time;
mandatory true;
description
"The date and time when this report was sent.";
}
leaf agent-id {
type yang:uuid;
description
"The agent-id of the agent from which this
report originates.";
}
leaf group-id {
type string;
description
"The group-id of the agent from which this
report originates.";
}
uses task-grouping;
// XXX We would prefer to just send a configuration version
// XXX number such that the configuration can be identified
// XXX that was active XXX when the report was generated. It
// XXX would be nice to have a generic configuration version
// XXX number that we could reuse. If this works out, we can
// XXX inline the grouping as well.
container header {
description
"The header of the result records.";
leaf-list column {
type string;
description
"A header of a column in the result rows.";
}
}
list row {
description
"The rows of the result record.";
leaf start {
type yang:date-and-time;
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 25]
Internet-Draft LMAP Data Model January 2015
mandatory true;
description
"The date and time when the measurement producing
this result row started.";
}
leaf end {
type yang:date-and-time;
description
"The date and time when the measurement producing
this result row stopped.";
}
leaf-list conflict {
// XXX: Unclear what this string contains since tasks
// lifetime in config is different from result record
// lifetime (buffering).
type string;
description
"The name of a task overlapping with the execution
of the task that has produced this result record.";
}
leaf cross-traffic {
type uint64;
description
"The number of bytes of non-measurement traffic on
the measurement interface(s) during the measurement
period.";
}
leaf-list value {
// XXX: Should this be a union? At the end, all is
// a string.
type string;
description
"The value of a cell in the result.";
}
}
}
}
<CODE ENDS>
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 26]
Internet-Draft LMAP Data Model January 2015
5. Security Considerations
TBD
6. IANA Considerations
This document registers a URI in the "IETF XML Registry" [RFC3688].
Following the format in RFC 3688, the following registrations have
been made.
URI: urn:ietf:params:xml:ns:yang:ietf-lmap
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
This document registers a YANG module in the "YANG Module Names"
registry [RFC6020].
name: ietf-lmap
namespace: urn:ietf:params:xml:ns:yang:ietf-lmap
prefix: lmap
reference: RFC XXXX
7. Acknowledgements
Juergen Schoenwaelder and Vaibhav Bajpai work in part on the Leone
research project, which receives funding from the European Union
Seventh Framework Programme [FP7/2007-2013] under grant agreement
number 317647.
8. References
8.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010.
[RFC6991] Schoenwaelder, J., "Common YANG Data Types", RFC 6991,
July 2013.
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 27]
Internet-Draft LMAP Data Model January 2015
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 7223, May 2014.
8.2. Informative References
[I-D.ietf-lmap-framework]
Eardley, P., Morton, A., Bagnulo, M., Burbridge, T.,
Aitken, P., and A. Akhter, "A framework for large-scale
measurement platforms (LMAP)", draft-ietf-lmap-
framework-10 (work in progress), January 2015.
[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-03 (work in progress), January 2015.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
January 2004.
Appendix A. Example Configuration (XML)
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<lmap xmlns="urn:ietf:params:xml:ns:yang:ietf-lmap">
<agent>
<agent-id>550e8400-e29b-41d4-a716-446655440000</agent-id>
<device-id>urn:dev:mac:0024befffe804ff1</device-id>
<group-id>wireless measurement at the north-pole</group-id>
<report-agent-id>true</report-agent-id>
</agent>
<schedules>
<schedule>
<name>weekdays-hourly</name>
<action>
<name>udp-latency-weekdays-hourly</name>
<task>udp-latency-measurement</task>
<destination>
<name>q-all</name>
<schedule>daily</schedule>
<action>report-daily</action>
</destination>
</action>
<timing>hourly</timing>
</schedule>
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 28]
Internet-Draft LMAP Data Model January 2015
<schedule>
<name>hourly</name>
<action>
<name>icmp-latency-hourly</name>
<task>icmp-latency-measurement</task>
<destination>
<name>q-all</name>
<schedule>daily</schedule>
<action>report-daily</action>
</destination>
</action>
<timing>hourly</timing>
</schedule>
<schedule>
<name>daily</name>
<action>
<name>report-daily</name>
<task>lmap-reporting-task</task>
<option>
<name>channel</name>
<value>default-collector-channel</value>
</option>
</action>
<timing>daily</timing>
</schedule>
<schedule>
<name>immediate</name>
<action>
<name>icmp-latency-immediate</name>
<task>icmp-latency-measurement</task>
<destination>
<name>q-all</name>
<schedule>immediate</schedule>
<action>report-immediate</action>
</destination>
</action>
<action>
<name>report-immediate</name>
<task>lmap-reporting-task</task>
<option>
<name>channel</name>
<value>default-collector-channel</value>
</option>
</action>
<timing>immediate</timing>
<!-- for how long does this task stick around? -->
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 29]
Internet-Draft LMAP Data Model January 2015
</schedule>
</schedules>
<suppression>
<enabled>true</enabled>
<start>2014-09-02T14:06:11+02:00</start>
<task>iperf-server</task>
<schedule>hourly</schedule>
<schedule>weekdays-hourly</schedule>
</suppression>
<channels>
<channel>
<name>default-collector-channel</name>
</channel>
</channels>
<tasks>
<task>
<name>udp-latency-measurement</name>
<registry>urn:....</registry>
</task>
<task>
<name>icmp-latency-measurement</name>
<registry>urn:....</registry>
</task>
<task>
<name>iperf-server</name>
<program>iperf</program>
<option>
<name>role</name>
<value>server</value>
</option>
<suppress-by-default>false</suppress-by-default>
</task>
<task>
<name>lmap-reporting-task</name>
<program>lmap-reportd</program>
</task>
</tasks>
<timings>
<timing>
<name>hourly</name>
<periodic>
<interval>3600000</interval>
<start>2014-09-01T17:44:00+02:00</start>
<end>2014-09-30T00:00:00+02:00</end>
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 30]
Internet-Draft LMAP Data Model January 2015
</periodic>
</timing>
<timing>
<name>daily</name>
<calendar>
<hour>04</hour>
</calendar>
</timing>
<timing>
<name>tuesday-thursday-sunday</name>
<calendar>
<weekday>tuesday</weekday>
<weekday>thursday</weekday>
<weekday>sunday</weekday>
<hour>18</hour>
<minute>04</minute>
<second>42</second>
<end>2014-09-30T00:00:00+02:00</end>
</calendar>
</timing>
<timing>
<name>once-every-six-hours</name>
<calendar>
<hour>0</hour>
<hour>6</hour>
<hour>12</hour>
<hour>18</hour>
<minute>0</minute>
<second>0</second>
<end>2014-09-30T00:00:00+02:00</end>
</calendar>
<random-spread>21600000</random-spread>
</timing>
<timing>
<name>immediate</name>
<immediate/>
</timing>
<timing>
<name>startup</name>
<startup/>
<random-spread>12345</random-spread>
</timing>
</timings>
</lmap>
<lmap-state xmlns="urn:ietf:params:xml:ns:yang:ietf-lmap">
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 31]
Internet-Draft LMAP Data Model January 2015
<agent>
<agent-id>550e8400-e29b-41d4-a716-446655440000</agent-id>
<device-id>urn:dev:mac:0024befffe804ff1</device-id>
<hardware>ACME home router</hardware>
<firmware>OpenWrt version 10.03.1</firmware>
<version>Measurement Agent Daemon (MAD) 4.2</version>
</agent>
<tasks>
<task>
<name>udp-latency-measurement</name>
<registry>urn:....</registry>
</task>
<task>
<name>icmp-latency-measurement</name>
<registry>urn:....</registry>
</task>
<task>
<name>iperf</name>
<program>iperf</program>
</task>
<task>
<name>lmap-reporting-task</name>
<program>lmap-reportd</program>
<last-execution>2015-01-23T12:00:00+01:00</last-execution>
<last-status>200</last-status>
<last-message>OK</last-message>
<last-failed-execution>2015-01-23T03:00:00+01:00</last-failed-execution>
<last-failed-status>503</last-failed-status>
<last-failed-message>connection timed out</last-failed-message>
</task>
</tasks>
</lmap-state>
</data>
Appendix B. Example Configuration (JSON)
{
"ietf-lmap:lmap": {
"agent": {
"agent-id": "550e8400-e29b-41d4-a716-446655440000",
"device-id": "urn:dev:mac:0024befffe804ff1",
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 32]
Internet-Draft LMAP Data Model January 2015
"group-id": "wireless measurement at the north-pole",
"report-agent-id": true
},
"schedules": {
"schedule": [
{
"name": "weekdays-hourly",
"action": [
{
"name": "udp-latency-weekdays-hourly",
"task": "udp-latency-measurement",
"destination": [
{
"name": "q-all",
"schedule": "daily",
"action": "report-daily"
}
]
}
],
"timing": "hourly"
},
{
"name": "hourly",
"action": [
{
"name": "icmp-latency-hourly",
"task": "icmp-latency-measurement",
"destination": [
{
"name": "q-all",
"schedule": "daily",
"action": "report-daily"
}
]
}
],
"timing": "hourly"
},
{
"name": "daily",
"action": [
{
"name": "report-daily",
"task": "lmap-reporting-task",
"option": [
{
"name": "channel",
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 33]
Internet-Draft LMAP Data Model January 2015
"value": "default-collector-channel"
}
]
}
],
"timing": "daily"
},
{
"name": "immediate",
"action": [
{
"name": "icmp-latency-immediate",
"task": "icmp-latency-measurement",
"destination": [
{
"name": "q-all",
"schedule": "immediate",
"action": "report-immediate"
}
]
},
{
"name": "report-immediate",
"task": "lmap-reporting-task",
"option": [
{
"name": "channel",
"value": "default-collector-channel"
}
]
}
],
"timing": "immediate"
}
]
},
"suppression": {
"enabled": true,
"start": "2014-09-02T14:06:11+02:00",
"task": [
"iperf-server"
],
"schedule": [
"hourly",
"weekdays-hourly"
]
},
"channels": {
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 34]
Internet-Draft LMAP Data Model January 2015
"channel": [
{
"name": "default-collector-channel"
}
]
},
"tasks": {
"task": [
{
"name": "udp-latency-measurement",
"registry": "urn:...."
},
{
"name": "icmp-latency-measurement",
"registry": "urn:...."
},
{
"name": "iperf-server",
"program": "iperf",
"option": [
{
"name": "role",
"value": "server"
}
],
"suppress-by-default": false
},
{
"name": "lmap-reporting-task",
"program": "lmap-reportd"
}
]
},
"timings": {
"timing": [
{
"name": "hourly",
"periodic": {
"interval": 3600000,
"start": "2014-09-01T17:44:00+02:00",
"end": "2014-09-30T00:00:00+02:00"
}
},
{
"name": "daily",
"calendar": {
"hour": [
04
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 35]
Internet-Draft LMAP Data Model January 2015
]
}
},
{
"name": "tuesday-thursday-sunday",
"calendar": {
"weekday": [
"tuesday",
"thursday",
"sunday"
],
"hour": [
18
],
"minute": [
04
],
"second": [
42
],
"end": "2014-09-30T00:00:00+02:00"
}
},
{
"name": "once-every-six-hours",
"calendar": {
"hour": [
0,
6,
12,
18
],
"minute": [
0
],
"second": [
0
],
"end": "2014-09-30T00:00:00+02:00"
},
"random-spread": 21600000
},
{
"name": "immediate",
"immediate": [null]
},
{
"name": "startup",
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 36]
Internet-Draft LMAP Data Model January 2015
"startup": [null],
"random-spread": 12345
}
]
}
},
"ietf-lmap:lmap-state": {
"agent": {
"agent-id": "550e8400-e29b-41d4-a716-446655440000",
"device-id": "urn:dev:mac:0024befffe804ff1",
"hardware": "ACME home router",
"firmware": "OpenWrt version 10.03.1",
"version": "Measurement Agent Daemon (MAD) 4.2"
},
"tasks": {
"task": [
{
"name": "udp-latency-measurement",
"registry": "urn:...."
},
{
"name": "icmp-latency-measurement",
"registry": "urn:...."
},
{
"name": "iperf",
"program": "iperf"
},
{
"name": "lmap-reporting-task",
"program": "lmap-reportd",
"last-execution": "2015-01-23T12:00:00+01:00",
"last-status": "200",
"last-message": "OK",
"last-failed-execution": "2015-01-23T03:00:00+01:00",
"last-failed-status": "503",
"last-failed-message": "connection timed out"
}
]
}
}
}
Schoenwaelder & Bajpai Expires July 27, 2015 [Page 37]
Internet-Draft LMAP Data Model January 2015
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 July 27, 2015 [Page 38]