2 namespace "urn:ietf:params:xml:ns:netconf:base:1.0";
5 import ietf-inet-types {
10 "IETF NETCONF (Network Configuration) Working Group";
12 "WG Web: <http://tools.ietf.org/wg/netconf/>
13 WG List: <netconf@ietf.org>
16 <bertietf@bwijnen.net>
18 WG Chair: Mehmet Ersue
19 <mehmet.ersue@nsn.com>
21 Editor: Martin Bjorklund
24 Editor: Juergen Schoenwaelder
25 <j.schoenwaelder@jacobs-university.de>
28 <andy.bierman@brocade.com>";
30 "NETCONF Protocol Data Types and Protocol Operations.
32 Copyright (c) 2011 IETF Trust and the persons identified as
33 the document authors. All rights reserved.
35 Redistribution and use in source and binary forms, with or
36 without modification, is permitted pursuant to, and subject
37 to the license terms contained in, the Simplified BSD License
38 set forth in Section 4.c of the IETF Trust's Legal Provisions
39 Relating to IETF Documents
40 (http://trustee.ietf.org/license-info).
42 This version of this YANG module is part of RFC 6241; see
43 the RFC itself for full legal notices.";
48 reference "RFC 6241: Network Configuration Protocol";
51 extension get-filter-element-attributes {
53 "If this extension is present within an 'anyxml'
54 statement named 'filter', which must be conceptually
55 defined within the RPC input section for the <get>
56 and <get-config> protocol operations, then the
57 following unqualified XML attribute is supported
58 within the <filter> element, within a <get> or
59 <get-config> protocol operation:
61 type : optional attribute with allowed
62 value strings 'subtree' and 'xpath'.
63 If missing, the default value is 'subtree'.
65 If the 'xpath' feature is supported, then the
66 following unqualified XML attribute is
69 select: optional attribute containing a
70 string representing an XPath expression.
71 The 'type' attribute must be equal to 'xpath'
72 if this attribute is present.";
75 feature writable-running {
77 "NETCONF :writable-running capability;
78 If the server advertises the :writable-running
79 capability for a session, then this feature must
80 also be enabled for that session. Otherwise,
81 this feature must not be enabled.";
82 reference "RFC 6241, Section 8.2";
87 "NETCONF :candidate capability;
88 If the server advertises the :candidate
89 capability for a session, then this feature must
90 also be enabled for that session. Otherwise,
91 this feature must not be enabled.";
92 reference "RFC 6241, Section 8.3";
95 feature confirmed-commit {
96 if-feature "candidate";
98 "NETCONF :confirmed-commit:1.1 capability;
99 If the server advertises the :confirmed-commit:1.1
100 capability for a session, then this feature must
101 also be enabled for that session. Otherwise,
102 this feature must not be enabled.";
103 reference "RFC 6241, Section 8.4";
106 feature rollback-on-error {
108 "NETCONF :rollback-on-error capability;
109 If the server advertises the :rollback-on-error
110 capability for a session, then this feature must
111 also be enabled for that session. Otherwise,
112 this feature must not be enabled.";
113 reference "RFC 6241, Section 8.5";
118 "NETCONF :validate:1.1 capability;
119 If the server advertises the :validate:1.1
120 capability for a session, then this feature must
121 also be enabled for that session. Otherwise,
122 this feature must not be enabled.";
123 reference "RFC 6241, Section 8.6";
128 "NETCONF :startup capability;
129 If the server advertises the :startup
130 capability for a session, then this feature must
131 also be enabled for that session. Otherwise,
132 this feature must not be enabled.";
133 reference "RFC 6241, Section 8.7";
138 "NETCONF :url capability;
139 If the server advertises the :url
140 capability for a session, then this feature must
141 also be enabled for that session. Otherwise,
142 this feature must not be enabled.";
143 reference "RFC 6241, Section 8.8";
148 "NETCONF :xpath capability;
149 If the server advertises the :xpath
150 capability for a session, then this feature must
151 also be enabled for that session. Otherwise,
152 this feature must not be enabled.";
153 reference "RFC 6241, Section 8.9";
156 typedef session-id-type {
161 "NETCONF Session Id";
164 typedef session-id-or-zero-type {
167 "NETCONF Session Id or Zero to indicate none";
170 typedef error-tag-type {
174 "The request requires a resource that
177 enum "invalid-value" {
179 "The request specifies an unacceptable value for one
180 or more parameters.";
184 "The request or response (that would be generated) is
185 too large for the implementation to handle.";
187 enum "missing-attribute" {
189 "An expected attribute is missing.";
191 enum "bad-attribute" {
193 "An attribute value is not correct; e.g., wrong type,
194 out of range, pattern mismatch.";
196 enum "unknown-attribute" {
198 "An unexpected attribute is present.";
200 enum "missing-element" {
202 "An expected element is missing.";
206 "An element value is not correct; e.g., wrong type,
207 out of range, pattern mismatch.";
209 enum "unknown-element" {
211 "An unexpected element is present.";
213 enum "unknown-namespace" {
215 "An unexpected namespace is present.";
217 enum "access-denied" {
219 "Access to the requested protocol operation or
220 data model is denied because authorization failed.";
224 "Access to the requested lock is denied because the
225 lock is currently held by another entity.";
227 enum "resource-denied" {
229 "Request could not be completed because of
230 insufficient resources.";
232 enum "rollback-failed" {
234 "Request to roll back some configuration change (via
235 rollback-on-error or <discard-changes> operations)
236 was not completed for some reason.";
240 "Request could not be completed because the relevant
241 data model content already exists. For example,
242 a 'create' operation was attempted on data that
245 enum "data-missing" {
247 "Request could not be completed because the relevant
248 data model content does not exist. For example,
249 a 'delete' operation was attempted on
250 data that does not exist.";
252 enum "operation-not-supported" {
254 "Request could not be completed because the requested
255 operation is not supported by this implementation.";
257 enum "operation-failed" {
259 "Request could not be completed because the requested
260 operation failed for some reason not covered by
261 any other error condition.";
263 enum "partial-operation" {
265 "This error-tag is obsolete, and SHOULD NOT be sent
266 by servers conforming to this document.";
268 enum "malformed-message" {
270 "A message could not be handled because it failed to
271 be parsed correctly. For example, the message is not
272 well-formed XML or it uses an invalid character set.";
277 reference "RFC 6241, Appendix A";
280 typedef error-severity-type {
292 "NETCONF Error Severity";
293 reference "RFC 6241, Section 4.3";
296 typedef edit-operation-type {
300 "The configuration data identified by the
301 element containing this attribute is merged
302 with the configuration at the corresponding
303 level in the configuration datastore identified
304 by the target parameter.";
308 "The configuration data identified by the element
309 containing this attribute replaces any related
310 configuration in the configuration datastore
311 identified by the target parameter. If no such
312 configuration data exists in the configuration
313 datastore, it is created. Unlike a
314 <copy-config> operation, which replaces the
315 entire target configuration, only the configuration
316 actually present in the config parameter is affected.";
320 "The configuration data identified by the element
321 containing this attribute is added to the
322 configuration if and only if the configuration
323 data does not already exist in the configuration
324 datastore. If the configuration data exists, an
325 <rpc-error> element is returned with an
326 <error-tag> value of 'data-exists'.";
330 "The configuration data identified by the element
331 containing this attribute is deleted from the
332 configuration if and only if the configuration
333 data currently exists in the configuration
334 datastore. If the configuration data does not
335 exist, an <rpc-error> element is returned with
336 an <error-tag> value of 'data-missing'.";
340 "The configuration data identified by the element
341 containing this attribute is deleted from the
342 configuration if the configuration
343 data currently exists in the configuration
344 datastore. If the configuration data does not
345 exist, the 'remove' operation is silently ignored
351 "NETCONF 'operation' attribute values";
352 reference "RFC 6241, Section 7.2";
357 "Retrieve all or part of a specified configuration.";
358 reference "RFC 6241, Section 7.1";
362 "Particular configuration to retrieve.";
363 choice config-source {
366 "The configuration to retrieve.";
368 if-feature "candidate";
371 "The candidate configuration is the config source.";
376 "The running configuration is the config source.";
379 if-feature "startup";
382 "The startup configuration is the config source.
383 This is optional-to-implement on the server because
384 not all servers will support filtering for this
391 "Subtree or XPath filter to use.";
392 nc:get-filter-element-attributes;
398 "Copy of the source datastore subset that matched
399 the filter criteria (if any). An empty data container
400 indicates that the request did not produce any results.";
406 "The <edit-config> operation loads all or part of a specified
407 configuration to the specified target configuration.";
408 reference "RFC 6241, Section 7.2";
412 "Particular configuration to edit.";
413 choice config-target {
416 "The configuration target.";
418 if-feature "candidate";
421 "The candidate configuration is the config target.";
424 if-feature "writable-running";
427 "The running configuration is the config source.";
431 leaf default-operation {
435 "The default operation is merge.";
439 "The default operation is replace.";
443 "There is no default operation.";
448 "The default operation to use.";
451 if-feature "validate";
453 enum "test-then-set" {
455 "The server will test and then set if no errors.";
459 "The server will set without a test first.";
463 "The server will only test and not set, even
464 if there are no errors.";
467 default "test-then-set";
469 "The test option to use.";
473 enum "stop-on-error" {
475 "The server will stop on errors.";
477 enum "continue-on-error" {
479 "The server may continue on errors.";
481 enum "rollback-on-error" {
483 "The server will roll back on errors.
484 This value can only be used if the 'rollback-on-error'
485 feature is supported.";
488 default "stop-on-error";
490 "The error option to use.";
492 choice edit-content {
495 "The content for the edit operation.";
498 "Inline Config content.";
504 "URL-based config content.";
511 "Create or replace an entire configuration datastore with the
512 contents of another complete configuration datastore.";
513 reference "RFC 6241, Section 7.3";
517 "Particular configuration to copy to.";
518 choice config-target {
521 "The configuration target of the copy operation.";
523 if-feature "candidate";
526 "The candidate configuration is the config target.";
529 if-feature "writable-running";
532 "The running configuration is the config target.
533 This is optional-to-implement on the server.";
536 if-feature "startup";
539 "The startup configuration is the config target.";
545 "The URL-based configuration is the config target.";
551 "Particular configuration to copy from.";
552 choice config-source {
555 "The configuration source for the copy operation.";
557 if-feature "candidate";
560 "The candidate configuration is the config source.";
565 "The running configuration is the config source.";
568 if-feature "startup";
571 "The startup configuration is the config source.";
577 "The URL-based configuration is the config source.";
581 "Inline Config content: <config> element. Represents
582 an entire configuration datastore, not
583 a subset of the running datastore.";
591 "Delete a configuration datastore.";
592 reference "RFC 6241, Section 7.4";
596 "Particular configuration to delete.";
597 choice config-target {
600 "The configuration target to delete.";
602 if-feature "startup";
605 "The startup configuration is the config target.";
611 "The URL-based configuration is the config target.";
619 "The lock operation allows the client to lock the configuration
620 system of a device.";
621 reference "RFC 6241, Section 7.5";
625 "Particular configuration to lock.";
626 choice config-target {
629 "The configuration target to lock.";
631 if-feature "candidate";
634 "The candidate configuration is the config target.";
639 "The running configuration is the config target.";
642 if-feature "startup";
645 "The startup configuration is the config target.";
653 "The unlock operation is used to release a configuration lock,
654 previously obtained with the 'lock' operation.";
655 reference "RFC 6241, Section 7.6";
659 "Particular configuration to unlock.";
660 choice config-target {
663 "The configuration target to unlock.";
665 if-feature "candidate";
668 "The candidate configuration is the config target.";
673 "The running configuration is the config target.";
676 if-feature "startup";
679 "The startup configuration is the config target.";
687 "Retrieve running configuration and device state information.";
688 reference "RFC 6241, Section 7.7";
692 "This parameter specifies the portion of the system
693 configuration and state data to retrieve.";
694 nc:get-filter-element-attributes;
700 "Copy of the running datastore subset and/or state
701 data that matched the filter criteria (if any).
702 An empty data container indicates that the request did not
703 produce any results.";
709 "Request graceful termination of a NETCONF session.";
710 reference "RFC 6241, Section 7.8";
714 "Force the termination of a NETCONF session.";
715 reference "RFC 6241, Section 7.9";
718 type session-id-type;
721 "Particular session to kill.";
726 if-feature "candidate";
728 "Commit the candidate configuration as the device's new
729 current configuration.";
730 reference "RFC 6241, Section 8.3.4.1";
733 if-feature "confirmed-commit";
736 "Requests a confirmed commit.";
737 reference "RFC 6241, Section 8.3.4.1";
739 leaf confirm-timeout {
740 if-feature "confirmed-commit";
747 "The timeout interval for a confirmed commit.";
748 reference "RFC 6241, Section 8.3.4.1";
751 if-feature "confirmed-commit";
754 "This parameter is used to make a confirmed commit
755 persistent. A persistent confirmed commit is not aborted
756 if the NETCONF session terminates. The only way to abort
757 a persistent confirmed commit is to let the timer expire,
758 or to use the <cancel-commit> operation.
760 The value of this parameter is a token that must be given
761 in the 'persist-id' parameter of <commit> or
762 <cancel-commit> operations in order to confirm or cancel
763 the persistent confirmed commit.
765 The token should be a random string.";
766 reference "RFC 6241, Section 8.3.4.1";
769 if-feature "confirmed-commit";
772 "This parameter is given in order to commit a persistent
773 confirmed commit. The value must be equal to the value
774 given in the 'persist' parameter to the <commit> operation.
775 If it does not match, the operation fails with an
776 'invalid-value' error.";
777 reference "RFC 6241, Section 8.3.4.1";
781 rpc discard-changes {
782 if-feature "candidate";
784 "Revert the candidate configuration to the current
785 running configuration.";
786 reference "RFC 6241, Section 8.3.4.2";
789 if-feature "confirmed-commit";
791 "This operation is used to cancel an ongoing confirmed commit.
792 If the confirmed commit is persistent, the parameter
793 'persist-id' must be given, and it must match the value of the
794 'persist' parameter.";
795 reference "RFC 6241, Section 8.4.4.1";
800 "This parameter is given in order to cancel a persistent
801 confirmed commit. The value must be equal to the value
802 given in the 'persist' parameter to the <commit> operation.
803 If it does not match, the operation fails with an
804 'invalid-value' error.";
809 if-feature "validate";
811 "Validates the contents of the specified configuration.";
812 reference "RFC 6241, Section 8.6.4.1";
816 "Particular configuration to validate.";
817 choice config-source {
820 "The configuration source to validate.";
822 if-feature "candidate";
825 "The candidate configuration is the config source.";
830 "The running configuration is the config source.";
833 if-feature "startup";
836 "The startup configuration is the config source.";
842 "The URL-based configuration is the config source.";
846 "Inline Config content: <config> element. Represents
847 an entire configuration datastore, not
848 a subset of the running datastore.";