module draft-gonzalez-netconf-5277-00 {
namespace
"urn:ietf:params:xml:ns:netconf:notification:1.0";
prefix notif;
import ietf-yang-types {
prefix yang;
}
organization "IETF";
contact
"WG Web:
WG List:
WG Chair: Mahesh Jethanandani
WG Chair: Mehmet Ersue
Editor: Alberto Gonzalez Prieto
Editor: Alexander Clemm
Editor: Eric Voit
Editor: Einar Nilsen-Nygaard
Editor: Ambika Prasad Tripathy
";
description
"Model for RPCs and Notifications in RFC 5277: NETCONF Event
Notifications";
revision 2016-03-20 {
description
"Model for RPC in RFC 5277: NETCONF Event Notifications";
reference
"RFC 5277: NETCONF Event Notifications";
}
/*
* GROUPINGS
*/
grouping base-filter {
description
"This grouping defines the base for filters for
notification events.
It includes the filter defined in 5277 and
it enables extending filtering to other
types of filters";
choice filter-type {
description
"A filter needs to be a single filter of a given type.
Mixing and matching of multiple filters does not occur
at the level of this grouping.";
case rfc5277 {
anyxml filter {
description
"Filter per RFC 5277. Notification filter.
If a filter element is specified to look for data of a
particular value, and the data item is not present
within a particular event notification for its value to
be checked against, the notification will be filtered
out. For example, if one were to check for
'severity=critical' in a configuration event
notification where this field was not supported, then
the notification would be filtered out. For subtree
filtering, a non-empty node set means that the filter
matches. For XPath filtering, the mechanisms defined
in [XPATH] should be used to convert the returned
value to boolean.";
}
}
}
}
grouping subscription-info-5277 {
description
"This grouping describes the information in a 5277
subscription.";
leaf stream {
type string;
default "NETCONF";
description
"Indicates which stream of events is of interest.
If not present, events in the default NETCONF stream
will be sent.";
}
uses base-filter;
leaf startTime {
type yang:date-and-time;
description
"Used to trigger the replay feature
and indicate that the replay should start at the time
specified. If is not present, this is not a
replay subscription. It is not valid to specify start
times that are later than the current time. If the
specified is earlier than the log can support,
the replay will begin with the earliest available
notification. This parameter is of type dateTime and
compliant to [RFC3339]. Implementations must
support time zones.";
}
leaf stopTime {
type yang:date-and-time;
must "current() > ../startTime" {
description
"stopTime must be used with and be later than ";
}
description
"Used with the optional replay feature to indicate the
newest notifications of interest. If is
not present, the notifications will continue until the
subscription is terminated. Must be used with and be
later than . Values of in the
future are valid. This parameter is of type dateTime and
compliant to [RFC3339]. Implementations must support time
zones.";
}
}
/*
* RPCs
*/
rpc create-subscription {
description
"This operation initiates an event notification subscription
that will send asynchronous event notifications to the
initiator of the command until the subscription terminates.";
input {
uses subscription-info-5277;
}
}
}