Re: [Netconf] I-D Action: draft-wu-netconf-restconf-factory-restore-02.txt

Qin Wu <bill.wu@huawei.com> Tue, 09 October 2018 06:44 UTC

Return-Path: <bill.wu@huawei.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A58D513118E for <netconf@ietfa.amsl.com>; Mon, 8 Oct 2018 23:44:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.589
X-Spam-Level:
X-Spam-Status: No, score=-2.589 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t55Bu7OfmlT3 for <netconf@ietfa.amsl.com>; Mon, 8 Oct 2018 23:44:37 -0700 (PDT)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F375C1310C5 for <netconf@ietf.org>; Mon, 8 Oct 2018 23:44:36 -0700 (PDT)
Received: from LHREML710-CAH.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id CE3E7FE4D8855; Tue, 9 Oct 2018 07:28:52 +0100 (IST)
Received: from NKGEML411-HUB.china.huawei.com (10.98.56.70) by LHREML710-CAH.china.huawei.com (10.201.108.33) with Microsoft SMTP Server (TLS) id 14.3.399.0; Tue, 9 Oct 2018 07:28:53 +0100
Received: from NKGEML513-MBX.china.huawei.com ([169.254.1.200]) by nkgeml411-hub.china.huawei.com ([10.98.56.70]) with mapi id 14.03.0399.000; Tue, 9 Oct 2018 14:28:46 +0800
From: Qin Wu <bill.wu@huawei.com>
To: Balazs Lengyel <balazs.lengyel@ericsson.com>, Netconf <netconf@ietf.org>
Thread-Topic: [Netconf] I-D Action: draft-wu-netconf-restconf-factory-restore-02.txt
Thread-Index: AdRaKdiYCP2XfmRQTOmr8cyYDEoqjP//jMOA//Yn1zCAE0qAgIAAZZUA//6Pm2A=
Date: Tue, 09 Oct 2018 06:28:46 +0000
Message-ID: <B8F9A780D330094D99AF023C5877DABA9B05FB01@nkgeml513-mbx.china.huawei.com>
References: <B8F9A780D330094D99AF023C5877DABA9B059458@nkgeml513-mbx.china.huawei.com> <20181002093541.waajxxmgszesyy6g@anna.jacobs.jacobs-university.de> <B8F9A780D330094D99AF023C5877DABA9B05DE38@nkgeml513-mbx.china.huawei.com> <20181008095115.wifsctgdmygatgn6@anna.jacobs.jacobs-university.de> <e00dfde8-219a-6123-e768-72395841a0a6@ericsson.com>
In-Reply-To: <e00dfde8-219a-6123-e768-72395841a0a6@ericsson.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.138.33.244]
Content-Type: multipart/alternative; boundary="_000_B8F9A780D330094D99AF023C5877DABA9B05FB01nkgeml513mbxchi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/m9JBg2xBTAvgFenbYYZmi37abII>
Subject: Re: [Netconf] I-D Action: draft-wu-netconf-restconf-factory-restore-02.txt
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Oct 2018 06:44:41 -0000

Good input, Balazs, see my comments inline.

发件人: Balazs Lengyel [mailto:balazs.lengyel@ericsson.com]
发送时间: 2018年10月8日 23:55
收件人: Qin Wu; Netconf
主题: Re: [Netconf] I-D Action: draft-wu-netconf-restconf-factory-restore-02.txt


Hello,

1)  The function needs to support devices that have a factory reset functionality, but which are not capable to show the actual default values as a full datastore. Not all YANG servers will be full featured, big machines.

[Qin]: This can be resolved by introducing a new factory datastore, with existing operation, we can be able to know what contents are included in such datastore.

2) We have a number of writable datastores: running, startup, candidate, dynamic-datastores.  We need to document what happens with each. After reseting a datastore in the normal case

  1.  the running datastore is reset to mirror the content of the factory-default-datastore

[Qin]: you missed intended, can intended also be reset to mirror the content of the factory-default-datastore?

  1.  candidate datastore is reset to the same state as if the <discard-changes> operation was executed
  2.  startup datastore is reset to the same state as if <copy-config>  running->startup was executed
  3.  Any dynamic datastores are reset to empty

The system MAY provide YANG-Instance-Data based or other implementation specific documentation to specify other content that a datastore will have after a reset operation.

[Qin]: yeah, additional new supported module can be specified by using YANG-Instance-data documentation.

I wrote an example YANG module that could describe the above:

----------------------------

module ietf-factory-reset {

    namespace urn:ietf:params:xml:ns:yang:ietf-factory-reset ;

    prefix fres ;

    yang-version 1.1;



    import ietf-netconf { prefix nc ; }

    import ietf-datastores { prefix ds; }



    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 it's factory

            default content. The server MUST allow reset for the running

            datastore and MAY allow reset for any other writable datastore.";



        input {

            choice target-datastore {

                leaf target {

                    type identityref { base "ds:datastore" ; }

                }

                leaf all-datastores {

                    type empty;

                    description "All writable datastores including running,

                        startup, candidate and any dynamic datastores that exist

                        are reset to their default value.";

                }

            }



            // Do we need an extra parameter that may order a restart of

            // the YANG-server or the whole system?

        }

    }

[Qin]: Sounds good proposal,in my earlier version of draft, I defines an extra parameter to indicate whether restart is needed.

           If such parameter is needed, we can define it as empty type.



    identity factory-default-running-datastore {

        description "The read-only datastore contains the configuration that

            will be copied into the running datastore by the reset-datastore

            operation if the target is the running datastore.";

        if-feature "factory-default-as-datastore";

    }



    augment /nc:copy-config/nc:input/nc:target/nc:config-target {

        description " Allows the copy-config operation to use the

            factory-default-running-datastore as a source";

        if-feature factory-default-as-datastore;

        leaf factory-default { type empty ;}

}

      [Qin]: So in this case, we don’t need to define capability identifier. Instead, we are using feature to indicate whether a new functionality is needed, right?

}



regards Balazs
On 2018. 10. 08. 11:51, Juergen Schoenwaelder wrote:

On Mon, Oct 08, 2018 at 09:36:08AM +0000, Qin Wu wrote:



The content of factory is related to all configuration datastore, if

the content of factory need to be related to operational datastore

as well, a separate factory datastore is needed, in my opinion.



This is too vague and does not help me. You need to explain what the

data flow is between other datastores.



I am talking about copy-config, not get-config, do you suggest to

define copy-datastore new operation? If the answer is yes, I will

agree the capability identifier is not needed.



If we need a better copy-config, we should create a better copy-config

instead of introducing multiple ways to refer to datastores. I know

that early versions of draft-ietf-netconf-nmda-netconf-06 mentioned

copy-config, I need to dig deeper why this was taken out at some point

in time.



/js



--

Balazs Lengyel                       Ericsson Hungary Ltd.

Senior Specialist

Mobile: +36-70-330-7909              email: Balazs.Lengyel@ericsson.com<mailto:Balazs.Lengyel@ericsson.com>