Subject: [Lime] reference a leaf instance that is not index or key of the list

From: Qin Wu <[email-masked]>
Date: Mon, 1 Jun 2015 13:02:47 +0000

Hi, All:
I am not sure we can reference a leaf instance that is not index or key of the list. When I run the following pyang command:
We have the following warning:
"
$ pyang -f uml ietf-gen-oam.yang -o goam.uml
Info: Did not find leafref target /if:interfaces-state/if:interface/if:admin-sta
tus
Info: Did not find leafref target /if:interfaces-state/if:interface/if:oper-stat
us
Traceback (most recent call last):
  File "c:/pyang-1.4.1/bin/pyang", line 333, in <module>
    run()
  File "c:/pyang-1.4.1/bin/pyang", line 328, in run
    os.rename(tmpfile, o.outfile)
WindowsError: [Error 183]
"
Becos admin-status and oper-status are both not index or key in the interface list. Also admin-status is a optional parameter defined in the interface list.
Comments?

-Qin

---

From: Qin Wu <[email-masked]>
Date: Tue, 16 Jun 2015 03:31:36 +0000

Hi, Lada:
Thanks for reply. Let me bring this discussion to the list.
-----邮件原件-----
发件人: Ladislav Lhotka [mailto:[email-masked]] 
发送时间: 2015年6月15日 16:29
收件人: Qin Wu
抄送: [email-masked]
主题: RE: [Lime] reference a leaf instance that is not index or key of the list

Hi Qin,

this problems seems to appear only in the uml plugin, so I am cc-ing its author Stefan Wallin.

[Qin]: Thanks, I realized output file goam.uml I want to creat has already existed before I run the pyang command below.
If I delete existing goam.uml.
The following error:
"
> WindowsError: [Error 183]
"
doesn't occur again. But uml plugin still can not find leafref target with the following flag:
"
> Info: Did not find leafref target 
> /if:interfaces-state/if:interface/if:admin-sta
> tus
> Info: Did not find leafref target 
> /if:interfaces-state/if:interface/if:oper-stat
> us
"

One comment: the ietf-gen-oam module in the draft has the caption "YANG Module of OAM" right before <CODE ENDS>. It shouldn't be there because it confuses tools like rfcstrip.

[Qin]: Good catch, will fix this in the next update.

Lada

> 发件人: Lime [mailto:[email-masked]] 代表 Qin Wu
> 发送时间: 2015年6月1日 21:03
> 收件人: [email-masked]
> 主题: [Lime] reference a leaf instance that is not index or key of the 
> list
>
> Hi, All:
> “
> Info: Did not find leafref target 
> /if:interfaces-state/if:interface/if:admin-sta
> tus
> Info: Did not find leafref target 
> /if:interfaces-state/if:interface/if:oper-stat
> us
> ”
> _______________________________________________
> Lime mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/lime

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