Rob,

Thank you very much!

Regards,
Alia

On Thu, Sep 21, 2017 at 10:02 AM, Robert Wilton <[email protected]> wrote:

> Hi Alia, authors,
>
> OK, so the tooling is still a bit rough and ready, but I've tweaked it a
> bit and run it on the VRRP module.
>
> The tooling itself:
> (1) Alpha/beta level quality, generally it seems to work OK, but the
> results need to be carefully checked (e.g. by diffing the old and new
> modules to see what has changed).
>
> (2) Is just a fork of pyang with some extra modules (it is sync'ed with
> Martin's latest pyang github repository today).
>
> (3) Current code is available at: https://github.com/rgwilton/pyang
> - Feel free to clone, extend, pull requests, etc.
>
> (4) How does it work?:
> - It looks through the parallel config/state trees finding nodes with the
> same names on equivalent paths.
> - It that match then it checks description and reference and merges them
> together.  If it merges it flags it with a "FIX ME" comment.
> - It also tries to handle augmentations and groupings, by heuristically
> checking for "-state" in the grouping name.
>
> (5) Stuff that is known not to work:
> - It should, but currently doesn't, validate that the same type is used
> between the config and state leaves!
> - I've not tried it with submodules, I'm not sure how it will fare.
>
> (6) Generically it is used like this (from the directory that contains the
> split YANG module):
> - clone the github repository above, and ensure pyang's normal
> dependencies are available.
> - run these commands:
> cd <pyang directory>
> source env.sh
> cd <yang module directory>
> "pyang -f yang --max-line-length 69 --ietf-split-to-combined-tree
> --remove-state-nodes <src.yang> > <tgt.yang>"
>
> (7) Actual example steps on VRRP (draft-ietf-rtgwg-yang-vrrp-04), module
> extracted by rcfstrip:
>
> # Generate a 'clean' tree for more informative diff (or else many
> whitespace changes are reported).
> pyang -f yang --ietf --max-line-length 69 [email protected] >
> [email protected]
> pyang -f yang --ietf-split-to-combined-tree --remove-state-nodes
> --max-line-length 69 [email protected] >
> [email protected]
> diff [email protected] [email protected] >
> vrrp-nmda.diff
>
> # Checking the tree output is also sensible.
> pyang -f tree [email protected] > [email protected]
> pyang -f tree --ietf [email protected] >
> [email protected]
> diff [email protected] [email protected] >
> vrrp-nmda-tree.diff
>
> The new VRRP YANG module, New tree output, model diff, and tree diff are
> all attached.
>
> Requires manual fixing:
> - revision date/history
> - a few "FIX ME" comments to merge config/state description strings.
> - check that leaf types match for any config/state nodes on equivalent
> paths where the state leaf has been removed.
>
> Thanks,
> Rob
>
>
>
> On 20/09/2017 17:35, Alia Atlas wrote:
>
>> As is customary, I have done my AD review of
>> draft-ietf-rtgwg-yang-vrrp-04. First, I would like to thank the authors,
>> Xufeng, Athanasios, Ravi, Acee,and Mingui, as well as the WG for their work
>> on this draft.  It is clear and well-written.
>>
>> My one issue is that it does not conform to the NMDA guidelines. I know
>> that the transformation can be done largely programmatically - and Acee &
>> Xufeng are quite familiar with the details.  I've also cc'd Rob Wilton who
>> has some tooling to potentially help.
>>
>> From the shepherd's report, I understand that there is an implementation.
>> That implies that the existing model should be in the appendix.
>>
>> I would be delighted to forward this draft to IETF Last Call (and my
>> apologies for the long delay in review) after it has been updated.
>>
>> Thanks,
>> Alia
>>
>
>
_______________________________________________
rtgwg mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/rtgwg

Reply via email to