idnits 2.17.1 draft-wu-netmod-factory-default-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 29, 2018) is 1969 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFC3688' is mentioned on line 308, but not defined == Missing Reference: 'RFC6020' is mentioned on line 318, but not defined == Unused Reference: 'RFC7950' is defined on line 358, but no explicit reference was found in the text == Unused Reference: 'I-D.ietf-netconf-zerotouch' is defined on line 378, but no explicit reference was found in the text == Outdated reference: A later version (-29) exists of draft-ietf-netconf-zerotouch-25 == Outdated reference: A later version (-21) exists of draft-ietf-netmod-yang-instance-file-format-00 Summary: 0 errors (**), 0 flaws (~~), 7 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NETMOD Working Group Q. Wu 3 Internet-Draft Huawei 4 Intended status: Standards Track B. Lengyel 5 Expires: June 2, 2019 Ericsson Hungary 6 Y. Niu 7 Huawei 8 November 29, 2018 10 Factory default Setting 11 draft-wu-netmod-factory-default-02 13 Abstract 15 This document defines a method to reset a YANG datastore to its 16 factory-default content. The reset operation may be used e.g. during 17 initial zero-touch configuration or when the existing configuration 18 has major errors, so re-starting the configuration process from 19 scratch is the best option. 21 A new reset-datastore RPC is defined. Several methods of documenting 22 the factory-default content are specified. 24 Optionally a new "factory-default-running" read-only datastore is 25 defined, that contains the data that will be copied over to the 26 running datastore at reset. 28 Status of This Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at https://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on June 2, 2019. 45 Copyright Notice 47 Copyright (c) 2018 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (https://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 63 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. Reset-Datastore RPC . . . . . . . . . . . . . . . . . . . . . 4 65 3. Factory-Default Datastore . . . . . . . . . . . . . . . . . . 4 66 4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 5 67 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 68 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 69 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 70 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 8 71 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 72 9.1. Normative References . . . . . . . . . . . . . . . . . . 8 73 9.2. Informative References . . . . . . . . . . . . . . . . . 9 74 Appendix A. Open Issues . . . . . . . . . . . . . . . . . . . . 9 75 Appendix B. Difference between datastore and datastore . . . . . . . . . . . . . . . . . 9 77 Appendix C. Changes between revisions . . . . . . . . . . . . . 9 78 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 80 1. Introduction 82 This document defines a method to reset a YANG datastore to its 83 factory-default content. The reset operation may be used e.g. during 84 initial zero-touch configuration or when the existing configuration 85 has major errors, so re-starting the configuration process from 86 scratch is the best option. When resetting a datastore all previous 87 configuration settings will be lost and replaced by the factory- 88 default content. 90 A new reset-datastore RPC is defined. Several methods of documenting 91 the factory-default content are specified. 93 Optionally a new "factory-default-running" read-only datastore is 94 defined, that contains the data that will be copied over to the 95 running datastore at reset. This datastore can also be used in or operations. 98 NETCONF defines the operation that allows resetting the 99 datastore and the operation that copies 100 the content of the datastore into the 101 datastore. However it is not possible to reset the running 102 datastore, to reset the candidate datastore without changing the 103 running datastore or to reset any dynamic datastore. 105 A RESTCONF server MAY implement the above NETCONF operations, but 106 that would still not allow it to reset the running configuration. 108 1.1. Terminology 110 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 111 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 112 "OPTIONAL" in this document are to be interpreted as described in BCP 113 14 [RFC2119] [RFC8174] when, and only when, they appear in all 114 capitals, as shown here. 116 The following terms are defined in [RFC8342] and are not redefined 117 here: 119 o startup configuration datastore 121 o candiate configuration datastore 123 o running configuration datastore 125 o intended configuration datastore 127 o operational state datastore 129 The following terms are defined in this document as follows: 131 o factory-default datastore: A read-only datastore holding a 132 preconfigured minimal initial configuration that can be used to 133 initialize the configuration of a server. The content of the 134 datastore is usually static, but MAY depend on external factors 135 like available HW. 137 2. Reset-Datastore RPC 139 A new "reset-datastore" RPC is introduced. It will have a target 140 datastore as a parameter. Upon receiveing the RPC the YANG server 141 resets the content of the target datastore to its factory-default 142 content. Only writable datastores can be specified as a target. 143 Read-only datastores receive their content from other datastores 144 (e.g. gets its content from ). 146 Factory-default content SHALL be specified by one of the following 147 means in order of precedence 149 1. For the , and datastores as the 150 content of the datastore, if it exists 152 2. YANG Instance Data [I-D.ietf-netmod-yang-instance-file-format] 154 3. In some implementation specific manner 156 4. For dynamic datastores unless otherwise specified the factory- 157 default content is empty. 159 3. Factory-Default Datastore 161 This document introduces a new datastore resource named 'Factory- 162 Default' that represents a preconfigured minimal initial 163 configuration that can be used to initialize the configuration of a 164 server. 166 o Name: "factory-default" 168 o YANG modules: all 170 o YANG nodes: all "config true" data nodes 172 o Management operations: The content of the datastore is set by the 173 YANG server in an implementation dependent manner. The content 174 can not be changed by management operations via NETCONF, RESTCONF, 175 the CLI etc. unless specialized, dedicated operations are 176 provided. The contents of the datastore can be read using 177 NETCONF, RESTCONF operation. The operations or can be used to copy the content of the 179 datastore to another datastore. The content of the datastore is 180 not propagated auomatically to any other datastores. 182 o Origin: This document does not define a new origin identity as it 183 does not interact with datastore. 185 o Protocols: RESTCONF, NETCONF and other management protocol. 187 o Defining YANG module: "ietf-factory-default" 189 The datastore content is usually defined by the device vendor. It is 190 usually static, but MAY change e.g. depending on external factors 191 like HW available or during device upgrade. 193 On devices that support non-volatile storage, the contents of 194 MUST persist across restarts 196 4. YANG Module 198 file "ietf-factory-default.yang" 199 module ietf-factory-default { 200 yang-version 1.1; 201 namespace urn:ietf:params:xml:ns:yang:ietf-factory-default; 202 prefix fdef; 204 import ietf-netconf { prefix nc ; } 205 import ietf-datastores { prefix ds; } 207 organization 208 "IETF NETMOD (Network Modeling) Working Group"; 209 contact 210 "WG Web: 211 WG List: 213 WG Chair: Lou Berger 214 215 WG Chair: Joel Jaeggli 216 217 WG Chair: Kent Watsen 218 220 Editor: Balazs Lengyel 221 223 Editor: Qin Wu 224 "; 226 description 227 "This module defines the 228 - reset-datastore RPC 229 - factory-default datastore 230 - an extension to the Netconf operation to 231 allow it to operate on the factory-default datastore. 233 It provides functionality to reset a YANG datastore to its 234 factory-default content. 236 Copyright (c) 2018 IETF Trust and the persons identified as 237 authors of the code. All rights reserved. 239 Redistribution and use in source and binary forms, with or 240 without modification, is permitted pursuant to, and subject to 241 the license terms contained in, the Simplified BSD License set 242 forth in Section 4.c of the IETF Trust's Legal Provisions 243 Relating to IETF Documents 244 (https://trustee.ietf.org/license-info). 246 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 247 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 248 'OPTIONAL' in the module text are to be interpreted as described 249 in RFC 2119 (https://tools.ietf.org/html/rfc2119). 251 This version of this YANG module is part of RFC XXXX 252 (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for 253 full legal notices."; 255 revision 2018-10-09 { 256 description 257 "Initial revision."; 258 reference "RFC XXXX: Factory default Setting Capability for 259 RESTCONF"; 260 } 262 feature factory-default-as-datastore { 263 description "Indicates that the factory default configuration is 264 also available as a separate datastore"; 265 } 267 rpc reset-datastore { 268 description "The target datastore is reset to its factory 269 default content. "; 271 input { 272 leaf-list target-datasore { 273 type identityref { 274 base "ds:datastore" ; 275 } 276 min-elements 1; 277 description "The datastore(s) whose content will be 278 replaced by the factory-default configuration."; 279 } 280 // Do we need an extra parameter that may order a restart of 281 // the YANG-server or the whole system? 282 } 283 } 285 identity factory-default { 286 if-feature factory-default-as-datastore; 287 base ds:datastore; 288 description "The read-only datastore contains the configuration that 289 will be copied into e.g. the running datastore by the 290 reset-datastore operation if the target is the running 291 datastore."; 292 } 294 augment /nc:copy-config/nc:input/nc:source/nc:config-source { 295 if-feature factory-default-as-datastore; 296 description " Allows the copy-config operation to use the 297 factory-default datastore as a source"; 298 leaf factory-default { 299 type empty ; 300 description 301 "The factory-default datastore is the source."; } 302 } 303 } 304 306 5. IANA Considerations 308 This document registers one URI in the IETF XML Registry [RFC3688]. 309 The following registration has been made: 311 URI: urn:ietf:params:xml:ns:yang:ietf-factory-default 313 Registrant Contact: The IESG. 315 XML: N/A, the requested URI is an XML namespace. 317 This document registers one YANG module in the YANG Module Names 318 Registry [RFC6020]. The following registration has been made: 320 name: ietf-factory-default 322 namespace: urn:ietf:params:xml:ns:yang:ietf-factory-default 324 prefix: fdef 326 RFC: xxxx 328 6. Security Considerations 330 The RPC can overwrite important and security 331 sensitive information in one of the other datastores e.g. running, 332 therefore it is important to restrict access to this RPC using the 333 standard access control methods. [RFC8341] 335 The content of the factory-default datastore is usually not security 336 sensitive as it is the same on any device of a certain type. 338 7. Acknowledgements 340 Thanks to Juergen Schoenwaelder, Ladislav Lhotka to review this draft 341 and provide important input to this document. 343 8. Contributors 345 Rohit R Ranade 346 Huawei 347 Email: rohitrranade@huawei.com 349 9. References 351 9.1. Normative References 353 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 354 Requirement Levels", BCP 14, RFC 2119, 355 DOI 10.17487/RFC2119, March 1997, 356 . 358 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 359 RFC 7950, DOI 10.17487/RFC7950, August 2016, 360 . 362 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 363 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 364 May 2017, . 366 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 367 Access Control Model", STD 91, RFC 8341, 368 DOI 10.17487/RFC8341, March 2018, 369 . 371 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 372 and R. Wilton, "Network Management Datastore Architecture 373 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 374 . 376 9.2. Informative References 378 [I-D.ietf-netconf-zerotouch] 379 Watsen, K., Abrahamsson, M., and I. Farrer, "Zero Touch 380 Provisioning for Networking Devices", draft-ietf-netconf- 381 zerotouch-25 (work in progress), September 2018. 383 [I-D.ietf-netmod-yang-instance-file-format] 384 Lengyel, B. and B. Claise, "YANG Instance Data File 385 Format", draft-ietf-netmod-yang-instance-file-format-00 386 (work in progress), November 2018. 388 Appendix A. Open Issues 390 o Do we need a restart after ? What kind of 391 restart, just the YANG-Server or the full system? 393 o Do we need the concept of reboot? How is that different from a 394 restart? Does it result in some sort of reset-datastore? 396 Appendix B. Difference between datastore and datastore 399 When the device first boots up, the content of the and 400 will be identical. The content of can be 401 subsequently changed by using as a target in a operation. The is a read-only datastore 403 and it is usually static as described in earlier sections. 405 Appendix C. Changes between revisions 407 v01 - v02 409 o Add copy-config based on Rob's comment. 411 o Reference Update. 413 v3 - v00 - v01 415 o Changed name from draft-wu-netconf-restconf-factory-restore to 416 draft-wu-netmod-factory-default 418 o Removed copy-config ; reset-datastore is enough 420 v02 - v03 422 o Restructured 423 o Made new datastore optional 425 o Removed Netconf capability 427 o Listed Open issues 429 v01 - v02 431 o - 433 v00 - v01 435 o - 437 Authors' Addresses 439 Qin Wu 440 Huawei 441 101 Software Avenue, Yuhua District 442 Nanjing, Jiangsu 210012 443 China 445 Email: bill.wu@huawei.com 447 Balazs Lengyel 448 Ericsson Hungary 449 Magyar Tudosok korutja 11 450 1117 Budapest 451 Hungary 453 Phone: +36-70-330-7909 454 Email: balazs.lengyel@ericsson.com 456 Ye Niu 457 Huawei 459 Email: niuye@huawei.com