3 // the namespace for NETCONF XML definitions is unchanged
4 // from RFC 4741, which this document replaces
5 namespace "urn:ietf:params:xml:ns:netconf:base:1.0";
9 import ietf-inet-types {
13 import ietf-netconf-acm { prefix nacm; }
16 "IETF NETCONF (Network Configuration) Working Group";
19 "WG Web: <http://tools.ietf.org/wg/netconf/>
20 WG List: <netconf@ietf.org>
23 <bertietf@bwijnen.net>
25 WG Chair: Mehmet Ersue
26 <mehmet.ersue@nsn.com>
28 Editor: Martin Bjorklund
31 Editor: Juergen Schoenwaelder
32 <j.schoenwaelder@jacobs-university.de>
35 <andy.bierman@brocade.com>";
37 "NETCONF Protocol Data Types and Protocol Operations.
39 Copyright (c) 2011 IETF Trust and the persons identified as
40 the document authors. All rights reserved.
42 Redistribution and use in source and binary forms, with or
43 without modification, is permitted pursuant to, and subject
44 to the license terms contained in, the Simplified BSD License
45 set forth in Section 4.c of the IETF Trust's Legal Provisions
46 Relating to IETF Documents
47 (http://trustee.ietf.org/license-info).
49 This version of this YANG module is part of RFC 6241; see
50 the RFC itself for full legal notices.";
55 2013-09-29: Updated to include NACM attributes,
56 as specified in RFC 6536: sec 3.2.5 and 3.2.8";
58 "RFC 6241: Network Configuration Protocol";
61 extension get-filter-element-attributes {
63 "If this extension is present within an 'anyxml'
64 statement named 'filter', which must be conceptually
65 defined within the RPC input section for the <get>
66 and <get-config> protocol operations, then the
67 following unqualified XML attribute is supported
68 within the <filter> element, within a <get> or
69 <get-config> protocol operation:
71 type : optional attribute with allowed
72 value strings 'subtree' and 'xpath'.
73 If missing, the default value is 'subtree'.
75 If the 'xpath' feature is supported, then the
76 following unqualified XML attribute is
79 select: optional attribute containing a
80 string representing an XPath expression.
81 The 'type' attribute must be equal to 'xpath'
82 if this attribute is present.";
85 // NETCONF capabilities defined as features
86 feature writable-running {
88 "NETCONF :writable-running capability;
89 If the server advertises the :writable-running
90 capability for a session, then this feature must
91 also be enabled for that session. Otherwise,
92 this feature must not be enabled.";
93 reference "RFC 6241, Section 8.2";
98 "NETCONF :candidate capability;
99 If the server advertises the :candidate
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.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 reference "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.";
125 reference "RFC 6241, Section 8.5";
130 "NETCONF :validate:1.1 capability;
131 If the server advertises the :validate:1.1
132 capability for a session, then this feature must
133 also be enabled for that session. Otherwise,
134 this feature must not be enabled.";
135 reference "RFC 6241, Section 8.6";
140 "NETCONF :startup capability;
141 If the server advertises the :startup
142 capability for a session, then this feature must
143 also be enabled for that session. Otherwise,
144 this feature must not be enabled.";
145 reference "RFC 6241, Section 8.7";
150 "NETCONF :url capability;
151 If the server advertises the :url
152 capability for a session, then this feature must
153 also be enabled for that session. Otherwise,
154 this feature must not be enabled.";
155 reference "RFC 6241, Section 8.8";
160 "NETCONF :xpath capability;
161 If the server advertises the :xpath
162 capability for a session, then this feature must
163 also be enabled for that session. Otherwise,
164 this feature must not be enabled.";
165 reference "RFC 6241, Section 8.9";
168 // NETCONF Simple Types
170 typedef session-id-type {
175 "NETCONF Session Id";
178 typedef session-id-or-zero-type {
181 "NETCONF Session Id or Zero to indicate none";
183 typedef error-tag-type {
187 "The request requires a resource that
192 "The request specifies an unacceptable value for one
193 or more parameters.";
197 "The request or response (that would be generated) is
198 too large for the implementation to handle.";
200 enum missing-attribute {
202 "An expected attribute is missing.";
206 "An attribute value is not correct; e.g., wrong type,
207 out of range, pattern mismatch.";
209 enum unknown-attribute {
211 "An unexpected attribute is present.";
213 enum missing-element {
215 "An expected element is missing.";
219 "An element value is not correct; e.g., wrong type,
220 out of range, pattern mismatch.";
222 enum unknown-element {
224 "An unexpected element is present.";
226 enum unknown-namespace {
228 "An unexpected namespace is present.";
232 "Access to the requested protocol operation or
233 data model is denied because authorization failed.";
237 "Access to the requested lock is denied because the
238 lock is currently held by another entity.";
240 enum resource-denied {
242 "Request could not be completed because of
243 insufficient resources.";
245 enum rollback-failed {
247 "Request to roll back some configuration change (via
248 rollback-on-error or <discard-changes> operations)
249 was not completed for some reason.";
254 "Request could not be completed because the relevant
255 data model content already exists. For example,
256 a 'create' operation was attempted on data that
261 "Request could not be completed because the relevant
262 data model content does not exist. For example,
263 a 'delete' operation was attempted on
264 data that does not exist.";
266 enum operation-not-supported {
268 "Request could not be completed because the requested
269 operation is not supported by this implementation.";
271 enum operation-failed {
273 "Request could not be completed because the requested
274 operation failed for some reason not covered by
275 any other error condition.";
277 enum partial-operation {
279 "This error-tag is obsolete, and SHOULD NOT be sent
280 by servers conforming to this document.";
282 enum malformed-message {
284 "A message could not be handled because it failed to
285 be parsed correctly. For example, the message is not
286 well-formed XML or it uses an invalid character set.";
289 description "NETCONF Error Tag";
290 reference "RFC 6241, Appendix A";
293 typedef error-severity-type {
296 description "Error severity";
299 description "Warning severity";
302 description "NETCONF Error Severity";
303 reference "RFC 6241, Section 4.3";
306 typedef edit-operation-type {
310 "The configuration data identified by the
311 element containing this attribute is merged
312 with the configuration at the corresponding
313 level in the configuration datastore identified
314 by the target parameter.";
318 "The configuration data identified by the element
319 containing this attribute replaces any related
320 configuration in the configuration datastore
321 identified by the target parameter. If no such
322 configuration data exists in the configuration
323 datastore, it is created. Unlike a
324 <copy-config> operation, which replaces the
325 entire target configuration, only the configuration
326 actually present in the config parameter is affected.";
330 "The configuration data identified by the element
331 containing this attribute is added to the
332 configuration if and only if the configuration
333 data does not already exist in the configuration
334 datastore. If the configuration data exists, an
335 <rpc-error> element is returned with an
336 <error-tag> value of 'data-exists'.";
340 "The configuration data identified by the element
341 containing this attribute is deleted from the
342 configuration if and only if the configuration
343 data currently exists in the configuration
344 datastore. If the configuration data does not
345 exist, an <rpc-error> element is returned with
346 an <error-tag> value of 'data-missing'.";
350 "The configuration data identified by the element
351 containing this attribute is deleted from the
352 configuration if the configuration
353 data currently exists in the configuration
354 datastore. If the configuration data does not
355 exist, the 'remove' operation is silently ignored
360 description "NETCONF 'operation' attribute values";
361 reference "RFC 6241, Section 7.2";
364 // NETCONF Standard Protocol Operations
368 "Retrieve all or part of a specified configuration.";
370 reference "RFC 6241, Section 7.1";
375 "Particular configuration to retrieve.";
377 choice config-source {
380 "The configuration to retrieve.";
382 if-feature candidate;
385 "The candidate configuration is the config source.";
390 "The running configuration is the config source.";
396 "The startup configuration is the config source.
397 This is optional-to-implement on the server because
398 not all servers will support filtering for this
406 "Subtree or XPath filter to use.";
407 nc:get-filter-element-attributes;
414 "Copy of the source datastore subset that matched
415 the filter criteria (if any). An empty data container
416 indicates that the request did not produce any results.";
423 "The <edit-config> operation loads all or part of a specified
424 configuration to the specified target configuration.";
426 reference "RFC 6241, Section 7.2";
431 "Particular configuration to edit.";
433 choice config-target {
436 "The configuration target.";
439 if-feature candidate;
442 "The candidate configuration is the config target.";
445 if-feature writable-running;
448 "The running configuration is the config source.";
453 leaf default-operation {
457 "The default operation is merge.";
461 "The default operation is replace.";
465 "There is no default operation.";
470 "The default operation to use.";
478 "The server will test and then set if no errors.";
482 "The server will set without a test first.";
487 "The server will only test and not set, even
488 if there are no errors.";
491 default "test-then-set";
493 "The test option to use.";
500 "The server will stop on errors.";
502 enum continue-on-error {
504 "The server may continue on errors.";
506 enum rollback-on-error {
508 "The server will roll back on errors.
509 This value can only be used if the 'rollback-on-error'
510 feature is supported.";
513 default "stop-on-error";
515 "The error option to use.";
518 choice edit-content {
521 "The content for the edit operation.";
525 "Inline Config content.";
531 "URL-based config content.";
539 "Create or replace an entire configuration datastore with the
540 contents of another complete configuration datastore.";
542 reference "RFC 6241, Section 7.3";
547 "Particular configuration to copy to.";
549 choice config-target {
552 "The configuration target of the copy operation.";
555 if-feature candidate;
558 "The candidate configuration is the config target.";
561 if-feature writable-running;
564 "The running configuration is the config target.
565 This is optional-to-implement on the server.";
571 "The startup configuration is the config target.";
577 "The URL-based configuration is the config target.";
584 "Particular configuration to copy from.";
586 choice config-source {
589 "The configuration source for the copy operation.";
592 if-feature candidate;
595 "The candidate configuration is the config source.";
600 "The running configuration is the config source.";
606 "The startup configuration is the config source.";
612 "The URL-based configuration is the config source.";
616 "Inline Config content: <config> element. Represents
617 an entire configuration datastore, not
618 a subset of the running datastore.";
626 nacm:default-deny-all;
628 "Delete a configuration datastore.";
630 reference "RFC 6241, Section 7.4";
635 "Particular configuration to delete.";
637 choice config-target {
640 "The configuration target to delete.";
646 "The startup configuration is the config target.";
652 "The URL-based configuration is the config target.";
661 "The lock operation allows the client to lock the configuration
662 system of a device.";
664 reference "RFC 6241, Section 7.5";
669 "Particular configuration to lock.";
671 choice config-target {
674 "The configuration target to lock.";
677 if-feature candidate;
680 "The candidate configuration is the config target.";
685 "The running configuration is the config target.";
691 "The startup configuration is the config target.";
700 "The unlock operation is used to release a configuration lock,
701 previously obtained with the 'lock' operation.";
703 reference "RFC 6241, Section 7.6";
708 "Particular configuration to unlock.";
710 choice config-target {
713 "The configuration target to unlock.";
716 if-feature candidate;
719 "The candidate configuration is the config target.";
724 "The running configuration is the config target.";
730 "The startup configuration is the config target.";
739 "Retrieve running configuration and device state information.";
741 reference "RFC 6241, Section 7.7";
746 "This parameter specifies the portion of the system
747 configuration and state data to retrieve.";
748 nc:get-filter-element-attributes;
755 "Copy of the running datastore subset and/or state
756 data that matched the filter criteria (if any).
757 An empty data container indicates that the request did not
758 produce any results.";
765 "Request graceful termination of a NETCONF session.";
767 reference "RFC 6241, Section 7.8";
771 nacm:default-deny-all;
773 "Force the termination of a NETCONF session.";
775 reference "RFC 6241, Section 7.9";
779 type session-id-type;
782 "Particular session to kill.";
788 if-feature candidate;
791 "Commit the candidate configuration as the device's new
792 current configuration.";
794 reference "RFC 6241, Section 8.3.4.1";
798 if-feature confirmed-commit;
801 "Requests a confirmed commit.";
802 reference "RFC 6241, Section 8.3.4.1";
805 leaf confirm-timeout {
806 if-feature confirmed-commit;
811 default "600"; // 10 minutes
813 "The timeout interval for a confirmed commit.";
814 reference "RFC 6241, Section 8.3.4.1";
818 if-feature confirmed-commit;
821 "This parameter is used to make a confirmed commit
822 persistent. A persistent confirmed commit is not aborted
823 if the NETCONF session terminates. The only way to abort
824 a persistent confirmed commit is to let the timer expire,
825 or to use the <cancel-commit> operation.
827 The value of this parameter is a token that must be given
828 in the 'persist-id' parameter of <commit> or
829 <cancel-commit> operations in order to confirm or cancel
830 the persistent confirmed commit.
832 The token should be a random string.";
833 reference "RFC 6241, Section 8.3.4.1";
837 if-feature confirmed-commit;
840 "This parameter is given in order to commit a persistent
841 confirmed commit. The value must be equal to the value
842 given in the 'persist' parameter to the <commit> operation.
843 If it does not match, the operation fails with an
844 'invalid-value' error.";
845 reference "RFC 6241, Section 8.3.4.1";
851 rpc discard-changes {
852 if-feature candidate;
855 "Revert the candidate configuration to the current
856 running configuration.";
857 reference "RFC 6241, Section 8.3.4.2";
861 if-feature confirmed-commit;
863 "This operation is used to cancel an ongoing confirmed commit.
864 If the confirmed commit is persistent, the parameter
865 'persist-id' must be given, and it must match the value of the
866 'persist' parameter.";
867 reference "RFC 6241, Section 8.4.4.1";
873 "This parameter is given in order to cancel a persistent
874 confirmed commit. The value must be equal to the value
875 given in the 'persist' parameter to the <commit> operation.
876 If it does not match, the operation fails with an
877 'invalid-value' error.";
886 "Validates the contents of the specified configuration.";
888 reference "RFC 6241, Section 8.6.4.1";
893 "Particular configuration to validate.";
895 choice config-source {
898 "The configuration source to validate.";
901 if-feature candidate;
904 "The candidate configuration is the config source.";
909 "The running configuration is the config source.";
915 "The startup configuration is the config source.";
921 "The URL-based configuration is the config source.";
925 "Inline Config content: <config> element. Represents
926 an entire configuration datastore, not
927 a subset of the running datastore.";