module ietf-5277-netmod {
namespace
"urn:ietf:params:xml:ns:yang:ietf-5277-netmod";
// TODO: examples in the draft consider the namespace below
// which follows the namespace format in 5277
// "urn:ietf:params:xml:ns:netmod:notification";
prefix netmod-notif;
import ietf-yang-types {
prefix yang;
}
organization "IETF";
contact
"WG Web:
WG List:
WG Chair: Juergen Schoenwaelder
WG Chair: Tom Nadeau
Editor: Alberto Gonzalez Prieto
Editor: Alexander Clemm
Editor: Eric Voit
Editor: Einar Nilsen-Nygaard
Editor: Ambika Prasad Tripathy
";
description
"Model for RPC in RFC 5277: NETCONF Event Notifications";
revision 2016-03-21 {
description
"Model for data nodes and notifications in RFC 5277:
NETCONF Event Notifications";
reference
"RFC 5277: NETCONF Event Notifications";
}
/*
* EXTENSIONS
*/
extension control-plane-notif {
description
"This statement applies only to notifications.
It indicates that the notification is a control-plane
notification and therefore it does not generate an
event stream.";
}
/*
* DATA NODES
*/
container netconf {
description
"Netconf container as defined in RFC 5277.";
reference
"RFC 5277: NETCONF Event Notifications";
container streams {
// TODO: should be config false?. That breaks the leafref
// from the config subscriptions config false;
description
"The container with the set of available event streams.";
reference
"RFC 5277: NETCONF Event Notifications";
list stream {
must "1 = count(./name == 'NETCONF')" {
description
"The list must contain a NETCONF stream.
A NETCONF server implementation supporting the
notification capability MUST support the
'NETCONF' notification event stream. This stream
contains all NETCONF XML event notifications supported
by the NETCONF server.
The exact string 'NETCONF' is used during the
advertisement of stream support during the
operation on and during the
operation.";
}
key "name";
description
"The list available event streams.";
leaf name {
type string;
description
"The name of the event stream.
If this is the default NETCONF stream, this must have
the value 'NETCONF'.";
}
leaf description {
type string;
mandatory true;
description
"A description of the event stream, including such
information as the type of events that are sent over
this stream.";
}
leaf replaySupport {
type boolean;
mandatory true;
description
"An indication of whether or not event replay is
available on this stream.";
}
leaf replayLogCreationTime {
when "../replaySupport" {
description
"This object MUST be present if replay is supported.";
}
type yang:date-and-time;
mandatory true;
description
"The timestamp of the creation of the log used to
support the replay function on this stream.
Note that this might be earlier then the earliest
available notification in the log. This object
is updated if the log resets for some reason.
This object MUST be present if replay is supported.";
}
leaf replayLogAgedTime {
when "current()/../replaySupport" {
description
"This object MUST be present if replay is supported
and any notifications have been aged out of the log.";
}
type yang:date-and-time;
mandatory true;
description
"The timestamp of the last notification aged
out of the log. This object MUST be present
if replay is supported and any notifications
have been aged out of the log.";
}
} // list stream
} // container streams
} // container netconf
/*
* NOTIFICATIONS
*/
notification replayComplete {
netmod-notif:control-plane-notif;
description
"This notification is sent to signal the end of a replay
portion of a subscription.";
}
notification notificationComplete {
netmod-notif:control-plane-notif;
description
"This notification is sent to signal the end of a notification
subscription. It is sent in the case that stopTime was
specified during the creation of the subscription.";
}
}