1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2 <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">module ietf-netconf {
3 namespace "urn:ietf:params:xml:ns:netconf:base:1.0";
6 import ietf-inet-types {
10 import ietf-netconf-acm {
15 "IETF NETCONF (Network Configuration) Working Group";
17 "WG Web: <http://tools.ietf.org/wg/netconf/>
18 WG List: <netconf@ietf.org>
21 <bertietf@bwijnen.net>
23 WG Chair: Mehmet Ersue
24 <mehmet.ersue@nsn.com>
26 Editor: Martin Bjorklund
27 <mbj@tail-f.com>
29 Editor: Juergen Schoenwaelder
30 <j.schoenwaelder@jacobs-university.de>
33 <andy.bierman@brocade.com>";
35 "NETCONF Protocol Data Types and Protocol Operations.
37 Copyright (c) 2011 IETF Trust and the persons identified as
38 the document authors. All rights reserved.
40 Redistribution and use in source and binary forms, with or
41 without modification, is permitted pursuant to, and subject
42 to the license terms contained in, the Simplified BSD License
43 set forth in Section 4.c of the IETF Trust's Legal Provisions
44 Relating to IETF Documents
45 (http://trustee.ietf.org/license-info).
47 This version of this YANG module is part of RFC 6241; see
48 the RFC itself for full legal notices.";
53 2013-09-29: Updated to include NACM attributes,
54 as specified in RFC 6536: sec 3.2.5 and 3.2.8";
56 "RFC 6241: Network Configuration Protocol";
59 extension get-filter-element-attributes {
61 "If this extension is present within an 'anyxml'
62 statement named 'filter', which must be conceptually
63 defined within the RPC input section for the <get>
64 and <get-config> protocol operations, then the
65 following unqualified XML attribute is supported
66 within the <filter> element, within a <get> or
67 <get-config> protocol operation:
69 type : optional attribute with allowed
70 value strings 'subtree' and 'xpath'.
71 If missing, the default value is 'subtree'.
73 If the 'xpath' feature is supported, then the
74 following unqualified XML attribute is
77 select: optional attribute containing a
78 string representing an XPath expression.
79 The 'type' attribute must be equal to 'xpath'
80 if this attribute is present.";
84 feature writable-running {
86 "NETCONF :writable-running capability;
87 If the server advertises the :writable-running
88 capability for a session, then this feature must
89 also be enabled for that session. Otherwise,
90 this feature must not be enabled.";
92 "RFC 6241, Section 8.2";
97 "NETCONF :candidate capability;
98 If the server advertises the :candidate
99 capability for a session, then this feature must
100 also be enabled for that session. Otherwise,
101 this feature must not be enabled.";
103 "RFC 6241, Section 8.3";
106 feature confirmed-commit {
107 if-feature "candidate";
109 "NETCONF :confirmed-commit:1.1 capability;
110 If the server advertises the :confirmed-commit:1.1
111 capability for a session, then this feature must
112 also be enabled for that session. Otherwise,
113 this feature must not be enabled.";
115 "RFC 6241, Section 8.4";
118 feature rollback-on-error {
120 "NETCONF :rollback-on-error capability;
121 If the server advertises the :rollback-on-error
122 capability for a session, then this feature must
123 also be enabled for that session. Otherwise,
124 this feature must not be enabled.";
126 "RFC 6241, Section 8.5";
131 "NETCONF :validate:1.1 capability;
132 If the server advertises the :validate:1.1
133 capability for a session, then this feature must
134 also be enabled for that session. Otherwise,
135 this feature must not be enabled.";
137 "RFC 6241, Section 8.6";
142 "NETCONF :startup capability;
143 If the server advertises the :startup
144 capability for a session, then this feature must
145 also be enabled for that session. Otherwise,
146 this feature must not be enabled.";
148 "RFC 6241, Section 8.7";
153 "NETCONF :url capability;
154 If the server advertises the :url
155 capability for a session, then this feature must
156 also be enabled for that session. Otherwise,
157 this feature must not be enabled.";
159 "RFC 6241, Section 8.8";
164 "NETCONF :xpath capability;
165 If the server advertises the :xpath
166 capability for a session, then this feature must
167 also be enabled for that session. Otherwise,
168 this feature must not be enabled.";
170 "RFC 6241, Section 8.9";
173 typedef session-id-type {
178 "NETCONF Session Id";
181 typedef session-id-or-zero-type {
184 "NETCONF Session Id or Zero to indicate none";
187 typedef error-tag-type {
191 "The request requires a resource that
194 enum "invalid-value" {
196 "The request specifies an unacceptable value for one
197 or more parameters.";
201 "The request or response (that would be generated) is
202 too large for the implementation to handle.";
204 enum "missing-attribute" {
206 "An expected attribute is missing.";
208 enum "bad-attribute" {
210 "An attribute value is not correct; e.g., wrong type,
211 out of range, pattern mismatch.";
213 enum "unknown-attribute" {
215 "An unexpected attribute is present.";
217 enum "missing-element" {
219 "An expected element is missing.";
223 "An element value is not correct; e.g., wrong type,
224 out of range, pattern mismatch.";
226 enum "unknown-element" {
228 "An unexpected element is present.";
230 enum "unknown-namespace" {
232 "An unexpected namespace is present.";
234 enum "access-denied" {
236 "Access to the requested protocol operation or
237 data model is denied because authorization failed.";
241 "Access to the requested lock is denied because the
242 lock is currently held by another entity.";
244 enum "resource-denied" {
246 "Request could not be completed because of
247 insufficient resources.";
249 enum "rollback-failed" {
251 "Request to roll back some configuration change (via
252 rollback-on-error or <discard-changes> operations)
253 was not completed for some reason.";
257 "Request could not be completed because the relevant
258 data model content already exists. For example,
259 a 'create' operation was attempted on data that
262 enum "data-missing" {
264 "Request could not be completed because the relevant
265 data model content does not exist. For example,
266 a 'delete' operation was attempted on
267 data that does not exist.";
269 enum "operation-not-supported" {
271 "Request could not be completed because the requested
272 operation is not supported by this implementation.";
274 enum "operation-failed" {
276 "Request could not be completed because the requested
277 operation failed for some reason not covered by
278 any other error condition.";
280 enum "partial-operation" {
282 "This error-tag is obsolete, and SHOULD NOT be sent
283 by servers conforming to this document.";
285 enum "malformed-message" {
287 "A message could not be handled because it failed to
288 be parsed correctly. For example, the message is not
289 well-formed XML or it uses an invalid character set.";
295 "RFC 6241, Appendix A";
298 typedef error-severity-type {
310 "NETCONF Error Severity";
312 "RFC 6241, Section 4.3";
315 typedef edit-operation-type {
319 "The configuration data identified by the
320 element containing this attribute is merged
321 with the configuration at the corresponding
322 level in the configuration datastore identified
323 by the target parameter.";
327 "The configuration data identified by the element
328 containing this attribute replaces any related
329 configuration in the configuration datastore
330 identified by the target parameter. If no such
331 configuration data exists in the configuration
332 datastore, it is created. Unlike a
333 <copy-config> operation, which replaces the
334 entire target configuration, only the configuration
335 actually present in the config parameter is affected.";
339 "The configuration data identified by the element
340 containing this attribute is added to the
341 configuration if and only if the configuration
342 data does not already exist in the configuration
343 datastore. If the configuration data exists, an
344 <rpc-error> element is returned with an
345 <error-tag> value of 'data-exists'.";
349 "The configuration data identified by the element
350 containing this attribute is deleted from the
351 configuration if and only if the configuration
352 data currently exists in the configuration
353 datastore. If the configuration data does not
354 exist, an <rpc-error> element is returned with
355 an <error-tag> value of 'data-missing'.";
359 "The configuration data identified by the element
360 containing this attribute is deleted from the
361 configuration if the configuration
362 data currently exists in the configuration
363 datastore. If the configuration data does not
364 exist, the 'remove' operation is silently ignored
370 "NETCONF 'operation' attribute values";
372 "RFC 6241, Section 7.2";
377 "Retrieve all or part of a specified configuration.";
379 "RFC 6241, Section 7.1";
383 "Particular configuration to retrieve.";
384 choice config-source {
387 "The configuration to retrieve.";
389 if-feature "candidate";
392 "The candidate configuration is the config source.";
398 "The running configuration is the config source.";
402 if-feature "startup";
405 "The startup configuration is the config source.
406 This is optional-to-implement on the server because
407 not all servers will support filtering for this
414 nc:get-filter-element-attributes;
416 "Subtree or XPath filter to use.";
423 "Copy of the source datastore subset that matched
424 the filter criteria (if any). An empty data container
425 indicates that the request did not produce any results.";
432 "The <edit-config> operation loads all or part of a specified
433 configuration to the specified target configuration.";
435 "RFC 6241, Section 7.2";
439 "Particular configuration to edit.";
440 choice config-target {
443 "The configuration target.";
445 if-feature "candidate";
448 "The candidate configuration is the config target.";
452 if-feature "writable-running";
455 "The running configuration is the config source.";
460 leaf default-operation {
464 "The default operation is merge.";
468 "The default operation is replace.";
472 "There is no default operation.";
477 "The default operation to use.";
481 if-feature "validate";
483 enum "test-then-set" {
485 "The server will test and then set if no errors.";
489 "The server will set without a test first.";
493 "The server will only test and not set, even
494 if there are no errors.";
497 default "test-then-set";
499 "The test option to use.";
504 enum "stop-on-error" {
506 "The server will stop on errors.";
508 enum "continue-on-error" {
510 "The server may continue on errors.";
512 enum "rollback-on-error" {
514 "The server will roll back on errors.
515 This value can only be used if the 'rollback-on-error'
516 feature is supported.";
519 default "stop-on-error";
521 "The error option to use.";
524 choice edit-content {
527 "The content for the edit operation.";
530 "Inline Config content.";
537 "URL-based config content.";
545 "Create or replace an entire configuration datastore with the
546 contents of another complete configuration datastore.";
548 "RFC 6241, Section 7.3";
552 "Particular configuration to copy to.";
553 choice config-target {
556 "The configuration target of the copy operation.";
558 if-feature "candidate";
561 "The candidate configuration is the config target.";
565 if-feature "writable-running";
568 "The running configuration is the config target.
569 This is optional-to-implement on the server.";
573 if-feature "startup";
576 "The startup configuration is the config target.";
583 "The URL-based configuration is the config target.";
590 "Particular configuration to copy from.";
591 choice config-source {
594 "The configuration source for the copy operation.";
596 if-feature "candidate";
599 "The candidate configuration is the config source.";
605 "The running configuration is the config source.";
609 if-feature "startup";
612 "The startup configuration is the config source.";
619 "The URL-based configuration is the config source.";
624 "Inline Config content: <config> element. Represents
625 an entire configuration datastore, not
626 a subset of the running datastore.";
634 nacm:default-deny-all;
636 "Delete a configuration datastore.";
638 "RFC 6241, Section 7.4";
642 "Particular configuration to delete.";
643 choice config-target {
646 "The configuration target to delete.";
648 if-feature "startup";
651 "The startup configuration is the config target.";
658 "The URL-based configuration is the config target.";
667 "The lock operation allows the client to lock the configuration
668 system of a device.";
670 "RFC 6241, Section 7.5";
674 "Particular configuration to lock.";
675 choice config-target {
678 "The configuration target to lock.";
680 if-feature "candidate";
683 "The candidate configuration is the config target.";
689 "The running configuration is the config target.";
693 if-feature "startup";
696 "The startup configuration is the config target.";
705 "The unlock operation is used to release a configuration lock,
706 previously obtained with the 'lock' operation.";
708 "RFC 6241, Section 7.6";
712 "Particular configuration to unlock.";
713 choice config-target {
716 "The configuration target to unlock.";
718 if-feature "candidate";
721 "The candidate configuration is the config target.";
727 "The running configuration is the config target.";
731 if-feature "startup";
734 "The startup configuration is the config target.";
743 "Retrieve running configuration and device state information.";
745 "RFC 6241, Section 7.7";
748 nc:get-filter-element-attributes;
750 "This parameter specifies the portion of the system
751 configuration and state data to retrieve.";
758 "Copy of the running datastore subset and/or state
759 data that matched the filter criteria (if any).
760 An empty data container indicates that the request did not
761 produce any results.";
768 "Request graceful termination of a NETCONF session.";
770 "RFC 6241, Section 7.8";
774 nacm:default-deny-all;
776 "Force the termination of a NETCONF session.";
778 "RFC 6241, Section 7.9";
781 type session-id-type;
784 "Particular session to kill.";
790 if-feature "candidate";
792 "Commit the candidate configuration as the device's new
793 current configuration.";
795 "RFC 6241, Section 8.3.4.1";
798 if-feature "confirmed-commit";
801 "Requests a confirmed commit.";
803 "RFC 6241, Section 8.3.4.1";
806 leaf confirm-timeout {
807 if-feature "confirmed-commit";
814 "The timeout interval for a confirmed commit.";
816 "RFC 6241, Section 8.3.4.1";
820 if-feature "confirmed-commit";
823 "This parameter is used to make a confirmed commit
824 persistent. A persistent confirmed commit is not aborted
825 if the NETCONF session terminates. The only way to abort
826 a persistent confirmed commit is to let the timer expire,
827 or to use the <cancel-commit> operation.
829 The value of this parameter is a token that must be given
830 in the 'persist-id' parameter of <commit> or
831 <cancel-commit> operations in order to confirm or cancel
832 the persistent confirmed commit.
834 The token should be a random string.";
836 "RFC 6241, Section 8.3.4.1";
840 if-feature "confirmed-commit";
843 "This parameter is given in order to commit a persistent
844 confirmed commit. The value must be equal to the value
845 given in the 'persist' parameter to the <commit> operation.
846 If it does not match, the operation fails with an
847 'invalid-value' error.";
849 "RFC 6241, Section 8.3.4.1";
854 rpc discard-changes {
855 if-feature "candidate";
857 "Revert the candidate configuration to the current
858 running configuration.";
860 "RFC 6241, Section 8.3.4.2";
864 if-feature "confirmed-commit";
866 "This operation is used to cancel an ongoing confirmed commit.
867 If the confirmed commit is persistent, the parameter
868 'persist-id' must be given, and it must match the value of the
869 'persist' parameter.";
871 "RFC 6241, Section 8.4.4.1";
876 "This parameter is given in order to cancel a persistent
877 confirmed commit. The value must be equal to the value
878 given in the 'persist' parameter to the <commit> operation.
879 If it does not match, the operation fails with an
880 'invalid-value' error.";
886 if-feature "validate";
888 "Validates the contents of the specified configuration.";
890 "RFC 6241, Section 8.6.4.1";
894 "Particular configuration to validate.";
895 choice config-source {
898 "The configuration source to validate.";
900 if-feature "candidate";
903 "The candidate configuration is the config source.";
909 "The running configuration is the config source.";
913 if-feature "startup";
916 "The startup configuration is the config source.";
923 "The URL-based configuration is the config source.";
928 "Inline Config content: <config> element. Represents
929 an entire configuration datastore, not
930 a subset of the running datastore.";