blob: 1ae9cc2316195313d0e02bea43ea3aba8d01106c [file] [log] [blame]
Sean Condonfae8e662016-12-15 10:25:13 +00001module notifications {
2
3 namespace "urn:ietf:params:xml:ns:netconf:notification:1.0";
4 prefix "ncEvent";
5
6 import ietf-yang-types { prefix yang; }
7
8 organization
9 "IETF NETCONF WG";
10
11 contact
12 "netconf@ops.ietf.org";
13
14 description
15 "Conversion of the 'ncEvent' XSD in the
16 NETCONF Notifications RFC.";
17
18 reference
19 "RFC 5277.";
20
21 revision 2008-07-14 {
22 description "RFC 5277 version.";
23 }
24
25 typedef streamNameType {
26 description
27 "The name of an event stream.";
28 type string;
29 }
30
31 rpc create-subscription {
32 description
33 "The command to create a notification subscription. It
34 takes as argument the name of the notification stream
35 and filter. Both of those options limit the content of
36 the subscription. In addition, there are two time-related
37 parameters, startTime and stopTime, which can be used to
38 select the time interval of interest to the notification
39 replay feature.";
40
41 input {
42 leaf stream {
43 description
44 "An optional parameter that indicates which stream of events
45 is of interest. If not present, then events in the default
46 NETCONF stream will be sent.";
47 type streamNameType;
48 default "NETCONF";
49 }
50
51 anyxml filter {
52 description
53 "An optional parameter that indicates which subset of all
54 possible events is of interest. The format of this
55 parameter is the same as that of the filter parameter
56 in the NETCONF protocol operations. If not present,
57 all events not precluded by other parameters will
58 be sent.";
59 }
60
61 leaf startTime {
62 description
63 "A parameter used to trigger the replay feature and
64 indicates that the replay should start at the time
65 specified. If start time is not present, this is not a
66 replay subscription.";
67 type yang:date-and-time;
68 }
69
70 leaf stopTime {
71 // must ". >= ../startTime";
72 description
73 "An optional parameter used with the optional replay
74 feature to indicate the newest notifications of
75 interest. If stop time is not present, the notifications
76 will continue until the subscription is terminated.
77 Must be used with startTime.";
78 type yang:date-and-time;
79 }
80 }
81 }
82
83 container notification {
84 description "internal struct to start a notification";
85 config false;
86
87 leaf eventTime {
88 mandatory true;
89 type yang:date-and-time;
90 }
91
92 // eventType and any data content goes here
93 }
94}
95