Subject: [netmod] Schema Mount Point Instance Yang Library Clarification

From: Rohit R Ranade <[email-masked]>
Date: Wed, 24 Apr 2019 04:18:07 +0000

Hi All,

In https://tools.ietf.org/html/rfc8528#section-4, a below example is shown for parent references,

"
     +--rw interfaces
     |  +--rw interface* [name]
     |     ...
     +--rw network-instances
        +--rw network-instance* [name]
           +--rw name
           +--mp root
              +--rw routing
                 ...

"
Consider a simple case where the ietf-routing module and ietf-ospf module are mounted as part of network-instance of a L3vpn. Also consider that for ietf-ospf , it has some interface configuration as shown below.
This needs parent-references , since the interface configuration is in the parent data-tree of mount-point.

module: ietf-ospf
   augment /rt:routing/rt:control-plane-protocols/
            rt:control-plane-protocol:
     +--rw ospf
        +--rw areas
        |  +--rw area* [area-id]
        |     +--rw interfaces
        |        +--rw interface* [name]
        |           +--rw name     if:interface-ref

Since the YANG library "under" the mount-point-instance has to be complete, I was thinking that the YANG library under the mount-point will have the "ietf-interfaces" YANG module. Since the "ietf-interfaces" module under the network-instance mount-point may not make sense,  the "conformance-type" for it will be "import" instead of "implement".

Another statement though confuses me , where the argument of  "presence" statement of "shared-schema",
""The mounted schema together with the 'parent-reference'
                make up the schema for this mount point.";"  ==> Does this mean that YANG Library of the mount-point-instance should not have "ietf-interfaces" in this case ? This may make the client work complicated.

With Regards,
Rohit

---

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 24 Apr 2019 09:09:58 +0200

Hi Rohit,

Rohit R Ranade <[email-masked]> writes:

> Since the YANG library "under" the mount-point-instance has to be
> complete, I was thinking that the YANG library under the mount-point
> will have the "ietf-interfaces" YANG module. Since the
> "ietf-interfaces" module under the network-instance mount-point may
> not make sense,  the "conformance-type" for it will be "import"
> instead of "implement".

Yes, I think this is correct: the ietf-ospf module imports the
ietf-interfaces module, so the latter has to be specified in the YANG
library of the mounted schema with "import" conformance.

>                 make up the schema for this mount point.";"  ==> Does

This is wrong, parent-reference adds nothing to the schema, only to the
accessible tree for XPath evaluations.

Lada

> this mean that YANG Library of the mount-point-instance should not
> have "ietf-interfaces" in this case ? This may make the client work
> complicated.
>
>
> With Regards,
> Rohit
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

---

From: Rohit R Ranade <[email-masked]>
Date: Wed, 24 Apr 2019 08:52:02 +0000

Hi Lada,

Thank you for your response. Please find inline.

-----Original Message-----
From: Ladislav Lhotka [mailto:[email-masked]] 
Sent: 24 April 2019 12:40
To: Rohit R Ranade <[email-masked]>; [email-masked]
Subject: Re: [netmod] Schema Mount Point Instance Yang Library Clarification

Hi Rohit,

> not make sense,  the "conformance-type" for it will be "import"

Yes, I think this is correct: the ietf-ospf module imports the ietf-interfaces module, so the latter has to be specified in the YANG library of the mounted schema with "import" conformance.

>
> Another statement though confuses me , where the argument of 
> "presence" statement of "shared-schema", ""The mounted schema together 
> with the 'parent-reference'

This is wrong, parent-reference adds nothing to the schema, only to the accessible tree for XPath evaluations.
[Rohit R Ranade] So this needs to be corrected by an errata ?

Lada

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 25 Apr 2019 09:21:47 +0200

On Wed, 2019-04-24 at 08:52 +0000, Rohit R Ranade wrote:
> > Consider a simple case where the ietf-routing module and ietf-ospf module
> > are mounted as part of network-instance of a L3vpn. Also consider that for
> > ietf-ospf , it has some interface configuration as shown below.
> Yes, I think this is correct: the ietf-ospf module imports the ietf-interfaces 
> module, so the latter has to be specified in the YANG library of the mounted
> schema with "import" conformance.
> 

This sentence is in the module text, so it would require a new revision in order
to be really effective. My suggestion is to wait until more (and possibly more
substantial) changes accumulate.

Lada