Subject: [netmod] capability string for imports

From: David Reid <[email-masked]>
Date: Wed, 17 Oct 2012 14:40:00 -0400

I have a question about the capability string advertised in the <hello>
message in the case where a YANG module is only needed for importing
a typedef. I know this has been discussed before, but I'm not sure if
there was a resolution

Here is an example:

I want to implement TCP-ESTATS-MIB (RFC 4898) in my netconf server.

TCP-ESTATS-MIB imports ZeroBasedCounter64 from HCNUM-TC
TCP-ESTATS-MIB imports ZeroBasedCounter32 from RMON2-MIB
RMON2-MIB imports OwnerString from RMON-MIB
(there's more, but that's enough for the example)

I convert all of the above MIB modules to yang (following RFC 6643) and
build the netconf server with support for TCP-ESTATS-MIB.yang.

In the <hello> message, clearly I have to advertise TCP-ESTATS-MIB.yang.
What about the others? It seems wrong to advertise RMON2-MIB.yang, yet
the netconf server really needs information from that module.

-David Reid

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 17 Oct 2012 20:50:49 +0200 (CEST)

> the netconf server really needs information from that module.

IMO, you should not advertise e.g. RMON2-MIB.

You advertise TCP-ESTATS-MIB, which means that you implement the data
nodes (and rpcs, notifs) in that module.  But if you implement this
module, it is obvious that you also use OwnerString from RMON2-MIB, so
there is no point in advertising RMON2-MIB in order to communicate
this to the client.

/martin

---

From: Andy Bierman <[email-masked]>
Date: Wed, 17 Oct 2012 12:16:14 -0700

> there is no point in advertising RMON2-MIB in order to communicate
I disagree that this solves the problem, especially if import-by-revision
is not used everywhere.  The client needs the revision and namespace.

The client needs to match XML namespace URI in the module capability URI
to the YANG module namepsace-stmt to be sure it is really dealing
with the same module as specified in the import-stmt.

The WG was split last time this was discussed between those who think
imports should be advertised and those who don't.  There are some
corner cases, like what if A and B both import C and the version of C used
by B is updated, but not the version used by A.  Is this allowed?
Unless import-by-revision is used, there is no way to tell which version of
C
is used by A and which by B, even if both C versions are advertised.

We plan to augment the /netconf-state/schemas/schema list to solve this
problem.  Not as good as the <hello> but does not impact existing clients
at all.

> /martin

Andy

>
>
>
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
>