< draft-wu-netmod-factory-default-02.txt   draft-wu-netmod-factory-default-03.txt >
NETMOD Working Group Q. Wu NETMOD Working Group Q. Wu
Internet-Draft Huawei Internet-Draft Huawei
Intended status: Standards Track B. Lengyel Intended status: Standards Track B. Lengyel
Expires: June 2, 2019 Ericsson Hungary Expires: November 7, 2019 Ericsson Hungary
Y. Niu Y. Niu
Huawei Huawei
November 29, 2018 May 6, 2019
Factory default Setting Factory default Setting
draft-wu-netmod-factory-default-02 draft-wu-netmod-factory-default-03
Abstract Abstract
This document defines a method to reset a YANG datastore to its This document defines a method to reset a YANG server to its factory-
factory-default content. The reset operation may be used e.g. during default content. The reset operation may be used e.g. during initial
initial zero-touch configuration or when the existing configuration zero-touch configuration or when the existing configuration has major
has major errors, so re-starting the configuration process from errors, so re-starting the configuration process from scratch is the
scratch is the best option. best option.
A new reset-datastore RPC is defined. Several methods of documenting A new factory-reset RPC is defined. Several methods of documenting
the factory-default content are specified. the factory-default content are specified.
Optionally a new "factory-default-running" read-only datastore is Optionally a new "factory-default" read-only datastore is defined,
defined, that contains the data that will be copied over to the that contains the data that will be copied over to the running
running datastore at reset. datastore at reset.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 2, 2019. This Internet-Draft will expire on November 7, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Reset-Datastore RPC . . . . . . . . . . . . . . . . . . . . . 4 2. Factory-Reset RPC . . . . . . . . . . . . . . . . . . . . . . 4
3. Factory-Default Datastore . . . . . . . . . . . . . . . . . . 4 3. Factory-Default Datastore . . . . . . . . . . . . . . . . . . 4
4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7
6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8
8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 8 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 8
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
9.1. Normative References . . . . . . . . . . . . . . . . . . 8 9.1. Normative References . . . . . . . . . . . . . . . . . . 8
9.2. Informative References . . . . . . . . . . . . . . . . . 9 9.2. Informative References . . . . . . . . . . . . . . . . . 8
Appendix A. Open Issues . . . . . . . . . . . . . . . . . . . . 9 Appendix A. Open Issues . . . . . . . . . . . . . . . . . . . . 9
Appendix B. Difference between <startup> datastore and <factory- Appendix B. Difference between <startup> datastore and <factory-
default> datastore . . . . . . . . . . . . . . . . . 9 default> datastore . . . . . . . . . . . . . . . . . 9
Appendix C. Changes between revisions . . . . . . . . . . . . . 9 Appendix C. Changes between revisions . . . . . . . . . . . . . 9
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10
1. Introduction 1. Introduction
This document defines a method to reset a YANG datastore to its This document defines a method to reset a YANG server to its factory-
factory-default content. The reset operation may be used e.g. during default content. The reset operation may be used e.g. during initial
initial zero-touch configuration or when the existing configuration zero-touch configuration or when the existing configuration has major
has major errors, so re-starting the configuration process from errors, so re-starting the configuration process from scratch is the
scratch is the best option. When resetting a datastore all previous best option. When resetting a datastore all previous configuration
configuration settings will be lost and replaced by the factory- settings will be lost and replaced by the factory-default content.
default content.
A new reset-datastore RPC is defined. Several methods of documenting A new factory-reset RPC is defined. Several methods of documenting
the factory-default content are specified. the factory-default content are specified.
Optionally a new "factory-default-running" read-only datastore is Optionally a new "factory-default" read-only datastore is defined,
defined, that contains the data that will be copied over to the that contains the data that will be copied over to the
running datastore at reset. This datastore can also be used in <get- <startup>,<candiate>,<running> datastore at reset. This datastore
data> or <copy-config> operations. can also be used in <get-data> or <copy-config> operations.
NETCONF defines the <delete> operation that allows resetting the NETCONF defines the <delete> operation that allows resetting the
<startup> datastore and the <discard-changes> operation that copies <startup> datastore and the <discard-changes> operation that copies
the content of the <running> datastore into the <candidate> the content of the <running> datastore into the <candidate>
datastore. However it is not possible to reset the running datastore. However it is not possible to reset the running
datastore, to reset the candidate datastore without changing the datastore, to reset the candidate datastore without changing the
running datastore or to reset any dynamic datastore. running datastore or to reset any dynamic datastore.
A RESTCONF server MAY implement the above NETCONF operations, but A RESTCONF server MAY implement the above NETCONF operations, but
that would still not allow it to reset the running configuration. that would still not allow it to reset the running configuration.
skipping to change at page 4, line 5 skipping to change at page 4, line 5
o operational state datastore o operational state datastore
The following terms are defined in this document as follows: The following terms are defined in this document as follows:
o factory-default datastore: A read-only datastore holding a o factory-default datastore: A read-only datastore holding a
preconfigured minimal initial configuration that can be used to preconfigured minimal initial configuration that can be used to
initialize the configuration of a server. The content of the initialize the configuration of a server. The content of the
datastore is usually static, but MAY depend on external factors datastore is usually static, but MAY depend on external factors
like available HW. like available HW.
2. Reset-Datastore RPC 2. Factory-Reset RPC
A new "reset-datastore" RPC is introduced. It will have a target A new "factory-reset" RPC is introduced. Upon receiveing the RPC the
datastore as a parameter. Upon receiveing the RPC the YANG server YANG server resets the content of <running>, <candidate> and
resets the content of the target datastore to its factory-default <startup> to its factory- default content. Read-only datastores
content. Only writable datastores can be specified as a target. receive their content from other datastores (e.g. <intended> gets its
Read-only datastores receive their content from other datastores content from <running>).
(e.g. <intended> gets its content from <running>).
Factory-default content SHALL be specified by one of the following Factory-default content SHALL be specified by one of the following
means in order of precedence means in order of precedence
1. For the <running>, <candidate> and <startup> datastores as the 1. For the <running>, <candidate> and <startup> datastores as the
content of the <factory-default> datastore, if it exists content of the <factory-default> datastore, if it exists
2. YANG Instance Data [I-D.ietf-netmod-yang-instance-file-format] 2. YANG Instance Data [I-D.ietf-netmod-yang-instance-file-format]
3. In some implementation specific manner 3. In some implementation specific manner
skipping to change at page 4, line 42 skipping to change at page 4, line 41
server. server.
o Name: "factory-default" o Name: "factory-default"
o YANG modules: all o YANG modules: all
o YANG nodes: all "config true" data nodes o YANG nodes: all "config true" data nodes
o Management operations: The content of the datastore is set by the o Management operations: The content of the datastore is set by the
YANG server in an implementation dependent manner. The content YANG server in an implementation dependent manner. The content
can not be changed by management operations via NETCONF, RESTCONF, can not be changed by management operations via NETCONF,
the CLI etc. unless specialized, dedicated operations are RESTCONF,the CLI etc. unless specialized, dedicated operations are
provided. The contents of the datastore can be read using provided. The contents of the datastore can be read using
NETCONF, RESTCONF <get-data> operation. The operations <reset- NETCONF, RESTCONF <get-data> operation. The operation <factory-
datastore> or <copy-config> can be used to copy the content of the reset> can be used to copy the content of the datastore to a set
datastore to another datastore. The content of the datastore is of another datastores. For <copy-config> operation,it can be used
not propagated auomatically to any other datastores. to copy the content of the datastore to another datastore, however
the content of the datastore is not propagated automatically to
any other datastores.
o Origin: This document does not define a new origin identity as it o Origin: This document does not define a new origin identity as it
does not interact with <operational> datastore. does not interact with <operational> datastore.
o Protocols: RESTCONF, NETCONF and other management protocol. o Protocols: RESTCONF, NETCONF and other management protocol.
o Defining YANG module: "ietf-factory-default" o Defining YANG module: "ietf-factory-default"
The datastore content is usually defined by the device vendor. It is The datastore content is usually defined by the device vendor. It is
usually static, but MAY change e.g. depending on external factors usually static, but MAY change e.g. depending on external factors
skipping to change at page 5, line 42 skipping to change at page 5, line 42
WG Chair: Lou Berger WG Chair: Lou Berger
<mailto:lberger@labn.net> <mailto:lberger@labn.net>
WG Chair: Joel Jaeggli WG Chair: Joel Jaeggli
<mailto:joelja@bogus.com> <mailto:joelja@bogus.com>
WG Chair: Kent Watsen WG Chair: Kent Watsen
<mailto:kwatsen@juniper.net> <mailto:kwatsen@juniper.net>
Editor: Balazs Lengyel Editor: Balazs Lengyel
<mailto:balazs.lengyel@ericsson.com> <mailto:balazs.lengyel@ericsson.com>
Editor: Qin Wu Editor: Qin Wu
<mailto:bill.wu@huawei.com>"; <mailto:bill.wu@huawei.com>
Editor: Ye Niu
<mailto:niuye@huawei.com>";
description description
"This module defines the "This module defines the
- reset-datastore RPC - factory-reset RPC
- factory-default datastore - factory-default datastore
- an extension to the Netconf <copy-config> operation to - an extension to the NETCONF <copy-config> operation to
allow it to operate on the factory-default datastore. allow it to operate on the factory-default datastore.
It provides functionality to reset a YANG datastore to its It provides functionality to reset a YANG server to its
factory-default content. factory-default content.
Copyright (c) 2018 IETF Trust and the persons identified as Copyright (c) 2018 IETF Trust and the persons identified as
authors of the code. All rights reserved. authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents Relating to IETF Documents
skipping to change at page 6, line 27 skipping to change at page 6, line 27
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and
'OPTIONAL' in the module text are to be interpreted as described 'OPTIONAL' in the module text are to be interpreted as described
in RFC 2119 (https://tools.ietf.org/html/rfc2119). in RFC 2119 (https://tools.ietf.org/html/rfc2119).
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://tools.ietf.org/html/rfcXXXX); see the RFC itself for (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
full legal notices."; full legal notices.";
revision 2018-10-09 { revision 2019-05-03 {
description description
"Initial revision."; "Initial revision.";
reference "RFC XXXX: Factory default Setting Capability for reference "RFC XXXX: Factory default Setting";
RESTCONF";
} }
feature factory-default-as-datastore { feature factory-default-as-datastore {
description "Indicates that the factory default configuration is description "Indicates that the factory default configuration is
also available as a separate datastore"; also available as a separate datastore";
} }
rpc reset-datastore { rpc factory-reset {
description "The target datastore is reset to its factory description "The YANG server resets the content of <running>,
default content. "; <candidate> and <startup> 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 // Do we need an extra parameter that may order a restart of
// the YANG-server or the whole system? // the YANG-server or the whole system?
}
} }
identity factory-default { identity factory-default {
if-feature factory-default-as-datastore; if-feature factory-default-as-datastore;
base ds:datastore; base ds:datastore;
description "The read-only datastore contains the configuration that description "The read-only datastore contains the configuration that
will be copied into e.g. the running datastore by the will be copied into e.g. the running datastore by the
reset-datastore operation if the target is the running factory-reset operation if the target is the running
datastore."; datastore.";
} }
augment /nc:copy-config/nc:input/nc:source/nc:config-source { augment /nc:copy-config/nc:input/nc:source/nc:config-source {
if-feature factory-default-as-datastore; if-feature factory-default-as-datastore;
description " Allows the copy-config operation to use the description " Allows the copy-config operation to use the
factory-default datastore as a source"; factory-default datastore as a source";
leaf factory-default { leaf factory-default {
type empty ; type empty ;
description description
skipping to change at page 8, line 7 skipping to change at page 7, line 41
name: ietf-factory-default name: ietf-factory-default
namespace: urn:ietf:params:xml:ns:yang:ietf-factory-default namespace: urn:ietf:params:xml:ns:yang:ietf-factory-default
prefix: fdef prefix: fdef
RFC: xxxx RFC: xxxx
6. Security Considerations 6. Security Considerations
The <reset-datastore> RPC can overwrite important and security The <factory-reset> RPC can overwrite important and security
sensitive information in one of the other datastores e.g. running, sensitive information in one of the other datastores e.g. running,
therefore it is important to restrict access to this RPC using the therefore it is important to restrict access to this RPC using the
standard access control methods. [RFC8341] standard access control methods. [RFC8341]
The content of the factory-default datastore is usually not security The content of the factory-default datastore is usually not security
sensitive as it is the same on any device of a certain type. sensitive as it is the same on any device of a certain type.
7. Acknowledgements 7. Acknowledgements
Thanks to Juergen Schoenwaelder, Ladislav Lhotka to review this draft Thanks to Juergen Schoenwaelder, Ladislav Lhotka, Alex Campbell,Joe
and provide important input to this document. Clark,Robert Wilton, Kent Watsen, Joel Jaeggli,Andy Berman,Susan
Hares to review this draft and provide important input to this
document.
8. Contributors 8. Contributors
Rohit R Ranade Rohit R Ranade
Huawei Huawei
Email: rohitrranade@huawei.com Email: rohitrranade@huawei.com
9. References 9. References
9.1. Normative References 9.1. Normative References
skipping to change at page 9, line 8 skipping to change at page 8, line 48
<https://www.rfc-editor.org/info/rfc8341>. <https://www.rfc-editor.org/info/rfc8341>.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>. <https://www.rfc-editor.org/info/rfc8342>.
9.2. Informative References 9.2. Informative References
[I-D.ietf-netconf-zerotouch] [I-D.ietf-netconf-zerotouch]
Watsen, K., Abrahamsson, M., and I. Farrer, "Zero Touch Watsen, K., Abrahamsson, M., and I. Farrer, "Secure Zero
Provisioning for Networking Devices", draft-ietf-netconf- Touch Provisioning (SZTP)", draft-ietf-netconf-
zerotouch-25 (work in progress), September 2018. zerotouch-29 (work in progress), January 2019.
[I-D.ietf-netmod-yang-instance-file-format] [I-D.ietf-netmod-yang-instance-file-format]
Lengyel, B. and B. Claise, "YANG Instance Data File Lengyel, B. and B. Claise, "YANG Instance Data File
Format", draft-ietf-netmod-yang-instance-file-format-00 Format", draft-ietf-netmod-yang-instance-file-format-02
(work in progress), November 2018. (work in progress), February 2019.
Appendix A. Open Issues Appendix A. Open Issues
o Do we need a restart after <reset-datastore> ? What kind of o Do we need an extra parameter that may order a restart of the
restart, just the YANG-Server or the full system? YANG-server or the whole system?
o Do we need the concept of reboot? How is that different from a o Do we allow different datastore have different factory default
restart? Does it result in some sort of reset-datastore? content? No
Appendix B. Difference between <startup> datastore and <factory- Appendix B. Difference between <startup> datastore and <factory-
default> datastore default> datastore
When the device first boots up, the content of the <startup> and When the device first boots up, the content of the <startup> and
<factory-default> will be identical. The content of <startup> can be <factory-default> will be identical. The content of <startup> can be
subsequently changed by using <startup> as a target in a <copy- subsequently changed by using <startup> as a target in a <copy-
config> operation. The <factory-default> is a read-only datastore config> operation. The <factory-default> is a read-only datastore
and it is usually static as described in earlier sections. and it is usually static as described in earlier sections.
Appendix C. Changes between revisions Appendix C. Changes between revisions
v02 - v03
o Change reset-datastore RPC into factory-reset RPC to allow reset
the whole device with factory default content.
o Remove target datastore parameter from factory-reset RPC.
o Other editorial changes.
v01 - v02 v01 - v02
o Add copy-config based on Rob's comment. o Add copy-config based on Rob's comment.
o Reference Update. o Reference Update.
v3 - v00 - v01 v3 - v00 - v01
o Changed name from draft-wu-netconf-restconf-factory-restore to o Changed name from draft-wu-netconf-restconf-factory-restore to
draft-wu-netmod-factory-default draft-wu-netmod-factory-default
 End of changes. 35 change blocks. 
78 lines changed or deleted 77 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/