Subject: Re: [netmod] WG Last Call: draft-ietf-netmod-yang-data-ext version 4

From: Qin Wu <[email-masked]>
Date: Wed, 2 Oct 2019 04:31:27 +0000

Hi, Auhors:
I have read the latest version and have the following comments:

1.       Try to understand the difference between anydata and YANG data structure extension? Is YANG data structure extension targeted to specify the format which can not be represented by anydata?

When will we use anydata? When will we use YANG data structure extension, would this be clarified in the introduction section.

2.        Why is YANG data structure extension not part of RFC7950 or RFC7950bis? It seems two top level YANG statements are introduced in this draft.

3.       In the introduction section, when we say there is no assumption that a YANG data structure can only be used as a top-level

   abstraction, instead of nested within some other data structure. I am wondering what other data structure looks like? Is other data structure specified by YANG data structure defined in this draft or data structure defined by anydata?

If the example is A.5, please add reference to Appendix A.5 in the introduction section.

4.       When we say YANG data structure extension is only valid as a top-level statement, does this conflict with YANG data structure can be nested within some other data structure?

5.       Why augment-structure is also only valid as a top-level statement, why augment-structure is not substatement of YANG data structure? Can we use augment-structure with other data structure instead of YANG data structure defined in this document?

6.       In A.5, how error-code is hooked into rpc-error? Why not use augment-structure in this case? Describe path statement to indicate the relationship with rpc error?

-Qin

发件人: netmod [mailto:[email-masked]] 代表 Joel Jaeggli
发送时间: 2019年9月27日 13:32
收件人: NETMOD Working Group <[email-masked]>
主题: [netmod] WG Last Call: draft-ietf-netmod-yang-data-ext version 4

All,

This starts a two week working group last call for  draft-ietf-netmod-yang-data-ext-04

The working group last call ends on  Friday October 11th 2019.  Please send your comments to the working group mailing list.

Positive comments, e.g., "I've reviewed this document and believe it is ready for publication", are welcome!  This is useful and important, even from authors.

https://tools.ietf.org/html/draft-ietf-netmod-yang-data-ext-04

The diff from 03, produced prior to IETF 105 is available here:

https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-netmod-yang-data-ext-04.txt

Thanks
Joel

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 03 Oct 2019 13:31:18 +0200 (CEST)

Hi,

Thank you for your reviewe.  Comments inline.

Qin Wu <[email-masked]> wrote:
> 1.  Try to understand the difference between anydata and YANG data
> structure extension? Is YANG data structure extension targeted to
> specify the format which can not be represented by anydata?
> 
> When will we use anydata? When will we use YANG data structure
> extension, would this be clarified in the introduction section.

The Introduction says:

   There is a need for standard mechanisms to allow the definition of
   abstract data that is not intended to be implemented as configuration
   or operational state.

(Also note that 'anydata' doesn't define what goes into the anydata
node; a sx:structure has well-defined content)

> 2.  Why is YANG data structure extension not part of RFC7950 or
> RFC7950bis? It seems two top level YANG statements are introduced in
> this draft.

Well, we can't change history and include it in 7950, and there is no
7950bis being worked on.  If/when that happens, this statement can
possibly go into that document.  But we don't want to wait for that to
happen.

> 3.  In the introduction section, when we say there is no assumption
> that a YANG data structure can only be used as a top-level
> abstraction, instead of nested within some other data structure. I am
> wondering what other data structure looks like? Is other data
> structure specified by YANG data structure defined in this draft or
> data structure defined by anydata?

We don't make any assumptions on how this is done.  The new statement
simply defines a structure; how it is used is up to the designer.

> 4.  When we say YANG data structure extension is only valid as a
> top-level statement, does this conflict with YANG data structure can
> be nested within some other data structure?

No.  This just refers to how the grammar is done - sx:structure can
only appear on the top-level in a module or submodule.

> 5.  Why augment-structure is also only valid as a top-level statement,
> why augment-structure is not substatement of YANG data structure?

I don't think augment-structure would make any sense within a
structure statement.

> Can
> we use augment-structure with other data structure instead of YANG
> data structure defined in this document?

No, note how the description of augment-structure says:

  This extension is used to specify an augmentation to YANG data
  structure defined with the 'structure' statement.

> 6.  In A.5, how error-code is hooked into rpc-error?

Only by text; there is no formal way to do this:

   The following example defines a data structure with error
   information, that can be included in an <error-info> element in an
   <rpc-error>.

Also note that this is just an example...

> Why not use
> augment-structure in this case?

There is no sx:structure to augment.

/martin

> Describe path statement to indicate
> the relationship with rpc error?
> 
> -Qin
> 
> 
> The working group last call ends on Friday October 11th 2019.  Please
> send your comments to the working group mailing list.
> 
> Positive comments, e.g., "I've reviewed this document and believe it
> is ready for publication", are welcome!  This is useful and important,
> even from authors.
>