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