netconfcentral logo

ietf-netconf-ex@2014-04-21



  module ietf-netconf-ex {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-netconf-ex";

    prefix ncex;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-netconf {
      prefix nc;
    }
    import ietf-netconf-notifications {
      prefix ncn;
    }
    import ietf-netconf-with-defaults {
      prefix ncwd;
    }
    import ietf-yang-patch {
      prefix yp;
    }
    import ietf-yang-types {
      prefix yang;
    }

    organization
      "IETF NETCONF (Network Configuration Protocol) Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/netconf/>
     WG List:  <mailto:netconf@ietf.org>

     WG Chair: Mehmet Ersue
               <mailto:mehmet.ersue@nsn.com>

     WG Chair: Bert Wijnen
               <mailto:bertietf@bwijnen.net>

     Editor:   Andy Bierman
               <mailto:andy@yumaworks.com>";

    description
      "This module contains a collection of YANG definitions for the
     efficient operation of a NETCONF server. Protocol operations
     are defined to reduce network usage and transaction complexity.

     Copyright (c) 2014 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

    revision "2014-04-21" {
      description
        "Initial revision. <get2> operation originally published
       in draft-bierman-netconf-get2-03.txt";
      reference
        "RFC XXXX: NETCONF Efficiency Extensions";

    }


    feature timestamps {
      description
        "This feature indicates that the server implements
       the <get2> operations parameters which require
       last modification timestamps to be maintained by
       the server.

       If this feature is advertised then one global
       'last-modified' timestamp for the entire
       running configuration datastore MUST be supported.

       The server MAY support additional timestamps
       for additional datastores and data nodes
       within a datastore.  The 'with-metadata'
       parameter can be used to identify
       which data nodes support a 'last-modified'
       timestamp.";
    }

    feature with-defaults {
      description
        "This feature indicates that the server supports the
       'with-defaults' parameter for the <get2> operation.
       A NETCONF server SHOULD support this feature.";
      reference
        "RFC 6243: With-defaults Capability for NETCONF";

    }

    feature confirmed-edit {
      description
        "This feature indicates that the server supports the
       confirmed commit procedure for the <edit2> protocol
       operation.";
    }

    identity metadata {
      base 
      description
        "Base for all metadata identifiers used by the
       'with-metadata' parameter in the <get2> operation.";
    }

    identity timestamps {
      base metadata;
      description
        "Describes metadata identifying the last modification
        time of the associated datastore or data resource.";
    }

    identity etags {
      base metadata;
      description
        "Describes metadata identifying the entity tag value
        of the associated datastore or data resource.";
    }

    identity config-id {
      base metadata;
      description
        "Describes metadata identifying the config ID
        of the associated datastore or data resource.";
    }

    typedef yang-entity-tag {
      type string;
      description
        "Contains an opaque string representing a specific instance
       of a datastore or data resource. A client can use this
       string for equality comparisons between yang-entity-tag
       values.

       If any configuration data node values changes, or the
       relative order of any user-ordered data changes, then
       the server MUST change the entity tag value for the
       running datastore to a different value.  If the server
       maintains entity-tag values for configuration data nodes,
       then the server MUST change the yang-entity-tag value for
       any affected data node.

       Only yang-entity-tag values for the same target resource
       instance can be compared. Only the 'strong entity tag'
       form is required.  A server MAY support the 'weak
       entity tag' form.  If so, then 2 YANG data node resource
       instances are considered to be equivalent if they
       contain the same value subtrees and all user-ordered
       data nodes share the same relative order.";
      reference
        "RFC 2616, section 3.11.";

    }

    rpc get2 {
      description
        "Retrieve NETCONF datastore information";
      input {
        container source {
          description
            "The datastore (or non-configuration data)
           to use for the source for the retrieval operation.";
          choice datastore-source {
            default 'running';
            description
              "The configuration source for the retrieval operation.
             The running configuration is the default choice if
             this parameter is not present.";
            leaf candidate {
              if-feature nc:candidate;
              type empty;
              description
                "The candidate configuration datastore is the
               retrieval source.";
            }
            leaf running {
              type empty;
              description
                "The running configuration datastore is the
               retrieval source.";
            }
            leaf startup {
              if-feature nc:startup;
              type empty;
              description
                "The startup configuration datastore is the
               retrieval source.";
            }
            leaf url {
              if-feature nc:url;
              type inet:uri;
              description
                "The URL-based configuration is the
               retrieval source.";
            }
            leaf operational {
              type empty;
              description
                "The retrieval source is the collection of all
              operational (non-configuration) data nodes supported
              by the server.

              Any ancestor container and/or list and list key nodes
              are also returned. No other leafs or leaf-lists will
              be included in the reply.

              The server MAY return ancestor container, and/or list
              and list key nodes that do not contain any
              non-configuration nodes. This can occur for several
              reasons, e.g., the implementation streams replies
              and cannot defer instrumentation or access control
              filtering of descendant data nodes.";
            }
          }  // choice datastore-source
        }  // container source

        choice filter-spec {
          description
            "The content filter specification for this request";
          anyxml subtree-filter {
            description
              "This parameter identifies the portions of the
             target datastore to retrieve.";
            reference
              "RFC 6241, Section 6.";

          }
          leaf xpath-filter {
            if-feature nc:xpath;
            type yang:xpath1.0;
            description
              "This parameter contains an XPath expression
             identifying the portions of the target
             datastore to retrieve.";
          }
        }  // choice filter-spec

        leaf keys-only {
          type empty;
          description
            "This parameter selects only data nodes which
           are key leaf nodes.  Parent container and
           list nodes are also returned, but no other leafs,
           or any leaf-lists will be included in the reply.";
        }

        leaf if-modified-since {
          if-feature timestamps;
          type yang:date-and-time;
          description
            "This parameter selects the target datastore
           only if the last-modified timestamp for the
           datastore is more recent than the specified time.
           If not, then an empty <data> element is returned.

           If the target datastore does not maintain a
           last-modified timestamp, then this parameter is
           ignored.";
        }

        leaf full-delta {
          if-feature timestamps;
          type empty;
          description
            "This parameter selects only data nodes which
           have been modified since the specified time.
           It is ignored unless the 'if-modified-since'
           parameter is also provided and the target datastore
           supports a last-modified timestamp.";
        }

        leaf depth {
          type uint32;
          default '0';
          description
            "This parameter selects how many conceptual
           sub-tree levels should be returned in the
           <rpc-reply>.

           If this parameter is equal to '0', then entire
           subtrees will be returned.

           If this parameter is greater than '0', then
           only the specified number of subtree levels will
           be returned.";
        }

        leaf with-defaults {
          type with-defaults-mode;
          description
            "The explicit defaults processing mode requested.";
          reference
            "RFC 6243; Section 4.5.1";

        }

        leaf-list with-metadata {
          type identityref {
            base metadata;
          }
          description
            "This parameter will cause the server to return
           metadata in the <rpc-reply> (e.g. as XML attributes
           in XML encoding) associated with the specified
           metadata identity. If the server does not support
           any specified metadata identifier, then the
           operation fails with an 'invalid-value' error.";
        }

        leaf with-locking {
          type empty;
          description
            "If this parameter is present then the request MUST be
performed with exclusive write access to all datastores
involved in the operation.  An 'operation-not-supported'
error-tag value is returned if the target datastore for
the operation does not support locking (e.g., 'url' or
'operational').

If the server cannot provide exclusive write access
for the entire requested operation then an 'in-use'
error-tag value is returned.

If the 'max-lock-wait' parameter is also present then
the server MAY choose to wait up to that amount of
time attempting to obtain exclusive write access,
before returning an error.";
        }

        leaf max-lock-wait {
          when "../with-locking" {
            description
              "Only relevant if locking is requested.";
          }
          type uint32 {
            range "1 .. 600";
          }
          units "seconds";
          description
            "If this parameter is present and the 'with-locking'
parameter is also present, then the server MAY wait
up to the specified number of seconds attempting
to obtain exclusive write access for the requested
operation.";
        }
      }

      output {
        anyxml data {
          description
            "Copy of the requested datastore subset which
           matched the filter criteria (if any).
           An empty data container indicates that the
           request did not produce any results.";
        }
      }
    }  // rpc get2

    rpc edit2 {
      description
        "Edit NETCONF datastore contents.
       All operations requested in the yang-patch edit list
       are applied, or the target datastore is left unchanged.";
      input {
        container target {
          description
            "The datastore to use as the target for this
           edit operation.";
          choice datastore-target {
            mandatory true;
            description
              "The configuration target for the edit operation.";
            leaf candidate {
              if-feature nc:candidate;
              type empty;
              description
                "The candidate configuration datastore is the
               edit target.";
            }
            leaf running {
              if-feature nc:writable-running;
              type empty;
              description
                "The running configuration datastore is the
               edit target.";
            }
          }  // choice datastore-target
        }  // container target

        leaf target-resource {
          if-feature nc:xpath;
          type yang:xpath1.0;
          description
            "This parameter identifies 1 or more data node
           instances for which the yang-patch edits
           will be applied. The target-resource expression
           MUST evaluate to a node-set result.

           Each operation in the yang-patch edit list will
           be applied to each target-resource instance, as if
           it were the document root for the operation.

           If multiple instances are represented by the
           target-resource value, then the server will apply
           all edits to all instances.  If any errors occur,
           then all edits from this request will be undone
           from the target datastore.

           The user MUST have appropriate write permissions for
           all data accessed by every operation within the edit
           list.

           If this parameter is not present or not supported
           then the target resource is the root node of the
           datastore identified by the 'target' parameter.";
        }

        container yang-patch {
          description
            "Represents a conceptual sequence of datastore edits,
called a patch. Each patch is given a client-assigned
patch identifier. Each edit MUST be applied
in ascending order, and all edits MUST be applied.
If any errors occur, then the target datastore MUST NOT
be changed by the YANG Patch operation.

It is possible for a datastore constraint violation to occur
due to any node in the datastore, including nodes not
included in the 'edit' list.  Any validation errors MUST
be reported in the reply message.";
          reference
            "RFC 7950, Section 8.3.";

          leaf patch-id {
            type string;
            mandatory true;
            description
              "An arbitrary string provided by the client to identify
the entire patch.  Error messages returned by the server
that pertain to this patch will be identified by this
'patch-id' value.  A client SHOULD attempt to generate
unique 'patch-id' values to distinguish between
transactions from multiple clients in any audit logs
maintained by the server.";
          }

          leaf comment {
            type string;
            description
              "An arbitrary string provided by the client to describe
the entire patch.  This value SHOULD be present in any
audit logging records generated by the server for the
patch.";
          }

          list edit {
            key "edit-id";
            ordered-by user;
            description
              "Represents one edit within the YANG Patch request message.
The 'edit' list is applied in the following manner:

  - The first edit is conceptually applied to a copy
    of the existing target datastore, e.g., the
    running configuration datastore.
  - Each ascending edit is conceptually applied to
    the result of the previous edit(s).
  - After all edits have been successfully processed,
    the result is validated according to YANG constraints.
  - If successful, the server will attempt to apply
    the result to the target datastore.";
            leaf edit-id {
              type string;
              description
                "Arbitrary string index for the edit.
Error messages returned by the server pertaining
to a specific edit will be identified by this value.";
            }

            leaf operation {
              type enumeration {
                enum "create" {
                  value 0;
                  description
                    "The target data node is created using the supplied
value, only if it does not already exist.  The
'target' leaf identifies the data node to be
created, not the parent data node.";
                }
                enum "delete" {
                  value 1;
                  description
                    "Delete the target node, only if the data resource
currently exists; otherwise, return an error.";
                }
                enum "insert" {
                  value 2;
                  description
                    "Insert the supplied value into a user-ordered
list or leaf-list entry. The target node must
represent a new data resource. If the 'where'
parameter is set to 'before' or 'after', then
the 'point' parameter identifies the insertion
point for the target node.";
                }
                enum "merge" {
                  value 3;
                  description
                    "The supplied value is merged with the target data
node.";
                }
                enum "move" {
                  value 4;
                  description
                    "Move the target node. Reorder a user-ordered
list or leaf-list. The target node must represent
an existing data resource. If the 'where' parameter
is set to 'before' or 'after', then the 'point'
parameter identifies the insertion point to move
the target node.";
                }
                enum "replace" {
                  value 5;
                  description
                    "The supplied value is used to replace the target
data node.";
                }
                enum "remove" {
                  value 6;
                  description
                    "Delete the target node if it currently exists.";
                }
              }
              mandatory true;
              description
                "The datastore operation requested for the associated
'edit' entry";
            }

            leaf target {
              type target-resource-offset;
              mandatory true;
              description
                "Identifies the target data node for the edit
operation. If the target has the value '/', then
the target data node is the target resource.
The target node MUST identify a data resource,
not the datastore resource.";
            }

            leaf point {
              when
                "(../operation = 'insert' or ../operation = 'move') and (../where = 'before' or ../where = 'after')" {
                description
                  "Point leaf only applies for 'insert' or 'move'
operations, before or after an existing entry.";
              }
              type target-resource-offset;
              description
                "The absolute URL path for the data node that is being
used as the insertion point or move point for the
target of this 'edit' entry.";
            }

            leaf where {
              when
                "../operation = 'insert' or ../operation = 'move'" {
                description
                  "Where leaf only applies for insert or move
operations.";
              }
              type enumeration {
                enum "before" {
                  value 0;
                  description
                    "Insert or move a data node before the data resource
identified by the 'point' parameter.";
                }
                enum "after" {
                  value 1;
                  description
                    "Insert or move a data node after the data resource
identified by the 'point' parameter.";
                }
                enum "first" {
                  value 2;
                  description
                    "Insert or move a data node so it becomes ordered
as the first entry.";
                }
                enum "last" {
                  value 3;
                  description
                    "Insert or move a data node so it becomes ordered
as the last entry.";
                }
              }
              default "last";
              description
                "Identifies where a data resource will be inserted
or moved.  YANG only allows these operations for
list and leaf-list data nodes that are
'ordered-by user'.";
            }

            anydata value {
              when
                "../operation = 'create' or ../operation = 'merge' or ../operation = 'replace' or ../operation = 'insert'" {
                description
                  "The anydata 'value' is only used for 'create',
'merge', 'replace', and 'insert' operations.";
              }
              description
                "Value used for this edit operation.  The anydata 'value'
contains the target resource associated with the
'target' leaf.

For example, suppose the target node is a YANG container
named foo:

   container foo {
     leaf a { type string; }
     leaf b { type int32; }
   }

The 'value' node contains one instance of foo:

   <value>
     <foo xmlns='example-foo-namespace'>
       <a>some value</a>
       <b>42</b>
     </foo>
   </value>
 ";
            }
          }  // list edit
        }  // container yang-patch

        leaf test-only {
          type empty;
          description
            "If this parameter is present the server will not
           actually perform the requested edits. Instead the
           edit request will be validated as if it were going
           to be applied.  Any parameter errors or datastore
           validation errors SHOULD be reported in the response.

           No attempt to apply, activate the edits or save them
           in non-volatile storage will be made if this parameter
           is present.";
        }

        leaf if-match {
          type yang-entity-tag;
          description
            "If this parameter is set, then the entire edit request
           will be rejected unless the entity tag for the target
           resource matches this value. An rpc-error with
           an 'operation-failed' error-tag value MUST returned,
           and the edit operation MUST NOT be attempted.
           The 'error-app-tag' field SHOULD be set to
           'precondition-failed'.

           If the target datastore does not maintain a
           last-modified timestamp, then this parameter is
           ignored.";
        }

        leaf with-locking {
          type empty;
          description
            "If this parameter is present then the request MUST be
performed with exclusive write access to all datastores
involved in the operation.  An 'operation-not-supported'
error-tag value is returned if the target datastore for
the operation does not support locking (e.g., 'url' or
'operational').

If the server cannot provide exclusive write access
for the entire requested operation then an 'in-use'
error-tag value is returned.

If the 'max-lock-wait' parameter is also present then
the server MAY choose to wait up to that amount of
time attempting to obtain exclusive write access,
before returning an error.";
        }

        leaf max-lock-wait {
          when "../with-locking" {
            description
              "Only relevant if locking is requested.";
          }
          type uint32 {
            range "1 .. 600";
          }
          units "seconds";
          description
            "If this parameter is present and the 'with-locking'
parameter is also present, then the server MAY wait
up to the specified number of seconds attempting
to obtain exclusive write access for the requested
operation.";
        }

        leaf activate-now {
          type empty;
          description
            "If present and the edit operation succeeds,
           then the server will activate the configuration
           changes right away. The server will conceptually
           perform a <commit> operation after the edit
           operation. The user MUST have execute
           permission for the <commit> operation or
           the operation fails with an 'access-denied' error.

           This parameter has no affect unless the
           'datasource-target' choice is the 'candidate' leaf.";
        }

        leaf nvstore-now {
          type empty;
          description
            "If present and the edit operation succeeds,
           and the configuration changes are activated
           in the running datastore, then the server
           will persist the configuration changes right away
           in non-volatile store. The server will conceptually
           perform a <copy-config> operation from the running
           to the startup datastore. The user MUST have execute
           permission for the <copy-config> operation or
           the operation fails with an 'access-denied' error.

           This parameter has no affect unless the
           'startup' capability is supported by the server.";
        }

        leaf confirmed {
          if-feature confirmed-edit;
          type empty;
          description
            "If the requested edit operation succeeds and the
           configuration changes are applied to the running
           datastore, then a confirmed commit procedure is
           requested by the client.

           A confirmed commit procedure is an <edit2> operation
           that contains this parameter.  The <complete-commit>
           operation is used to complete the confirmed commit
           procedure. The <revert-commit> operation is used
           to cancel the confirmed commit procedure and
           revert the running datastore back to the contents
           before the first confirmed commit operation.

           If no <complete-commit> or <revert-commit> operation
           is invoked within the timeout interval then
           the server will revert the running datastore
           back to the contents before the first confirmed
           edit operation.

           This is the same as the confirmed commit procedure
           in RFC 6241 except the candidate capability is
           not required.

           The server will save the running datastore contents
           before the edit operation is activated, if there
           is no confirmed edit already in progress.

           If the 'with-locking' parameter is present then
           the server will maintain exclusive write access
           for the specified session until the confirmed
           edit procedure is completed somehow.";
          reference
            "RFC 6241, Section 8.3.4.1";

        }

        leaf confirm-timeout {
          when "../confirmed" {
            description
              "Only relevant if the <confirmed>parameter is present";
          }
          if-feature confirmed-edit;
          type uint32 {
            range "1..max";
          }
          units "seconds";
          default "600";
          description
            "The timeout interval for a confirmed edit procedure.
           If exclusive write access was granted for this confirmed
           commit procedure, then it is removed if the timeout
           occurs and the confirmed commit procedure is terminated.";
          reference
            "RFC 6241, Section 8.3.4.1";

        }

        leaf persist {
          if-feature confirmed-edit;
          type string;
          description
            "This parameter is used to make a confirmed commit
           procedure persistent.  A persistent confirmed commit
           is not aborted if the NETCONF session terminates.
           The only way to abort a persistent confirmed commit
           is to let the timer expire,  or to use the
           <revert-commit> operation.

           The value of this parameter is a token that MUST be
           given in the 'persist-id' parameter of the <edit2>,
           <complete-commit>, or <revert-commit> operations in
           order to extend, confirm, or cancel the persistent
           confirmed commit procedure.

           The token SHOULD be a random string.";
          reference
            "RFC 6241, Section 8.3.4.1";

        }

        leaf persist-id {
          if-feature confirmed-edit;
          type string;
          description
            "This parameter is given in order to extend a persistent
           confirmed edit.  The value must be equal to the value
           given in the 'persist' parameter to the <commit>
           operation. If it does not match, the operation fails
           with an 'invalid-value' error.";
          reference
            "RFC 6241, Section 8.3.4.1";

        }
      }

      output {
        container yang-patch-status {
          description
            "A container representing the response message sent by the
server after a YANG Patch edit request message has been
processed.";
          leaf patch-id {
            type string;
            mandatory true;
            description
              "The 'patch-id' value used in the request.";
          }

          choice global-status {
            description
              "Report global errors or complete success.
If there is no case selected then errors
are reported in the 'edit-status' container.";
            case global-errors {
              description
                "This container will be present if global errors that
are unrelated to a specific edit occurred.";
              container errors {
                description
                  "Represents an error report returned by the server if
a request results in an error.";
                list error {
                  description
                    "An entry containing information about one
specific error that occurred while processing
a RESTCONF request.";
                  reference
                    "RFC 6241, Section 4.3";

                  leaf error-type {
                    type enumeration {
                      enum "transport" {
                        value 0;
                        description
                          "The transport layer";
                      }
                      enum "rpc" {
                        value 1;
                        description
                          "The rpc or notification layer";
                      }
                      enum "protocol" {
                        value 2;
                        description
                          "The protocol operation layer";
                      }
                      enum "application" {
                        value 3;
                        description
                          "The server application layer";
                      }
                    }
                    mandatory true;
                    description
                      "The protocol layer where the error occurred.";
                  }

                  leaf error-tag {
                    type string;
                    mandatory true;
                    description
                      "The enumerated error tag.";
                  }

                  leaf error-app-tag {
                    type string;
                    description
                      "The application-specific error tag.";
                  }

                  leaf error-path {
                    type instance-identifier;
                    description
                      "The YANG instance identifier associated
with the error node.";
                  }

                  leaf error-message {
                    type string;
                    description
                      "A message describing the error.";
                  }

                  anyxml error-info {
                    description
                      "This anyxml value MUST represent a container with
zero or more data nodes representing additional
error information.";
                  }
                }  // list error
              }  // container errors
            }  // case global-errors
            leaf ok {
              type empty;
              description
                "This leaf will be present if the request succeeded
and there are no errors reported in the 'edit-status'
container.";
            }
          }  // choice global-status

          container edit-status {
            description
              "This container will be present if there are
edit-specific status responses to report.
If all edits succeeded and the 'global-status'
returned  is 'ok', then a server MAY omit this
container";
            list edit {
              key "edit-id";
              description
                "Represents a list of status responses,
corresponding to edits in the YANG Patch
request message.  If an edit entry was
skipped or not reached by the server,
then this list will not contain a corresponding
entry for that edit.";
              leaf edit-id {
                type string;
                description
                  "Response status is for the 'edit' list entry
with this 'edit-id' value.";
              }

              choice edit-status-choice {
                description
                  "A choice between different types of status
responses for each edit entry.";
                leaf ok {
                  type empty;
                  description
                    "This 'edit' entry was invoked without any
errors detected by the server associated
with this edit.";
                }

                case errors {
                  description
                    "The server detected errors associated with the
edit identified by the same 'edit-id' value.";
                  container errors {
                    description
                      "Represents an error report returned by the server if
a request results in an error.";
                    list error {
                      description
                        "An entry containing information about one
specific error that occurred while processing
a RESTCONF request.";
                      reference
                        "RFC 6241, Section 4.3";

                      leaf error-type {
                        type enumeration {
                          enum "transport" {
                            value 0;
                            description
                              "The transport layer";
                          }
                          enum "rpc" {
                            value 1;
                            description
                              "The rpc or notification layer";
                          }
                          enum "protocol" {
                            value 2;
                            description
                              "The protocol operation layer";
                          }
                          enum "application" {
                            value 3;
                            description
                              "The server application layer";
                          }
                        }
                        mandatory true;
                        description
                          "The protocol layer where the error occurred.";
                      }

                      leaf error-tag {
                        type string;
                        mandatory true;
                        description
                          "The enumerated error tag.";
                      }

                      leaf error-app-tag {
                        type string;
                        description
                          "The application-specific error tag.";
                      }

                      leaf error-path {
                        type instance-identifier;
                        description
                          "The YANG instance identifier associated
with the error node.";
                      }

                      leaf error-message {
                        type string;
                        description
                          "A message describing the error.";
                      }

                      anyxml error-info {
                        description
                          "This anyxml value MUST represent a container with
zero or more data nodes representing additional
error information.";
                      }
                    }  // list error
                  }  // container errors
                }  // case errors
              }  // choice edit-status-choice
            }  // list edit
          }  // container edit-status
        }  // container yang-patch-status
      }
    }  // rpc edit2

    rpc complete-commit {
      if-feature confirmed-edit;
      description
        "This operation is used to complete an ongoing confirmed
       commit procedure. If exclusive write access was granted
       for this confirmed commit procedure, then it is removed
       if this operation is successfully completed.

       If the confirmed commit is persistent, the parameter
       'persist-id' MUST be given, and it MUST match the value of
       the 'persist' parameter given in the <edit2> operation.
       If not confirmed commit procedure is in progress then
       the operation fails with an 'operation-failed' error.";
      reference
        "RFC 6241, Section 8.4.5.1";

      input {
        leaf persist-id {
          type string;
          description
            "This parameter is given in order to complete a
           persistent confirmed commit procedure. The
           value MUST be equal to the value given in the
           'persist' parameter to the <edit2>  operation.
           If it does not match, the operation fails with
           an 'invalid-value' error.";
        }
      }
    }  // rpc complete-commit

    rpc revert-commit {
      if-feature confirmed-edit;
      description
        "This operation is used to cancel an ongoing confirmed commit.
       If exclusive write access was granted for this confirmed
       commit procedure, then it is removed if this operation
       is successfully completed.

       If the confirmed commit is persistent, the parameter
       'persist-id' MUST be given, and it MUST match the value of
       the 'persist' parameter.  If not confirmed commit
       procedure is in progress then the operation fails
       with an 'operation-failed' error.";
      reference
        "RFC 6241, Section 8.4.4.1";

      input {
        leaf persist-id {
          type string;
          description
            "This parameter is given in order to cancel a persistent
           confirmed commit and revert the running configuration
           datastore to its state before the confirmed commit
           procedure started.  The value MUST be equal to the value
           given in the 'persist' parameter to the <edit2>
           operation.

           If it does not match, the operation fails with an
          'invalid-value' error.";
        }
      }
    }  // rpc revert-commit
  }  // module ietf-netconf-ex