3 namespace "urn:ietf:params:xml:ns:yang:ietf-restconf";
7 "IETF NETCONF (Network Configuration) Working Group";
10 "WG Web: <http://tools.ietf.org/wg/netconf/>
11 WG List: <mailto:netconf@ietf.org>
13 <mailto:andy@yumaworks.com>
14 Author: Martin Bjorklund
15 <mailto:mbj@tail-f.com>
17 <mailto:kwatsen@juniper.net>";
20 "This module contains conceptual YANG specifications
21 for basic RESTCONF media type definitions used in
22 RESTCONF protocol messages.
23 Note that the YANG definitions within this module do not
24 represent configuration data of any kind.
25 The 'restconf-media-type' YANG extension statement
26 provides a normative syntax for XML and JSON message
28 Copyright (c) 2016 IETF Trust and the persons identified as
29 authors of the code. All rights reserved.
30 Redistribution and use in source and binary forms, with or
31 without modification, is permitted pursuant to, and subject
32 to the license terms contained in, the Simplified BSD License
33 set forth in Section 4.c of the IETF Trust's Legal Provisions
34 Relating to IETF Documents
35 (http://trustee.ietf.org/license-info).
36 This version of this YANG module is part of RFC XXXX; see
37 the RFC itself for full legal notices.";
39 // RFC Ed.: replace XXXX with actual RFC number and remove this
42 // RFC Ed.: remove this note
43 // Note: extracted from draft-ietf-netconf-restconf-17.txt
45 // RFC Ed.: update the date below with the date of RFC publication
46 // and remove this note.
51 "RFC XXXX: RESTCONF Protocol.";
59 "This extension is used to specify a YANG data template which
60 represents conceptual data defined in YANG. It is
61 intended to describe hierarchical data independent of
62 protocol context or specific message encoding format.
63 Data definition statements within a yang-data extension
64 specify the generic syntax for the specific YANG data
65 template, whose name is the argument of the yang-data
67 Note that this extension does not define a media-type.
68 A specification using this extension MUST specify the
69 message encoding rules, including the content media type.
70 The mandatory 'name' parameter value identifies the YANG
71 data template that is being defined. It contains the
73 This extension is ignored unless it appears as a top-level
74 statement. It MUST contain data definition statements
75 that result in exactly one container data node definition.
76 An instance of a YANG data template can thus be translated
77 into an XML instance document, whose top-level element
78 corresponds to the top-level container.
79 The module name and namespace value for the YANG module using
80 the extension statement is assigned to instance document data
81 conforming to the data definition statements within
83 The sub-statements of this extension MUST follow the
84 'data-def-stmt' rule in the YANG ABNF.
85 The XPath document root is the extension statement itself,
86 such that the child nodes of the document root are
87 represented by the data-def-stmt sub-statements within
88 this extension. This conceptual document is the context
89 for the following YANG statements:
98 - instance-identifier data type
99 The following data-def-stmt sub-statements are constrained
100 when used within a yang-data-resource extension statement.
101 - The list-stmt is not required to have a key-stmt defined.
102 - The if-feature-stmt is ignored if present.
103 - The config-stmt is ignored if present.
104 - The available identity values for any 'identityref'
105 leaf or leaf-list nodes is limited to the module
106 containing this extension statement, and the modules
107 imported into that module.
111 rc:yang-data yang-errors {
115 rc:yang-data yang-api {
121 "A grouping that contains a YANG container
122 representing the syntax and semantics of a
123 YANG Patch errors report within a response message.";
127 "Represents an error report returned by the server if
128 a request results in an error.";
132 "An entry containing information about one
133 specific error that occurred while processing
134 a RESTCONF request.";
135 reference "RFC 6241, Section 4.3";
140 description "The transport layer";
143 description "The rpc or notification layer";
146 description "The protocol operation layer";
149 description "The server application layer";
154 "The protocol layer where the error occurred.";
161 "The enumerated error tag.";
167 "The application-specific error tag.";
171 type instance-identifier;
173 "The YANG instance identifier associated
174 with the error node.";
180 "A message describing the error.";
185 "This anydata value MUST represent a container with
186 zero or more data nodes representing additional
195 "Conceptual grouping representing the RESTCONF
200 "Conceptual container representing the RESTCONF
205 "Container representing the datastore resource.
206 Represents the conceptual root of all state data
207 and configuration data supported by the server.
208 The child nodes of this container can be any data
209 resource which are defined as top-level data nodes
210 from the YANG modules advertised by the server in
211 the ietf-yang-library module.";
214 container operations {
216 "Container for all operation resources.
217 Each resource is represented as an empty leaf with the
218 name of the RPC operation from the YANG rpc statement.
219 For example, the 'system-restart' RPC operation defined
220 in the 'ietf-system' module would be represented as
221 an empty leaf in the 'ietf-system' namespace. This is
222 a conceptual leaf, and will not actually be found in
229 To invoke the 'system-restart' RPC operation:
230 POST /restconf/operations/ietf-system:system-restart
231 To discover the RPC operations supported by the server:
232 GET /restconf/operations
233 In XML the YANG module namespace identifies the module:
235 xmlns='urn:ietf:params:xml:ns:yang:ietf-system' />
236 In JSON the YANG module name identifies the module:
237 { 'ietf-system:system-restart' : [null] }
241 leaf yang-library-version {
243 pattern '\d{4}-\d{2}-\d{2}';
248 "Identifies the revision date of the ietf-yang-library
249 module that is implemented by this RESTCONF server.
250 Indicates the year, month, and day in YYYY-MM-DD