module ietf-lmap-control {
namespace "urn:ietf:params:xml:ns:yang:ietf-lmap-control";
prefix "lmap-control";
import ietf-yang-types {
prefix yang;
}
import ietf-inet-types {
prefix inet;
}
import ietf-lmap-common {
prefix lmap-common;
}
organization
"IETF Large-Scale Measurement Platforms Working Group";
contact
"WG Web:
WG List:
Editor: Juergen Schoenwaelder
Editor: Vaibhav Bajpai
";
description
"This module defines a data model for controlling measurement
agents that are part of a Large-Scale Measurement Platform
(LMAP). This data model is expected to be implemented by a
measurement agent.";
revision "2015-10-28" {
description
"Initial version";
reference
"RFC XXX: A YANG Data Model for LMAP Measurement Agents";
}
/*
* 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.";
}
}
/*
* 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.";
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 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 measurement-point {
type string;
description
"The measurement point indicating where the
measurement agent is located on a path.";
reference
"RFC 7398: A Reference Path and Measurement Points
for Large-Scale Measurement of Broadband
Performance";
}
leaf report-agent-id {
type boolean;
must "../agent-id" {
description
"An agent-id must exist for this to be set.";
}
description
"The 'report-agent-id' controls whether the
'agent-id' is reported to collectors if the
'group-id' is configured. If the 'group-id'
is not configured, the agent-id is always
reported.";
}
leaf report-measurement-point {
type boolean;
must "../measurement-point" {
description
"A measurement-point must exist for this to be set.";
}
description
"The 'report-measurement-point' controls whether
the 'measurement-point' is reported to collectors
if the 'measurement-point' is configured.";
}
leaf controller-timeout {
type uint32;
units "seconds";
description
"A timer is started after each successful contact
with a controller. When the timer reaches the
controller-timeout, an event is raised indicating
that connectivity to the controller has been lost.";
}
}
/*
* Common Information Objects: Schedules
*/
container schedules {
description
"Configuration of LMAP schedules. Schedules control which
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 schedule.";
}
leaf event {
type leafref {
path "/lmap/events/event/name";
}
mandatory true;
description
"The event source controlling the start of the scheduled
tasks.";
}
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 lmap-common:task-options-grouping {
description
"The list of action specific options that are
appended to the list of task specific options.";
}
leaf-list destination {
type leafref {
path "/lmap/schedules/schedule/name";
}
description
"A schedule of receiving the output produced by
this action. A queue is internally used to pass
results to another schedule. The behaviour of
an action passing data to its own schedule is
implementation specific.
Data passed to a sequential or pipelined schedule
is consumed by the schedule's first action. Data
passed to a parallel schedule is consumed by all
actions of the schedule.";
}
leaf-list suppression-tag {
type lmap-common:tag-type;
description
"A list of suppression tags.";
}
}
leaf execution-mode {
type enumeration {
enum sequential {
value 1;
description
"The actions of the schedule are executed
sequentially.";
}
enum parallel {
value 2;
description
"The actions of the schedule are executed
concurrently";
}
enum pipelined {
value 3;
description
"The actions of the schedule are executed in a
pipelined mode. Output created by an action is
passed as input to the subsequent action.";
}
}
default pipelined;
description
"The execution mode of this schedule determins in
which order the actions of the schedule are executed.";
}
leaf-list suppression-tag {
type lmap-common:tag-type;
description
"A list of suppression tags.";
}
}
}
/*
* Suppression
*/
container suppressions {
description
"Suppression information to prevent schedules or
certain actions from starting.";
list suppression {
key name;
description
"Configuration of a particular suppression.";
leaf name {
type string;
description
"The locally-unique, administratively assigned name for
this suppression.";
}
leaf start {
type leafref {
path "/lmap/events/event/name";
}
description
"The event source controlling the start of the
suppression period.";
}
leaf end {
type leafref {
path "/lmap/events/event/name";
}
description
"The event source controlling the end of the
suppression period. If not present, supression
continues indefinitely.";
}
leaf-list tag {
type union {
type lmap-common:tag-type;
type lmap-common:tag-matchall-type;
}
description
"A list of suppression tags. The suppression will
apply to all schedules (and their actions) that have
a matching value in their suppression-tags and to
all actions that have a matching value in their
suppression-tags.";
}
leaf stop-running {
type boolean;
default false;
description
"Setting 'stop-running' to true will cause running
tasks to be terminated if suppression is activated.
Otherwise, running tasks will not be affected if
suppression is activated.";
}
}
}
/*
* Common Information Objects: Task Configurations
*/
container tasks {
description
"Configuration of LMAP tasks.";
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.";
}
uses lmap-common:metrics-grouping;
leaf program {
type string;
description
"The (local) program to invoke in order to execute
the task.";
}
uses lmap-common: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.";
}
}
}
/*
* Common Information Objects: Event Information
*/
container events {
description
"Configuration of LMAP events.
Implementations may be forced to delay acting
upon the occurance of events in the face of local
constraints. An action triggered by an event
therefore should not rely on the accuracy
provided by the scheduler implementation.";
list event {
key name;
description
"The list of event sources configured on the
LMAP agent.";
leaf name {
type string;
description
"The unique name of an event source.";
}
choice event-type {
description
"Different types of events are handled by
different branches of this choice. Note that
this choice can be extended via augmentations.";
case periodic {
container periodic {
description
"A periodic timing object triggers periodically
according to 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 periodic timing object with an
interval of 0 milliseconds will therefore never
trigger.";
}
uses timing-start-end-grouping;
}
}
case calendar {
container calendar {
description
"A calendar timing object triggers based on the
current calendar date and time.";
leaf-list month {
type union {
type lmap-common:month;
type lmap-common:wildcard;
}
description
"A month at which this calendar timing will
trigger. The wildcard means all months.";
}
leaf-list weekday {
type union {
type lmap-common:weekday;
type lmap-common:wildcard;
}
description
"A weekday at which this calendar timing will
trigger. The wildcard means all weekdays.";
}
leaf-list day-of-month {
type union {
type int8 { range "-31..-1 | 1..31"; }
type lmap-common:wildcard;
}
description
"A day in the month at which this calendar
timing will trigger. Negative numbers indicate
days counted backwards from the end of the
months. The wildcard means all days of a month.";
}
leaf-list hour {
type union {
type int8 { range "0..23"; }
type lmap-common:wildcard;
}
description
"An hour at which this calendar timing will
trigger. The wildcard means all hours of a day.";
}
leaf-list minute {
type union {
type int8 { range "0..59"; }
type lmap-common:wildcard;
}
description
"A minute at which this calendar timing will
trigger. The wildcard means all minutes of
an hour.";
}
leaf-list second {
type union {
type int8 { range "0..59"; }
type lmap-common:wildcard;
}
description
"A second at which this calendar timing will
trigger. The wildcard means all seconds of
a minute.";
}
leaf timezone-offset {
type lmap-common: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 event object triggers immediately
when it is configured.";
}
}
case startup {
leaf startup {
type empty;
mandatory true;
description
"This startup event object triggers whenever the
LMAP agent (re)starts.";
}
}
case controller-lost {
leaf controller-lost {
type empty;
mandatory true;
description
"The controller-lost event object triggers when
the connectivity to the controller has been lost
for at least 'controller-timeout' seconds.";
}
}
case controller-ok {
leaf controller-ok {
type empty;
mandatory true;
description
"The controller-ok event object triggers when
the connectivity to the controller has been
restored after it was lost for at least
'controller-timeout' seconds.";
}
}
}
leaf random-spread {
type int32;
units milliseconds;
description
"This optional leaf adds a random spread to the
computation of the trigger.";
}
}
}
}
/*
* 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;
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.";
}
leaf last-started {
type yang:date-and-time;
mandatory true;
description
"The date and time the measurement agent last started.";
}
}
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.";
}
uses lmap-common:metrics-grouping;
leaf version {
type string;
description
"A short description of the software implementing
the task. This should include the version
number of the measurement task software.";
}
leaf program {
type string;
description
"The (local) program to invoke in order to execute
the task.";
}
}
}
container schedules {
description
"State of LMAP schedules.";
list schedule {
key name;
description
"State of a particular schedule.";
leaf name {
type string;
description
"The locally-unique, administratively assigned name for
this schedule.";
}
leaf state {
type enumeration {
enum enabled {
value 1;
description
"The value 'enabled' indicates that the
schedule is currently enabled.";
}
enum disabled {
value 2;
description
"The value 'disabled' indicates that the
schedule is currently disabled.";
}
enum suppressed {
value 3;
description
"The value 'suppressed' indicates that the
schedule is currently suppressed.";
}
}
description
"The current state of the schedule.";
}
leaf last-invocation {
type yang:date-and-time;
description
"The date and time of the last invocation of
this schedule.";
}
list action {
key name;
description
"The state of the actions associated with this
schedule entry.";
leaf name {
type string;
description
"The unique identifier for this action.";
}
leaf state {
type enumeration {
enum enabled {
value 1;
description
"The value 'enabled' indicates that the
action is currently enabled.";
}
enum disabled {
value 2;
description
"The value 'disabled' indicates that the
action is currently disabled.";
}
enum suppressed {
value 3;
description
"The value 'suppressed' indicates that the
action is currently suppressed.";
}
}
description
"The current state of the action.";
}
leaf last-invocation {
type yang:date-and-time;
description
"The date and time of the last invocation of
this action.";
}
leaf last-completion {
type yang:date-and-time;
description
"The date and time of the last completion of
this action.";
}
leaf last-status {
type lmap-common:status-code;
description
"The status code returned by the last execution of
this action.";
}
leaf last-message {
type string;
description
"The status message produced by the last execution
of this action.";
}
leaf last-failed-completion {
type yang:date-and-time;
description
"The date and time of the last failed completion
of this action.";
}
leaf last-failed-status {
type lmap-common:status-code;
description
"The status code returned by the last failed execution
of this action.";
}
leaf last-failed-message {
type string;
description
"The status message produced by the last failed
execution of this action.";
}
}
}
}
}
}