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