1 module restconf-module-with-missing-list-stream {
2 namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-rmwmls";
5 import ietf-yang-types { prefix yang; }
6 import ietf-inet-types { prefix inet; }
9 "IETF NETCONF (Network Configuration) Working Group";
15 Editor: Martin Bjorklund
25 "This module contains conceptual YANG specifications
26 for the YANG Patch and error content that is used in
27 RESTCONF protocol messages. A conceptual container
28 representing the RESTCONF API nodes (media type
29 application/yang.api).
31 Note that the YANG definitions within this module do not
32 represent configuration data of any kind.
33 The YANG grouping statements provide a normative syntax
34 for XML and JSON message encoding purposes.
35 Copyright (c) 2013 IETF Trust and the persons identified as
36 authors of the code. All rights reserved.
38 Redistribution and use in source and binary forms, with or
39 without modification, is permitted pursuant to, and subject
40 to the license terms contained in, the Simplified BSD License
41 set forth in Section 4.c of the IETF Trust's Legal Provisions
42 Relating to IETF Documents
43 (http://trustee.ietf.org/license-info).
45 This version of this YANG module is part of RFC XXXX; see
46 the RFC itself for full legal notices.";
48 // RFC Ed.: replace XXXX with actual RFC number and remove this
51 // RFC Ed.: remove this note
52 // Note: extracted from draft-bierman-netconf-restconf-02.txt
54 // RFC Ed.: update the date below with the date of RFC publication
55 // and remove this note.
60 "RFC XXXX: RESTCONF Protocol.";
63 typedef data-resource-identifier {
68 "Contains a Data Resource Identifier formatted string
69 to identify a specific data node. The data node that
70 uses this data type SHOULD define the document root
71 for data resource identifiers. The default document
72 root is the target datastore conceptual root node.
73 Data resource identifiers are defined relative to
76 "RFC XXXX: [sec. 5.3.1.1 ABNF For Data Resource Identifiers]";
79 // this typedef is TBD; not currently used
80 typedef datastore-identifier {
85 "Identifies the NETCONF shared candidate datastore.";
87 "RFC 6241, section 8.3";
91 "Identifies the NETCONF running datastore.";
93 "RFC 6241, section 5.1";
97 "Identifies the NETCONF startup datastore.";
99 "RFC 6241, section 8.7";
105 "Contains a string to identify a specific datastore.
106 The enumerated datastore identifier values are
107 reserved for standard datastore names.";
110 typedef revision-identifier {
112 pattern '\d{4}-\d{2}-\d{2}';
115 "Represents a specific date in YYYY-MM-DD format.
116 TBD: make pattern more precise to exclude leading zeros.";
119 grouping yang-patch {
121 "A grouping that contains a YANG container
122 representing the syntax and semantics of a
123 YANG Patch edit request message.";
125 container yang-patch {
127 "Represents a conceptual sequence of datastore edits,
128 called a patch. Each patch is given a client-assigned
129 patch identifier. Each edit MUST be applied
130 in ascending order, and all edits MUST be applied.
131 If any errors occur, then the target datastore MUST NOT
132 be changed by the patch operation.
134 A patch MUST be validated by the server to be a
135 well-formed message before any of the patch edits
136 are validated or attempted.
138 YANG datastore validation (defined in RFC 6020, section
139 8.3.3) is performed after all edits have been
140 individually validated.
142 It is possible for a datastore constraint violation to occur
143 due to any node in the datastore, including nodes not
144 included in the edit list. Any validation errors MUST
145 be reported in the reply message.";
148 "RFC 6020, section 8.3.";
153 "An arbitrary string provided by the client to identify
154 the entire patch. This value SHOULD be present in any
155 audit logging records generated by the server for the
156 patch. Error messages returned by the server pertaining
157 to this patch will be identified by this patch-id value.";
165 "An arbitrary string provided by the client to describe
166 the entire patch. This value SHOULD be present in any
167 audit logging records generated by the server for the
176 "Represents one edit within the YANG Patch
181 "Arbitrary string index for the edit.
182 Error messages returned by the server pertaining
183 to a specific edit will be identified by this
191 "The target data node is created using the
192 supplied value, only if it does not already
197 "Delete the target node, only if the data resource
198 currently exists, otherwise return an error.";
202 "Insert the supplied value into a user-ordered
203 list or leaf-list entry. The target node must
204 represent a new data resource.";
208 "The supplied value is merged with the target data
213 "Move the target node. Reorder a user-ordered
214 list or leaf-list. The target node must represent
215 an existing data resource.";
219 "The supplied value is used to replace the target
224 "Delete the target node if it currently exists.";
229 "The datastore operation requested for the associated
234 type data-resource-identifier;
237 "Identifies the target data resource for the edit
242 when "(../operation = 'insert' or " +
243 "../operation = 'move') and " +
244 "(../where = 'before' or ../where = 'after')" {
246 "Point leaf only applies for insert or move
247 operations, before or after an existing entry.";
249 type data-resource-identifier;
251 "The absolute URL path for the data node that is being
252 used as the insertion point or move point for the
253 target of this edit entry.";
257 when "../operation = 'insert' or ../operation = 'move'" {
259 "Where leaf only applies for insert or move
265 "Insert or move a data node before the data resource
266 identified by the 'point' parameter.";
270 "Insert or move a data node after the data resource
271 identified by the 'point' parameter.";
275 "Insert or move a data node so it becomes ordered
276 as the first entry.";
280 "Insert or move a data node so it becomes ordered
287 "Identifies where a data resource will be inserted or
288 moved. YANG only allows these operations for
289 list and leaf-list data nodes that are ordered-by
294 when "(../operation = 'create' or " +
295 "../operation = 'merge' " +
296 "or ../operation = 'replace' or " +
297 "../operation = 'insert')" {
299 "Value node only used for create, merge,
300 replace, and insert operations";
303 "Value used for this edit operation.";
308 } // grouping yang-patch
311 grouping yang-patch-status {
314 "A grouping that contains a YANG container
315 representing the syntax and semantics of
316 YANG Patch status response message.";
318 container yang-patch-status {
320 "A container representing the response message
321 sent by the server after a YANG Patch edit
322 request message has been processed.";
327 "The patch-id value used in the request";
330 choice global-status {
332 "Report global errors or complete success.
333 If there is no case selected then errors
334 are reported in the edit-status container.";
339 "This container will be present if global
340 errors unrelated to a specific edit occurred.";
345 "This leaf will be present if the request succeeded
346 and there are no errors reported in the edit-status
351 container edit-status {
353 "This container will be present if there are
354 edit-specific status responses to report.";
360 "Represents a list of status responses,
361 corresponding to edits in the YANG Patch
362 request message. If an edit entry was
363 skipped or not reached by the server,
364 then this list will not contain a corresponding
365 entry for that edit.";
370 "Response status is for the edit list entry
371 with this edit-id value.";
373 choice edit-status-choice {
375 "A choice between different types of status
376 responses for each edit entry.";
380 "This edit entry was invoked without any
381 errors detected by the server associated
387 "Contains the Location header value that would be
388 returned if this edit causes a new resource to be
389 created. If the edit identified by the same edit-id
390 value was successfully invoked and a new resource
391 was created, then this field will be returned
397 "The server detected errors associated with the
398 edit identified by the same edit-id value.";
404 } // grouping yang-patch-status
410 "A grouping that contains a YANG container
411 representing the syntax and semantics of a
412 YANG Patch errors report within a response message.";
415 config false; // needed so list error does not need a key
417 "Represents an error report returned by the server if
418 a request results in an error.";
422 "An entry containing information about one
423 specific error that occurred while processing
424 a RESTCONF request.";
425 reference "RFC 6241, Section 4.3";
430 description "The transport layer";
433 description "The rpc or notification layer";
436 description "The protocol operation layer";
439 description "The server application layer";
444 "The protocol layer where the error occurred.";
451 "The enumerated error tag.";
457 "The application-specific error tag.";
461 type data-resource-identifier;
463 "The target data resource identifier associated
464 with the error, if any.";
469 "A message describing the error.";
472 container error-info {
474 "A container allowing additional information
475 to be included in the error report.";
476 // arbitrary anyxml content here
486 "A grouping that contains a YANG container
487 representing the syntax and semantics of
488 the RESTCONF API resource.";
492 "Conceptual container representing the
493 application/yang.api resource type.";
497 "Container representing the application/yang.datastore
498 resource type. Represents the conceptual root of the
499 unified configuration datastore containing YANG data
500 nodes. The child nodes of this container are
501 configuration data resources (application/yang.data)
502 defined as top-level YANG data nodes from the modules
503 advertised by the server in /restconf/modules.";
506 container operational {
508 "Container representing the application/yang.datastore
509 resource type. Represents the conceptual root of the
510 operational data supported by the server. The child
511 nodes of this container are operational data resources
512 (application/yang.data) defined as top-level
513 YANG data nodes from the modules advertised by
514 the server in /restconf/modules.";
519 "Contains a list of module description entries.
520 These modules are currently loaded into the server.";
525 "Each entry represents one module currently
526 supported by the server.";
529 type yang:yang-identifier;
530 description "The YANG module name.";
534 type revision-identifier;
535 type string { length 0; }
538 "The YANG module revision date. An empty string is
539 used if no revision statement is present in the
546 "The XML namespace identifier for this module.";
549 type yang:yang-identifier;
551 "List of YANG feature names from this module that are
552 supported by the server.";
554 leaf-list deviation {
555 type yang:yang-identifier;
557 "List of YANG deviation module names used by this
558 server to modify the conformance of the module
559 associated with this entry.";
564 container operations {
566 "Container for all operation resources
567 (application/yang.operation),
569 Each resource is represented as an empty leaf with the
570 name of the RPC operation from the YANG rpc statement.
574 POST /restconf/operations/show-log-errors
576 leaf show-log-errors {
584 "Container representing the notification event streams
585 supported by the server.";
587 "RFC 5277, Section 3.4, <streams> element.";
589 /** deleted list stream for testing purposes **/
596 "Version 1.0 of the RESTCONF protocol.";
601 "Contains the RESTCONF protocol version.";
604 } // grouping restconf
607 grouping notification {
609 "Contains the notification message wrapper definition.";
611 container notification {
613 "RESTCONF notification message wrapper.";
615 type yang:date-and-time;
618 "The time the event was generated by the
621 "RFC 5277, section 4, <eventTime> element.";
624 /* The YANG-specific notification container is encoded
625 * after the 'event-time' element. The format
626 * corresponds to the notificationContent element
627 * in RFC 5277, section 4. For example:
629 * module example-one {
631 * notification event1 { ... }
635 * Encoded as element 'event1' in the namespace
636 * for module 'example-one'.
639 } // grouping notification