Subject: [netmod] Yang mount / ysdl questions

From: "Xufeng Liu" <[email-masked]>
Date: Fri, 19 Feb 2016 11:10:03 -0500

While realizing that the mechanism specified in the two drafts is very
useful for modeling, I have a few questions that are common to both
approaches:

-        How to mount one tree (but not other trees) from a module? For
example, I may want to mount interfaces to one mounting point, but
interfaces-state to a different mounting point.

-        When the mounting module is augmented by another module, what will
happen to these augmentations after mounting? What will be the  XPath to
refer a node in the mounting module (from mounting module, and from mounted
module)? 

-        When a mounting module is used to mount to a mounting-point in
my-module, how can the system also expose the mounting model in the original
form, i.e. at the root level?

Thanks,

- Xufeng

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 22 Feb 2016 09:35:46 +0100 (CET)

Hi,

> interfaces-state to a different mounting point.

Currently this is not possible.  If you want to use such a mechanism
to mount selected subtrees from a module, it is not clear that this
will work - there might be references from subtree A to subtree B, so
if subtree B is not mounted, it is unclear how such references should
be handled.

> refer a node in the mounting module (from mounting module, and from mounted

If the augmenting module it not mounted, nothing happens - it is just
not there.  If the augmenting module is also mounted, it will be
augment the mounted module.  For example, suppose ietf-interfaces and
ietf-ip are both mounted at /foo.  The resulting tree would be:

  +--rw foo
     +--rw if:interfaces
        +--rw if:interface* [name]
           ...
           +--rw ip:ipv4!

> form, i.e. at the root level?

The system exposes all "top-level" modules as usual - just list them
in the top-level YANG library.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Mon, 22 Feb 2016 12:57:11 +0100

> if subtree B is not mounted, it is unclear how such references should

Same in YSDL.

>         +--rw if:interface* [name]

It's also similar in YSDL. Augments apply only within a single schema,
which is essentially what we have now.

> in the top-level YANG library.

In YSDL one would need to be able to specify "/" as the root node for
the "mounted" schema. It's not allowed in -00 but it might be a useful
extension. I don't see any reason why it shouldn't work.

Lada

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

---

From: "Xufeng Liu" <[email-masked]>
Date: Tue, 23 Feb 2016 14:53:01 -0500

Thanks Martin and Lada.

> -----Original Message-----
> From: Ladislav Lhotka [mailto:[email-masked]]
> Sent: Monday, February 22, 2016 6:57 AM
> To: Martin Bjorklund <[email-masked]>; [email-masked]
> Cc: [email-masked]; [email-masked]; draft-bjorklund-
> [email-masked]
> Subject: Re: [netmod] Yang mount / ysdl questions
> 
> >> While realizing that the mechanism specified in the two drafts is
> >> very useful for modeling, I have a few questions that are common to
> >> both
> >> approaches:
> >>
> >>
> >>

[Xufeng] Understand the difficulties, but the capability could be useful.
> >> happen to these augmentations after mounting? What will be the  XPath
> >> to refer a node in the mounting module (from mounting module, and
> >> from mounted module)?
> >
which is
> essentially what we have now.
[Xufeng] This would be good. Thanks. Can this description put into the
document?
> >> my-module, how can the system also expose the mounting model in the
> >> original form, i.e. at the root level?
> >
> In YSDL one would need to be able to specify "/" as the root node for the
> "mounted" schema. It's not allowed in -00 but it might be a useful
extension. I
> don't see any reason why it shouldn't work.
> 
[Xufeng] I think that it would be desirable to have the options to do
either. Thanks.