Internet-Draft Get Datastore Differences February 2022
Liu & Liu Expires 25 August 2022 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-liu-netconf-ext-obtain-ds-diff-00
Published:
Intended Status:
Standards Track
Expires:
Authors:
D. Liu, Ed.
Ericsson
R. Liu
Ericsson

NETCONF Extension for Datastore Differences

Abstract

This document defines a "datastore-diff" RPC that returns the differences between two datastores in an XML-based format.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 25 August 2022.

Table of Contents

1. Introduction

NETCONF defines how to obtain startup ([RFC6241], section 8.7), candidate ([RFC6241], section 8.3) and running datastores to provide the ability to check the validity of the configuration before committing ([RFC6241], section 8.3.4.1).

However, such an approach can be non-optimal because the increment of configuration change cannot be directly obtained so as to all configuration change checks need to be manually compared. Therefore, this method is not very efficient and error-prone in many cases. The consequence of configuration error directly affects the service even if the wrong configuration is corrected quickly, it is unacceptable.

This document defines how to directly retrieve the differences between datastores by adding "datastore-diff" RPC to improve NETCONF usability and serviceability.

2. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] [RFC8174].

3. Extend NETCONF operation

The newly defined "datastore-diff" RPC accept input parameters to indicate source and target datastore, as described in Section 3.2.

3.1. Model Tree Diagram

The following figure illustrates the "ietf-netconf-ds-diff" module tree diagram [RFC8340]:

module: ietf-netconf-ds-diff
rpcs:
   +---x datastore-diff
      +---w input
      |  +---w target
      |  |  +---w (config-target)
      |  |     +--:(candidate)
      |  |     |  +---w candidate?   empty
      |  |     +--:(running)
      |  |     |  +---w running?     empty
      |  |     +--:(startup)
      |  |        +---w startup?     empty
      |  +---w source
      |     +---w (config-source)
      |        +--:(candidate)
      |        |  +---w candidate?   empty
      |        +--:(running)
      |        |  +---w running?     empty
      |        +--:(startup)
      |           +---w startup?     empty
      +--ro output
         +--ro data
Figure 1: Model Tree Diagram

3.2. Parameters

/datastore-diff/target:

Name of the target datastore to be compared, can be either of startup, candidate and running.

/datastore-diff/source:

Name of the source datastore to be compared, can be either of startup, candidate and running.

Positive Response:

If the Network Element (NE) can satisfy the request, it sends an rpc-reply element containing a "data" element with the difference of requested datastores.

The compared output will use the XML-based data encoding for the differences, refer to Appendix A.

Negative Response:

An rpc-error element is included in the rpc-reply if the request cannot be completed for any reason.

4. Yang Model for Get Datastores Differences

The "ietf-netconf-ds-diff" module has normative references to [RFC6241], [RFC6243], [RFC6991], [RFC8342].

<CODE BEGINS> file "ietf-netconf-ds-diff.yang"


   module ietf-netconf-ds-diff {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-ds-diff";
     prefix dsdiff;

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

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

     description
       "This module defines 'datastore-diff' rpc to
       support obtaining datastore differences.

        Copyright (c) 2021 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
        (https://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX
        (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
        itself for full legal notices.

        The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
        'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
        'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
        are to be interpreted as described in BCP 14 (RFC 2119)
        (RFC 8174) when, and only when, they appear in all
        capitals, as shown here.";

     revision 2021-11-29 {
       description
         "Initial revision.";
       reference
         "RFC XXXX: NETCONF Extension to Support Obtaining
          Datastore Differences";
     }

     rpc datastore-diff {
       description
         "Get datastore differences.";

       input {
         container target {
           description
             "Target datastore to be compared.";

           choice config-target {
             mandatory true;
             description
              "The configuration target to compare the differences.";

             leaf candidate {
               type empty;
               description
                 "The candidate configuration is the target.";
             }
             leaf running {
               type empty;
               description
                 "The running configuration is the target.";
             }
             leaf startup {
               type empty;
               description
                 "The startup configuration is the target.";
             }
           }
         }

         container source {
           description
             "Source datastore to be compared.";

           choice config-source {
             mandatory true;
             description
              "The configuration source to compare the differences.";

             leaf candidate {
               type empty;
               description
                 "The candidate configuration is the source.";
             }
             leaf running {
               type empty;
               description
                 "The running configuration is the source.";
             }
             leaf startup {
               type empty;
               description
                 "The startup configuration is the source.";
             }
           }
         }
       }

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


<CODE ENDS>
Figure 2: YANG Model Definition

5. Security Considerations

This document extends the base operations for NETCONF [RFC6241] that are naturally protected by mandatory-to-implement secure transport Secure Shell (SSH) [RFC6242].

So there is no security problem or potential risk.

6. IANA Considerations

6.1. The "IETF XML" Registry

This document registers one URI in the "ns" subregistry of the IETF XML Registry [RFC3688] maintained at https://www.iana.org/assignments/xml-registry/xml-registry.xhtml#ns.

Following the format in [RFC3688] to request following registration:

URI: urn:ietf:params:xml:ns:yang:ietf-netconf-ds-diff

Registrant Contact: The IESG.

XML: N/A, the requested URI is an XML namespace.

6.2. The "YANG Module Names" Registry

This document registers one YANG module in the YANG Module Names registry [RFC6020] maintained at https://www.iana.org/assignments/yang-parameters/yang-parameters.xhtml.

Following the format defined in [RFC6020], the following registration is requested:

name: ietf-netconf-ds-diff

namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-ds-diff prefix: dsdiff RFC: XXXX

7. Acknowledgements

The authors would like to thank Scott Mansfield for his reviews and feedback.

8. References

8.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC3688]
Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, DOI 10.17487/RFC3688, , <https://www.rfc-editor.org/info/rfc3688>.
[RFC6020]
Bjorklund, M., Ed., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, , <https://www.rfc-editor.org/info/rfc6020>.
[RFC6241]
Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A. Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, , <https://www.rfc-editor.org/info/rfc6241>.
[RFC6242]
Wasserman, M., "Using the NETCONF Protocol over Secure Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, , <https://www.rfc-editor.org/info/rfc6242>.
[RFC6243]
Bierman, A. and B. Lengyel, "With-defaults Capability for NETCONF", RFC 6243, DOI 10.17487/RFC6243, , <https://www.rfc-editor.org/info/rfc6243>.
[RFC6991]
Schoenwaelder, J., Ed., "Common YANG Data Types", RFC 6991, DOI 10.17487/RFC6991, , <https://www.rfc-editor.org/info/rfc6991>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC8342]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., and R. Wilton, "Network Management Datastore Architecture (NMDA)", RFC 8342, DOI 10.17487/RFC8342, , <https://www.rfc-editor.org/info/rfc8342>.

8.2. Informative References

[RFC8340]
Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", BCP 215, RFC 8340, DOI 10.17487/RFC8340, , <https://www.rfc-editor.org/info/rfc8340>.

Appendix A. Appendix A. Examples

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
             message-id="49">
  <datastore-diff xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-ds-diff">
    <source>
      <candidate/>
    </source>
    <target>
      <running/>
    </target>
  </datastore-diff>
</rpc>
Figure 3: Query RPC Definition
    <rpc-reply message-id="49"
         xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
      <data>
        <interfaces xmlns="http://openconfig.net/yang/interfaces"
                 xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
          <interface nc:operation="create">
            <name>management</name>
            <config>
              <name>management</name>
              <type>ianaift:ethernetCsmacd</type>
              <mtu>1500</mtu>
              <enabled>true</enabled>
            </config>
            <ethernet>
              <config>
                <port-speed>SPEED_1GB</port-speed>
              </config>
            </ethernet>
          </interface>
        </interfaces>
      </data>
    </rpc-reply>
Figure 4: Reply Data

Authors' Addresses

Daiying Liu (editor)
Ericsson
Renwang Liu
Ericsson

mirror server hosted at Truenetwork, Russian Federation.