Subject: [Netconf] A question about edit-config

From: "fengchong (C)" <[email-masked]>
Date: Tue, 8 Nov 2016 03:45:00 +0000

Hi all,

   I have a question about edit-config’s config element, In RFC 6241:

config:  A hierarchy of configuration data as defined by one of

         the device's data models.  The contents MUST be placed in an

         appropriate namespace, to allow the device to detect the

         appropriate data model, and the contents MUST follow the

         constraints of that data model, as defined by its capability

         definition.  Capabilities are discussed in Section 8<https://tools.ietf.org/html/rfc6241#section-8>.

if it as defined by this section, then one edit-config operation can only operate one data model?

If I want to operate data tree defined by more than one data models, should I send mutiple edit-config rpc calls?

________________________________
冯冲
华为技术有限公司 Huawei Technologies Co., Ltd.
[Company_logo]

Phone:
Fax:
Mobile: 18519117316
Email: [email-masked]
地址：南京市软件大道101号华为南京基地 邮编：210001
Huawei Technologies Co., Ltd.

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!

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 08 Nov 2016 09:26:36 +0100 (CET)

"fengchong (C)" <[email-masked]> wrote:
>          definition.  Capabilities are discussed in Section
>          8<https://tools.ietf.org/html/rfc6241#section-8>.
> 
> 

I think this text is unfortunate, and the intention is not that the
nodes in <config> must be restricted to data from a single "data
model", if we by "data model" mean "YANG module" (the rest of the
document seems to use this terminology).

For example, if this restriction was true, how could we ever change
anything from ietf-ip, which augments ietf-interfaces?

Maybe we should file an errata:

OLD:

      config:  A hierarchy of configuration data as defined by one of
         the device's data models.

NEW:

      config:  A hierarchy of configuration data as defined by one or
         more of the device's data models. 

/martin

> 
> If I want to operate data tree defined by more than one data models,
> should I send mutiple edit-config rpc calls?
> 
> 
> 
> 
> 
> 
>

---

From: "fengchong (C)" <[email-masked]>
Date: Tue, 8 Nov 2016 09:21:49 +0000

Martin,
   Thanks a lot. I have another question. 
   Data trees defined by the same top level node can appear multiple times in config tag?
For example:
   <config>
     <top xmlns="http://example.com">
      ....
     </top>
     <top xmlns = "http://example.com">
     ...
     </top>
  </config>
-----邮件原件-----
发件人: Martin Bjorklund [mailto:[email-masked]] 
发送时间: 2016年11月8日 16:27
收件人: fengchong (C)
抄送: [email-masked]
主题: Re: [Netconf] A question about edit-config

> only operate one data model?

I think this text is unfortunate, and the intention is not that the nodes in <config> must be restricted to data from a single "data model", if we by "data model" mean "YANG module" (the rest of the document seems to use this terminology).

For example, if this restriction was true, how could we ever change anything from ietf-ip, which augments ietf-interfaces?

OLD:

NEW:

/martin

> 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!

---

From: "Bert Wijnen (IETF)" <[email-masked]>
Date: Tue, 8 Nov 2016 10:44:22 +0100

I remember in SNMP/SMI days, we had similar issues/concerns
when talking about the MIB and the MIB Modules.

The MIB was/is the combination off all data modules.
A MIB module was/is a small part of the whole MIB.

I also saw a mix of YANG data model and YANG data module in a recent document.
Clearly, in some cases the intent was to refere to the complete YANG Data Model where
at other times the intent was (most probably) to refere to a single YANG Data Module.

When I was AD, some people thought I was a nitpicker when I ws vehement about
the terms MIB and MIB Module.

I think we see similar things here.

It might be good/wise to make a clear distinction.

My 2cents
Bert

On 08/11/2016 09:26, Martin Bjorklund wrote:
>> HUAWEI, which
>> please notify the sender by
> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 08 Nov 2016 10:43:41 +0100 (CET)

>      <top xmlns = "http://example.com">

Yes, but note this text:

      If the <edit-config> operation contains multiple sub-operations
      that apply to the same conceptual node in the underlying data
      model, then the result of the operation is undefined (i.e.,
      outside the scope of the NETCONF protocol).

This means that if do for example:

   <config>
       <foo>42</foo>
       <foo>4711</foo>
     </top>
   </config>
   
it is not defined what the result will be.  But doing:

   <config>
       <foo>42</foo>
       <bar>hello</bar
     </top>
   </config>
   
is fine.

/martin

---

From: "Jonathan Hansford" <[email-masked]>
Date: Tue, 8 Nov 2016 10:06:20 -0000

Of course, this is exacerbated in YANG in that "model" and "module" are very similar words and it is therefore easy for the eyes to read one and the mind to interpret it as the other, especially if one is expecting the word to be the latter. Would it be better in future to enforce the distinction a little more clearly by talking about e.g. a "YANG data model" and a "YANG module"?

Jonathan

> -----Original Message-----
> From: Netconf [mailto:[email-masked]] On Behalf Of Bert Wijnen
> (IETF)
> Sent: 08 November 2016 09:44
> To: Martin Bjorklund <[email-masked]>; [email-masked]
> Cc: [email-masked]
> Subject: Re: [Netconf] A question about edit-config
> 
> I remember in SNMP/SMI days, we had similar issues/concerns when talking
> about the MIB and the MIB Modules.
> 
> Clearly, in some cases the intent was to refere to the complete YANG Data
> Model where at other times the intent was (most probably) to refere to a
> single YANG Data Module.
> 
> When I was AD, some people thought I was a nitpicker when I ws vehement
> about the terms MIB and MIB Module.
> 
> >> 本邮件及其附件含有华为公司的保密信息，仅限于发送给上面地
> 址中列出的个人
> >> 或群组。禁
> >> 止任何其他人以任何形式使用（包括但不限于全部或部分地泄露
> 、复制、或散发）
> >> 本邮件中

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 8 Nov 2016 11:42:12 +0100

> On 8 Nov 2016, at 11:06, Jonathan Hansford <[email-masked]> wrote:
> 

Yes, and we should also make clear that a data model in YANG context is defined by a YANG Library instance (and perhaps schema mount in the future).

Lada 

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C