Subject: Re: [netmod] Any tool to test NETCONF/YANG RFC compliance?

From: "Sterne, Jason (Jason)" <[email-masked]>
Date: Wed, 17 Dec 2014 14:25:15 +0000

I haven't done it directly myself but some of our dev folks are using pyang to generate a schema from our yang files and then validating an <edit-config> response using xmllint.

Jason

-----Original Message-----
From: netmod [mailto:[email-masked]] On Behalf Of Ladislav Lhotka
Sent: Thursday, November 27, 2014 2:54 AM
To: Johnson Zhu
Cc: [email-masked]
Subject: Re: [netmod] Any tool to test NETCONF/YANG RFC compliance?

On 27 Nov 2014, at 08:20, Johnson Zhu <[email-masked]> wrote:

> Hi,
>  
> We are looking some third party tool to test NETCONF/YANG RFC compliance.

You can test data model compliance by saving protocol messages, such as replies to <get> or <get-config>, in a file and then use pyang for validating them. Here is a tutorial:

https://code.google.com/p/pyang/wiki/InstanceValidation

Lada

>  
> Any recommendation?
>  
> /Johnson
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

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

_______________________________________________
netmod mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/netmod

---

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 17 Dec 2014 15:31:03 +0100

> On 17 Dec 2014, at 15:25, Sterne, Jason (Jason) <[email-masked]> wrote:
> 

Yes, that’s exactly what I meant - unless your dev folks generate W3C XML Schema. The ‘xsd’ plugin in pyang is deprecated, DSDL schemas should be used instead.

Lada

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 17 Dec 2014 15:57:37 +0100 (CET)

Ladislav Lhotka <[email-masked]> wrote:
> > I haven't done it directly myself but some of our dev folks are using
> > pyang to generate a schema from our yang files and then validating an
> > <edit-config> response using xmllint.
> 
> Yes, that’s exactly what I meant - unless your dev folks generate W3C
> XML Schema. The ‘xsd’ plugin in pyang is deprecated, DSDL schemas
> should be used instead.

The xsd plugin is not only deprecated, it is broken.  All efforts have
gone into the dsdl plugin.  Use that one for validation.  We should
remove the xsd plugin in the next pyang release, in order to avoid
confusion.

/martin