Skip to main content

Factory default Setting
draft-wu-netmod-factory-default-01

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Replaced".
Authors Qin Wu , Balázs Lengyel , Ye Niu
Last updated 2018-10-19 (Latest revision 2018-10-18)
Replaced by draft-ietf-netmod-factory-default, draft-ietf-netmod-factory-default, RFC 8808
RFC stream (None)
Formats
Additional resources
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-wu-netmod-factory-default-01
NETMOD Working Group                                               Q. Wu
Internet-Draft                                                    Huawei
Intended status: Standards Track                              B. Lengyel
Expires: April 22, 2019                                 Ericsson Hungary
                                                                  Y. Niu
                                                                  Huawei
                                                        October 19, 2018

                        Factory default Setting
                   draft-wu-netmod-factory-default-01

Abstract

   This document defines a method to reset a YANG datastore to its
   factory-default content.  The reset operation may be used e.g. during
   initial zero-touch configuration or when the existing configuration
   has major errors, so re-starting the configuration process from
   scratch is the best option.

   A new reset-datastore RPC is defined.  Several methods of documenting
   the factory-default content are specified.

   Optionally a new "factory-default-running" read-only datastore is
   defined, that contains the data that will be copied over to the
   running datastore at reset.

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 April 22, 2019.

Wu, et al.               Expires April 22, 2019                 [Page 1]
Internet-Draft           Factory Default Setting            October 2018

Copyright Notice

   Copyright (c) 2018 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Reset-Datastore RPC . . . . . . . . . . . . . . . . . . . . .   4
   3.  Factory-Default Datastore . . . . . . . . . . . . . . . . . .   4
   4.  YANG Module . . . . . . . . . . . . . . . . . . . . . . . . .   5
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   7
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   8
   8.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .   8
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   8
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .   8
     9.2.  Informative References  . . . . . . . . . . . . . . . . .   8
   Appendix A.  Open Issues  . . . . . . . . . . . . . . . . . . . .   9
   Appendix B.  Difference between <startup> datastore and <factory-
                default> datastore . . . . . . . . . . . . . . . . .   9
   Appendix C.  Changes between revisions  . . . . . . . . . . . . .   9
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  10

1.  Introduction

   This document defines a method to reset a YANG datastore to its
   factory-default content.  The reset operation may be used e.g. during
   initial zero-touch configuration or when the existing configuration
   has major errors, so re-starting the configuration process from
   scratch is the best option.  When resetting a datastore all previous
   configuration settings will be lost and replaced by the factory-
   default content.

   A new reset-datastore RPC is defined.  Several methods of documenting
   the factory-default content are specified.

Wu, et al.               Expires April 22, 2019                 [Page 2]
Internet-Draft           Factory Default Setting            October 2018

   Optionally a new "factory-default-running" read-only datastore is
   defined, that contains the data that will be copied over to the
   running datastore at reset.  This datastore can also be used in <get-
   data> operation.

   NETCONF defines the <delete> operation that allows resetting the
   <startup> datastore and the <discard-changes> operation that copies
   the content of the <running> datastore into the <candidate>
   datastore.  However it is not possible to reset the running
   datastore, to reset the candidate datastore without changing the
   running datastore or to reset any dynamic datastore.

   A RESTCONF server MAY implement the above NETCONF operations, but
   that would still not allow it to reset the running configuration.

1.1.  Terminology

   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 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   The following terms are defined in [RFC8342] and are not redefined
   here:

   o  startup configuration datastore

   o  candiate configuration datastore

   o  running configuration datastore

   o  intended configuration datastore

   o  operational state datastore

   The following terms are defined in this document as follows:

   o  factory-default datastore: A read-only datastore holding a
      preconfigured minimal initial configuration that can be used to
      initialize the configuration of a server.  The content of the
      datastore is usually static, but MAY depend on external factors
      like available HW.

Wu, et al.               Expires April 22, 2019                 [Page 3]
Internet-Draft           Factory Default Setting            October 2018

2.  Reset-Datastore RPC

   A new "reset-datastore" RPC is introduced.  It will have a target
   datastore as a parameter.  Upon receiveing the RPC the YANG server
   resets the content of the target datastore to its factory-default
   content.  Only writable datastores can be specified as a target.
   Read-only datastores receive their content from other datastores
   (e.g. <intended> gets its content from <running>).

   Factory-default content SHALL be specified by one of the following
   means in order of precedence

   1.  For the <running>, <candidate> and <startup> datastores as the
       content of the <factory-default> datastore, if it exists

   2.  YANG Instance Data [I-D.lengyel-netmod-yang-instance-data]

   3.  In some implementation specific manner

   4.  For dynamic datastores unless otherwise specified the factory-
       default content is empty.

3.  Factory-Default Datastore

   This document introduces a new datastore resource named 'Factory-
   Default' that represents a preconfigured minimal initial
   configuration that can be used to initialize the configuration of a
   server.

   o  Name: "factory-default"

   o  YANG modules: all

   o  YANG nodes: all "config true" data nodes

   o  Management operations: The content of the datastore is set by the
      YANG server in an implementation dependent manner.  The content
      can not be changed by management operations via NETCONF, RESTCONF,
      the CLI etc. unless specialized, dedicated operations are
      provided.  The contents of the datastore can be read using
      NETCONF, RESTCONF <get-data> operation.  The operation <reset-
      datastore> can be used to copy the content of the datastore to
      another datastore.  The content of the datastore is not propagated
      auomatically to any other datastores.

   o  Origin: This document does not define a new origin identity as it
      does not interact with <operational> datastore.

Wu, et al.               Expires April 22, 2019                 [Page 4]
Internet-Draft           Factory Default Setting            October 2018

   o  Protocols: RESTCONF, NETCONF and other management protocol.

   o  Defining YANG module: "ietf-factory-default"

   The datastore content is usually defined by the device vendor.  It is
   usually static, but MAY change e.g. depending on external factors
   like HW available or during device upgrade.

   On devices that support non-volatile storage, the contents of
   <factory > MUST persist across restarts

4.  YANG Module

<CODE BEGINS> file "ietf-factory-default.yang"
module ietf-factory-default {
  yang-version 1.1;
  namespace urn:ietf:params:xml:ns:yang:ietf-factory-default;
  prefix fdef;

  import ietf-netconf { prefix nc ; }
  import ietf-datastores { prefix ds; }

  organization
    "IETF NETCONF (Network Configuration) Working Group";
  contact
    "WG Web:   <https://tools.ietf.org/wg/netconf/>
     WG List:  <mailto:netconf@ietf.org>

     WG Chair: Kent Watsen
               <mailto:kwatsen@juniper.net>

     WG Chair: Mahesh Jethanandani
               <mailto:mjethanandani@gmail.com>

     Editor:   Balazs Lengyel
               <mailto:balazs.lengyel@ericsson.com>

     Editor:   Qin Wu
               <mailto:bill.wu@huawei.com>";

  description
    "This module defines the
    - reset-datastore RPC
    - factory-default datastore
    - an extension to the Netconf <copy-config> operation to
    allow it to operate on the factory-default datastore.

    It provides functionality to reset a YANG datastore to its

Wu, et al.               Expires April 22, 2019                 [Page 5]
Internet-Draft           Factory Default Setting            October 2018

    factory-default content.

     Copyright (c) 2018 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).

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
     'OPTIONAL' in the module text are to be interpreted as described
     in RFC 2119 (https://tools.ietf.org/html/rfc2119).

     This version of this YANG module is part of RFC XXXX
     (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
     full legal notices.";

  revision 2018-10-09 {
    description
      "Initial revision.";
      reference "RFC XXXX: Factory default Setting Capability for
      RESTCONF";
  }

  feature factory-default-as-datastore {
    description "Indicates that the factory default configuration is
      also available as a separate datastore";
  }

  rpc reset-datastore {
    description "The target datastore is reset to its factory
      default content. ";

    input {
      leaf-list target-datasore {
        type identityref {
          base "ds:datastore" ;
        }
        min-elements 1;
        description "The datastore(s) whose content will be
          replaced by the factory-default configuration.";
      }
      // Do we need an extra parameter that may order a restart of
      // the YANG-server or the whole system?

Wu, et al.               Expires April 22, 2019                 [Page 6]
Internet-Draft           Factory Default Setting            October 2018

    }
  }

  identity factory-default {
    if-feature factory-default-as-datastore;
    base ds:datastore;
    description "The read-only datastore contains the configuration that
      will be copied into e.g. the running datastore by the
      reset-datastore operation if the target is the running
      datastore.";
  }
}
<CODE ENDS>

5.  IANA Considerations

   This document registers one URI in the IETF XML Registry [RFC3688].
   The following registration has been made:

      URI: urn:ietf:params:xml:ns:yang:ietf-factory-default

      Registrant Contact: The IESG.

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

   This document registers one YANG module in the YANG Module Names
   Registry [RFC6020].  The following registration has been made:

      name: ietf-factory-default

      namespace: urn:ietf:params:xml:ns:yang:ietf-factory-default

      prefix: fdef

      RFC: xxxx

6.  Security Considerations

   The <reset-datastore> RPC can overwrite important and security
   sensitive information in one of the other datastores e.g. running,
   therefore it is important to restrict access to this RPC using the
   standard access control methods.  [RFC8341]

   The content of the factory-default datastore is usually not security
   sensitive as it is the same on any device of a certain type.

Wu, et al.               Expires April 22, 2019                 [Page 7]
Internet-Draft           Factory Default Setting            October 2018

7.  Acknowledgements

   Thanks to Juergen Schoenwaelder, Ladislav Lhotka to review this draft
   and provide important input to this document.

8.  Contributors

      Rohit R Ranade
      Huawei
      Email: rohitrranade@huawei.com

9.  References

9.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/info/rfc8342>.

9.2.  Informative References

   [I-D.ietf-netconf-zerotouch]
              Watsen, K., Abrahamsson, M., and I. Farrer, "Zero Touch
              Provisioning for Networking Devices", draft-ietf-netconf-
              zerotouch-25 (work in progress), September 2018.

Wu, et al.               Expires April 22, 2019                 [Page 8]
Internet-Draft           Factory Default Setting            October 2018

   [I-D.lengyel-netmod-yang-instance-data]
              Lengyel, B. and B. Claise, "YANG Instance Data Files and
              their use for Documenting Server Capabilities", draft-
              lengyel-netmod-yang-instance-data-04 (work in progress),
              October 2018.

Appendix A.  Open Issues

   o  Do we need a restart after <reset-datastore> ? What kind of
      restart, just the YANG-Server or the full system?

   o  Do we need the concept of reboot?  How is that different from a
      restart?  Does it result in some sort of reset-datastore?

Appendix B.  Difference between <startup> datastore and <factory-
             default> datastore

   When the device first boots up, the content of the <startup> and
   <factory-default> will be identical.  The content of <startup> can be
   subsequently changed by using <startup> as a target in a <copy-
   config> operation.  The <factory-default> is a read-only datastore
   and it is usually static as described in earlier sections.

Appendix C.  Changes between revisions

   v3 - v00 - v01

   o  Changed name from draft-wu-netconf-restconf-factory-restore to
      draft-wu-netmod-factory-default

   o  Removed copy-config ; reset-datastore is enough

   v02 - v03

   o  Restructured

   o  Made new datastore optional

   o  Removed Netconf capability

   o  Listed Open issues

   v01 - v02

   o  -

   v00 - v01

Wu, et al.               Expires April 22, 2019                 [Page 9]
Internet-Draft           Factory Default Setting            October 2018

   o  -

Authors' Addresses

   Qin Wu
   Huawei
   101 Software Avenue, Yuhua District
   Nanjing, Jiangsu  210012
   China

   Email: bill.wu@huawei.com

   Balazs Lengyel
   Ericsson Hungary
   Magyar Tudosok korutja 11
   1117 Budapest
   Hungary

   Phone: +36-70-330-7909
   Email: balazs.lengyel@ericsson.com

   Ye Niu
   Huawei

   Email: niuye@huawei.com

Wu, et al.               Expires April 22, 2019                [Page 10]