Subject: [netconf] leafrefed data item in YANG Push

From: Qin Wu <[email-masked]>
Date: Fri, 13 Dec 2019 04:08:38 +0000

Hello:
Can I subscribe to specific data item that refer to data item in another YANG module with other data item in the same subscription?
Module bar {
import foo {prefix ex;}
     leaf cc{type int8;}
     leaf bb {
       type leafref {
         path "../ex:aa";
       }
     }
}

Module foo {
     leaf aa {
       type int8;
     }
}
In addition, If there is dangling reference, e.g., leaf bb refer to leaf aa which doesn't exist, how this failure is handled by the server
and exposed to the client?

-Qin

---

From: "Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]>
Date: Fri, 13 Dec 2019 19:20:17 +0000

Hi Qin,

For subscriptions, I don't think it matters if 2 leafs are associated with each other via a leafref.  When you subscribe to each of those leafs, it is just like subscribing to any other 2 leafs (that aren't associated with eachother).

About the 'dangling reference': that should be accepted into the running datastore. It would fail validation. So it can only exist in the candidate.

Jason

From: netconf <[email-masked]> On Behalf Of Qin Wu
Sent: Thursday, December 12, 2019 11:09 PM
To: [email-masked]
Subject: [netconf] leafrefed data item in YANG Push

Hello:

Module foo {
     leaf aa {
       type int8;
     }
}

-Qin

---

From: "Sterne, Jason (Nokia - CA/Ottawa)" <[email-masked]>
Date: Thu, 19 Dec 2019 17:54:12 +0000

This thread has moved on but a minor correction to my reply below.  I meant to say "that should *not* be accepted" 😊

From: netconf <[email-masked]> On Behalf Of Sterne, Jason (Nokia - CA/Ottawa)
Sent: Friday, December 13, 2019 2:20 PM
To: Qin Wu <[email-masked]>; [email-masked]
Subject: Re: [netconf] leafrefed data item in YANG Push

Hi Qin,

Jason

From: netconf <[email-masked]<mailto:[email-masked]>> On Behalf Of Qin Wu
Sent: Thursday, December 12, 2019 11:09 PM
To: [email-masked]<mailto:[email-masked]>
Subject: [netconf] leafrefed data item in YANG Push

Hello:

Module foo {
     leaf aa {
       type int8;
     }
}
In addition, If there is dangling reference, e.g., leaf bb refer to leaf aa which doesn’t exist, how this failure is handled by the server
and exposed to the client?

-Qin