Subject: [yang-doctors] yang lint Warnings

From: "Acee Lindem (acee)" <[email-masked]>
Date: Mon, 22 Oct 2018 22:38:46 +0000

Can someone tell me what this means and how to rectify it?

warn: Argument #1 of xpath_derived_from not a node-set as expected.
warn: Previous warning generated by XPath function "derived-from('ietf-ospf:../../header/type', 'ospfv3-e-router-lsa')".

Here is the YANG snippet:

grouping ospfv3-e-lsa-body {
       description "OSPFv3 Extended LSA body.";
       container e-router {
         when  "derived-from('ospf:../../header/type', "
           + "'ospfv3-e-router-lsa')" {
           description "Only valid for OSPFv3 Extended-Router LSAs";
         }

Actually, I don’t think there is a problem here and yanglint is having problems with identifies across multiple models.

Thanks,
Acee

---

From: Andy Bierman <[email-masked]>
Date: Mon, 22 Oct 2018 16:13:22 -0700

Hi,

#1) remove single quotes from the first param :
'ospf:../../header/type'

#2) ospf:..
not sure a prefix on the parent shortcut .. is OK
Should probably be:

  ../../ospf:header/ospf:type

Andy

On Mon, Oct 22, 2018 at 3:38 PM, Acee Lindem (acee) <[email-masked]> wrote:

> warn: Previous warning generated by XPath function
> "derived-from('ietf-ospf:../../header/type', 'ospfv3-e-router-lsa')".
>
>
>
> Actually, I don’t think there is a problem here and yanglint is having
> problems with identifies across multiple models.
>
>
>
> Thanks,
>
> Acee
>
> _______________________________________________
> yang-doctors mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/yang-doctors
>
>

---

From: "Acee Lindem (acee)" <[email-masked]>
Date: Mon, 22 Oct 2018 23:42:51 +0000

Hey Andy,
With these changes, the yanglint validation came back with 0 warnings. The addition of the single quotes was a misguided attempt to resolve a previous warning.
Thanks Much,
Acee

From: Andy Bierman <[email-masked]>
Date: Monday, October 22, 2018 at 7:13 PM
To: Acee Lindem <[email-masked]>
Cc: YANG Doctors <[email-masked]>
Subject: Re: [yang-doctors] yang lint Warnings

Hi,

#2) ospf:..

Andy

On Mon, Oct 22, 2018 at 3:38 PM, Acee Lindem (acee) <[email-masked]<mailto:[email-masked]>> wrote:
Can someone tell me what this means and how to rectify it?

Thanks,
Acee

_______________________________________________
yang-doctors mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/yang-doctors