[netmod] 答复: pls clarify get operation

"Fengchong (frank)" <frank.fengchong@huawei.com> Fri, 28 June 2019 09:19 UTC

Return-Path: <frank.fengchong@huawei.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0229612018B; Fri, 28 Jun 2019 02:19:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, 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 aWLmm7OHrWrK; Fri, 28 Jun 2019 02:19:19 -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 1185C120143; Fri, 28 Jun 2019 02:19:19 -0700 (PDT)
Received: from lhreml704-cah.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 867452FA5450332ADABA; Fri, 28 Jun 2019 10:19:17 +0100 (IST)
Received: from DGGEMM401-HUB.china.huawei.com (10.3.20.209) by lhreml704-cah.china.huawei.com (10.201.108.45) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 28 Jun 2019 10:19:14 +0100
Received: from DGGEMM513-MBX.china.huawei.com ([169.254.1.175]) by DGGEMM401-HUB.china.huawei.com ([10.3.20.209]) with mapi id 14.03.0439.000; Fri, 28 Jun 2019 17:17:32 +0800
From: "Fengchong (frank)" <frank.fengchong@huawei.com>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>, "netconf@ietf.org" <netconf@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
CC: "Zhangwei (SS)" <zhangwei70@huawei.com>
Thread-Topic: pls clarify get operation
Thread-Index: AdUsiu4JIzTUBFYNTIGSUYTtxnFLqwA1gt7QAApPi5AAAM+k8AAAh5VQAACDk+A=
Date: Fri, 28 Jun 2019 09:17:32 +0000
Message-ID: <5756FB984666AD4BB8E1D63E2E3AA3D001ED60B5@dggemm513-mbx.china.huawei.com>
References: <5756FB984666AD4BB8E1D63E2E3AA3D001ED5E20@dggemm513-mbx.china.huawei.com> <BYAPR11MB2631D3A01E398ADDBB294588B5FC0@BYAPR11MB2631.namprd11.prod.outlook.com> <5756FB984666AD4BB8E1D63E2E3AA3D001ED6060@dggemm513-mbx.china.huawei.com> <BYAPR11MB2631E697964372E2051C671AB5FC0@BYAPR11MB2631.namprd11.prod.outlook.com>
In-Reply-To: <BYAPR11MB2631E697964372E2051C671AB5FC0@BYAPR11MB2631.namprd11.prod.outlook.com>
Accept-Language: en-US
Content-Language: zh-CN
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [10.134.40.226]
Content-Type: multipart/related; boundary="_004_5756FB984666AD4BB8E1D63E2E3AA3D001ED60B5dggemm513mbxchi_"; type="multipart/alternative"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/-HrqktxOxfEixZPpqyW9Byzurpc>
Subject: [netmod] =?utf-8?b?562U5aSNOiBwbHMgY2xhcmlmeSBnZXQgIG9wZXJhdGlv?= =?utf-8?q?n?=
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Jun 2019 09:19:23 -0000

Hi Rob,
If we write a new NMDA-style YANG module,  this YANG module seems can’t be supported well in non-NMDA device(because no system-controlled data can be retrieved).
I think this thing will cause a lot of trouble to the implementation of the IETF models.
________________________________
华为技术有限公司 Huawei Technologies Co., Ltd.
[Company_logo]
个人签名:冯冲
手  机:13776612983
电子邮件:frank.fengchong@huawei.com
公司网址:www.huawei.com
________________________________
 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

发件人: Rob Wilton (rwilton) [mailto:rwilton@cisco.com]
发送时间: 2019年6月28日 17:10
收件人: Fengchong (frank) <frank.fengchong@huawei.com>om>; netconf@ietf.org; netmod@ietf.org
抄送: Zhangwei (SS) <zhangwei70@huawei.com>
主题: RE: pls clarify get operation

Hi Frank,

NMDA does not change the semantics of the <get> operation at all: I.e. the operation returns the contents of the <running> datastore combined with all the operational state as well.

Going outside the standards there are probably 2 pragmatic choices:
(1)    Implement <get> as above (but may be expensive to implement for a new device).
(2)    Don’t support the <get> operation at all, requiring users to use the <get-data> equivalent instead.  This was the informal long term plan, i.e. <get> will probably eventually be deprecated.

Regarding your last question, yes, you are right that it cannot return system-controlled data.  One option here is to use the NMDA YANG module as input to a conversion process that generates old IETF style YANG models with split config/state trees (i.e. like RFC 7223).

Thanks,
Rob


From: Fengchong (frank) <frank.fengchong@huawei.com<mailto:frank.fengchong@huawei.com>>
Sent: 28 June 2019 09:55
To: Rob Wilton (rwilton) <rwilton@cisco.com<mailto:rwilton@cisco.com>>; netconf@ietf.org<mailto:netconf@ietf.org>; netmod@ietf.org<mailto:netmod@ietf.org>
Cc: Zhangwei (SS) <zhangwei70@huawei.com<mailto:zhangwei70@huawei.com>>
Subject: 答复: pls clarify get operation

Hi Rob,
Thanks for your explanation.
You mean get operation only  report running configuration and state nodes in non-NMDA scenario.
But if in NMDA scenario, what would be reported when we use the same get operation  to retrieve information? The same with non-NMDA or report all configuration including user-controlled and  system-controlled?


Another question:
If we write a NMDA-style YANG module without config false copy, when we implement this YANG in non-NMDA device, perhaps we have no way to get the information of system-controlled data.

________________________________
华为技术有限公司 Huawei Technologies Co., Ltd.
[Company_logo]
个人签名:冯冲
手  机:13776612983
电子邮件:frank.fengchong@huawei.com<mailto:frank.fengchong@huawei.com>
公司网址:www.huawei.com<http://www.huawei.com>
________________________________
 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

发件人: Rob Wilton (rwilton) [mailto:rwilton@cisco.com]
发送时间: 2019年6月28日 16:39
收件人: Fengchong (frank) <frank.fengchong@huawei.com<mailto:frank.fengchong@huawei.com>>; netconf@ietf.org<mailto:netconf@ietf.org>; netmod@ietf.org<mailto:netmod@ietf.org>
抄送: Zhangwei (SS) <zhangwei70@huawei.com<mailto:zhangwei70@huawei.com>>
主题: RE: pls clarify get operation

Hi Frank,

Pre NMDA:
-          You have a the <running> datastore, along with some others like <candidate> and <startup> that you can ignore for the purposes of this discussion.
-          The <running> datastore can only contains data for schema nodes that are marked as “config true” in YANG (i.e. “rw” in your tree output below).
-          The system may also have some operational state data that is marked as “config false” in YANG (i.e. “ro” in your tree output below).

The NETCONF <get-config> operation returns the contents of the <running> datastore.
The NETCONF <get> operation returns the contents of the <running> datastore combined with all the operational state as well.  Filters can be applied to return a subset of the data.

Regarding your question about user created configuration vs system created configuration, it depends on whether the devices instantiates the configuration in <running> or not.  If it does, then it would be returned in <get> and <get-config> operations.  If it doesn’t then it would not.  Different vendors/devices will likely implement this in different ways.

Generally, I think that <running> should only contain the configuration explicitly configured by the operator’s systems.  But this means that there isn’t a clean way to represent system created configuration or applied configuration, unless you make a config false copy of every config true node in YANG.  This is approach that was taken by the original IETF YANG models (e.g. RFC 7223) before they were superseded by NMDA, and also the OpenConfig YANG models (but using a different structure – which also struggles to cleanly represent system created configuration data).

The NMDA architecture was written to solve this problem in a clean way without requiring duplication in the YANG data models.

Hopefully this helps clarify.

Thanks,
Rob


From: netmod <netmod-bounces@ietf.org<mailto:netmod-bounces@ietf.org>> On Behalf Of Fengchong (frank)
Sent: 28 June 2019 04:29
To: netconf@ietf.org<mailto:netconf@ietf.org>; netmod@ietf.org<mailto:netmod@ietf.org>
Cc: Zhangwei (SS) <zhangwei70@huawei.com<mailto:zhangwei70@huawei.com>>
Subject: [netmod] 答复: pls clarify get operation

Hi all,

     Pls clarify this question. I have been confused for a long time.

________________________________
华为技术有限公司 Huawei Technologies Co., Ltd.
[Company_logo]
个人签名:冯冲
手  机:13776612983
电子邮件:frank.fengchong@huawei.com<mailto:frank.fengchong@huawei.com>
公司网址:www.huawei.com<http://www.huawei.com>
________________________________
 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!

发件人: Fengchong (frank)
发送时间: 2019年6月27日 9:59
收件人: 'netconf@ietf.org' <netconf@ietf.org<mailto:netconf@ietf.org>>; netmod@ietf.org<mailto:netmod@ietf.org>
抄送: Yangshouchuan <yangshouchuan@huawei.com<mailto:yangshouchuan@huawei.com>>; Zhangwei (SS) <zhangwei70@huawei.com<mailto:zhangwei70@huawei.com>>
主题: pls clarify get operation

Hi all,
In RFC6241, get operation is defined as:
7.7<https://tools.ietf.org/html/rfc6241#section-7.7>.7>.  <get>

   Description:  Retrieve running configuration and device state

      information.
This description is too simply, so I think it should be clarified.

The case is: a data node modelled by one yang can be configured by user, but also can be created/modified by system or other protocols. If client issues get operation to retrieve this node,
          The data is created/modified by system or other protocols SHOULD be returned?
          For example:
          Rib can be configured by user and also can be created by routing protocols. In RFC 8349, the rib list is defined as:



      +--rw ribs

         +--rw rib* [name]

            +--rw name              string

            +--rw address-family?   identityref

            +--ro default-rib?      boolean {multiple-ribs}?

            +--ro routes

            |  +--ro route*

            |        ...

            +---x active-route

            |  +---w input

            |  |  +---w v4ur:destination-address?   inet:ipv4-address

            |  |  +---w v6ur:destination-address?   inet:ipv6-address

            |  +--ro output

            |        ...

            +--rw description?      string



       If client issued get operation to retrieve ribs from non-NMDA device, rib instance created by routing protocols should be returned?

       Another associated question: If client issued get-config operation from non-NMDA device, only user-controlled rib instance should be returned?