Subject: [yang-doctors] tree documentation for YANG modules composed of groupings only.

From: Benoit Claise <[email-masked]>
Date: Mon, 11 Jul 2016 16:23:37 +0200

YANG-doctors,

Should pyang provide a tree for YANG modules composed of groupings only?
For example, how should the tree be documented in 
https://tools.ietf.org/html/draft-ietf-netconf-yang-patch-10 ?

pyang doesn't produce anything:
$ pyang -f tree [email-masked]
$

btw, same thing for pyang -f tree [email-masked]

Regards, benoit

---

From: "Giles Heron (giheron)" <[email-masked]>
Date: Mon, 11 Jul 2016 17:07:02 +0000

well - maybe we could create a different mode for that?

pyang -f tree shows the tree in the data store.     If there are only groupings then there’s no instantiation in the data store…

> On 11 Jul 2016, at 07:23, Benoit Claise (bclaise) <[email-masked]> wrote:
> 
> YANG-doctors,
> 
> For example, how should the tree be documented in https://tools.ietf.org/html/draft-ietf-netconf-yang-patch-10 ?
> 
> _______________________________________________
> yang-doctors mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/yang-doctors

---

From: Benoit Claise <[email-masked]>
Date: Mon, 11 Jul 2016 20:19:57 +0200

> well - maybe we could create a different mode for that?
Yes, that's exactly what I mean.
The key question is: what do we want to document in the RFCs?

Regards, Benoit

---

From: Martin Björklund <[email-masked]>
Date: Mon, 11 Jul 2016 22:31:58 +0200

I think i added an option to print groupings to pyang -f tree. Check the help. 

Benoit Claise <[email-masked]> skrev: (11 juli 2016 20:19:57 CEST)
>> pyang -f tree shows the tree in the data store.     If there are only
>groupings then there’s no instantiation in the data store…
>>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

---

From: Benoit Claise <[email-masked]>
Date: Tue, 12 Jul 2016 09:51:25 +0200

> I think i added an option to print groupings to pyang -f tree. Check the help.
Indeed.

pyang -f tree --tree-print-groupings [email-masked]
module: ietf-yang-patch
groupings:
   yang-patch
      +---- yang-patch
         +---- patch-id?   string
         +---- comment?    string
         +---- edit* [edit-id]
            +---- edit-id?     string
            +---- operation    enumeration
            +---- target       target-resource-offset
            +---- point?       target-resource-offset
            +---- where?       enumeration
            +---- value?

   yang-patch-status
      +---- yang-patch-status
         +---- patch-id?      string
         +---- (global-status)?
         |  +--:(global-errors)
         |  |  +---- errors
         |  |     +---- error*
         |  |        +---- error-type       enumeration
         |  |        +---- error-tag        string
         |  |        +---- error-app-tag?   string
         |  |        +---- error-path?      instance-identifier
         |  |        +---- error-message?   string
         |  |        +---- error-info?
         |  +--:(ok)
         |     +---- ok?            empty
         +---- edit-status
            +---- edit* [edit-id]
               +---- edit-id?   string
               +---- (edit-status-choice)?
                  +--:(ok)
                  |  +---- ok?        empty
                  +--:(errors)
                     +---- errors
                        +---- error*
                           +---- error-type       enumeration
                           +---- error-tag        string
                           +---- error-app-tag?   string
                           +---- error-path?      instance-identifier
                           +---- error-message?   string
                           +---- error-info?

Thanks, B.

---

From: Benoit Claise <[email-masked]>
Date: Tue, 12 Jul 2016 10:07:55 +0200

https://github.com/netmod-wg/rfc6087bis/issues/39

Regards, B.