66c22b69bfc8e3c13197d725d8d57ac7c7f3adfe
[transportpce.git] / ordmodels / src / main / yang / ietf-restconf-monitoring@2016-08-15.yang
1 module ietf-restconf-monitoring {
2   namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring";
3   prefix "rcmon";
4
5   import ietf-yang-types { prefix yang; }
6   import ietf-inet-types { prefix inet; }
7
8   organization
9     "IETF NETCONF (Network Configuration) Working Group";
10
11   contact
12     "WG Web:   <http://tools.ietf.org/wg/netconf/>
13      WG List:  <mailto:netconf@ietf.org>
14      Author:   Andy Bierman
15                <mailto:andy@yumaworks.com>
16      Author:   Martin Bjorklund
17                <mailto:mbj@tail-f.com>
18      Author:   Kent Watsen
19                <mailto:kwatsen@juniper.net>";
20
21   description
22     "This module contains monitoring information for the
23      RESTCONF protocol.
24      Copyright (c) 2016 IETF Trust and the persons identified as
25      authors of the code.  All rights reserved.
26      Redistribution and use in source and binary forms, with or
27      without modification, is permitted pursuant to, and subject
28      to the license terms contained in, the Simplified BSD License
29      set forth in Section 4.c of the IETF Trust's Legal Provisions
30      Relating to IETF Documents
31      (http://trustee.ietf.org/license-info).
32      This version of this YANG module is part of RFC XXXX; see
33      the RFC itself for full legal notices.";
34
35   // RFC Ed.: replace XXXX with actual RFC number and remove this
36   // note.
37
38   // RFC Ed.: remove this note
39   // Note: extracted from draft-ietf-netconf-restconf-17.txt
40
41   // RFC Ed.: update the date below with the date of RFC publication
42   // and remove this note.
43   revision 2016-08-15 {
44     description
45       "Initial revision.";
46     reference
47       "RFC XXXX: RESTCONF Protocol.";
48   }
49
50   container restconf-state {
51     config false;
52     description
53       "Contains RESTCONF protocol monitoring information.";
54
55     container capabilities {
56       description
57         "Contains a list of protocol capability URIs";
58
59       leaf-list capability {
60         type inet:uri;
61         description "A RESTCONF protocol capability URI.";
62       }
63     }
64
65     container streams {
66       description
67         "Container representing the notification event streams
68          supported by the server.";
69        reference
70          "RFC 5277, Section 3.4, <streams> element.";
71
72       list stream {
73         key name;
74         description
75           "Each entry describes an event stream supported by
76            the server.";
77
78         leaf name {
79           type string;
80           description "The stream name";
81           reference "RFC 5277, Section 3.4, <name> element.";
82         }
83
84         leaf description {
85           type string;
86           description "Description of stream content";
87           reference
88             "RFC 5277, Section 3.4, <description> element.";
89         }
90
91         leaf replay-support {
92           type boolean;
93           default false;
94           description
95             "Indicates if replay buffer supported for this stream.
96              If 'true', then the server MUST support the 'start-time'
97              and 'stop-time' query parameters for this stream.";
98           reference
99             "RFC 5277, Section 3.4, <replaySupport> element.";
100         }
101
102         leaf replay-log-creation-time {
103           when "../replay-support" {
104             description
105               "Only present if notification replay is supported";
106           }
107           type yang:date-and-time;
108           description
109             "Indicates the time the replay log for this stream
110              was created.";
111           reference
112             "RFC 5277, Section 3.4, <replayLogCreationTime>
113              element.";
114         }
115
116         list access {
117           key encoding;
118           min-elements 1;
119           description
120             "The server will create an entry in this list for each
121              encoding format that is supported for this stream.
122              The media type 'text/event-stream' is expected
123              for all event streams. This list identifies the
124              sub-types supported for this stream.";
125
126           leaf encoding {
127             type string;
128             description
129               "This is the secondary encoding format within the
130                'text/event-stream' encoding used by all streams.
131                The type 'xml' is supported for XML encoding.
132                The type 'json' is supported for JSON encoding.";
133           }
134
135           leaf location {
136             type inet:uri;
137             mandatory true;
138             description
139               "Contains a URL that represents the entry point
140                for establishing notification delivery via server
141                sent events.";
142           }
143         }
144       }
145     }
146   }
147
148 }