Subject: [netmod] YANG must work with NETCONF

From: Andy Bierman <[email-masked]>
Date: Fri, 14 Aug 2009 06:59:41 -0700

Hi,

There are several details in YANG that are legal,
yet they represent data models which cannot possibly
be supported on any NETCONF agent.

Mandatory top-level nodes are allowed in YANG
but not supportable in a NETCONF agent.
If an agent is free to choose what mandatory means,
then since all YANG modules need to
work with all conforming NETCONF implementations,
the top-level cannot be mandatory.

leafref objects are allowed to point at non-existent
nodes in YANG but this is not implementable on
the agent.  If the pointed-at object is not present,
then any object pointing at that object must also
be removed from the agent (ripple out until done).

YANG is already extremely difficult to learn.
It is way worse trying to explain to people
why their perfectly valid YANG module cannot
be supported by any NETCONF agent.

SMIv2 does not work this way.
You cannot use SMIv2 to construct valid
definitions which are not supportable in SNMP.
If SMIv2 says it's OK, then it MUST work on
a compliant SNMP agent.  YANG/NETCONF MUST work
the same way.

Andy

---

From: "Ersue, Mehmet (NSN - DE/Munich)" <[email-masked]>
Date: Fri, 14 Aug 2009 16:16:21 +0200

+1

Cheers,
Mehmet

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]] On Behalf Of ext Andy Bierman
> Sent: Friday, August 14, 2009 4:00 PM
> To: NETMOD Working Group
> Subject: [netmod] YANG must work with NETCONF
> 
> Hi,
> 
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
>

---

From: Martin Bjorklund <[email-masked]>
Date: Fri, 14 Aug 2009 16:35:24 +0200 (CEST)

Hi,

It's hard not to agree with the statement in the title.

> but not supportable in a NETCONF agent.

I disagree.  See the email thread "mandatory mess".  If you have a
top-level mandatory leaf, it MUST have a value in a valid database.
So, when the system has started and the NETCONF i/f is up and running,
the leaf MUST exist.  A user can then modify it, but not delete it.

> the top-level cannot be mandatory.

The agent is not free to choose what mandatory means.  It means that
the leaf MUST exist in a valid data store.

> be removed from the agent (ripple out until done).

I assume you refer to leafrefs which point to leafs with if-feature?
As I wrote in the other email thread, I think this is a valid concern,
and we should fix it.  I prefer to keep the discussion in one email
thread though.

> YANG is already extremely difficult to learn.

I don't know what you base this on, and I don't know what do to with
this comment.  From my experience with pioneer YANG writers, I
disagree though.

/martin

---

From: Andy Bierman <[email-masked]>
Date: Fri, 14 Aug 2009 07:58:31 -0700

> the leaf MUST exist.  A user can then modify it, but not delete it.

But mandatory means the agent may or may not create it.
Since all YANG modules need to work with all
valid NETCONF agents, no valid YANG module
can have a top-level module, becase a valid
agent implementation is allowed to choose not
to provide that node.

Consider that host address for the <ping> command.
You really think it makes sense for the agent to pick
an IP address at random and start pinging it,
in oder to provide a value?
Sometimes, the data modeler decides that there is no
possible default -- the agent must not choose
a value at random.  YANG needs to support that
type of data model.

> this comment.  From my experience with pioneer YANG writers, I

We shall see in the end of the review cycle
whether lots of people agree with you or not.

The issue about leafref combined with deviate not-supported was never
addressed.  This cannot be checked by a YANG compiler.
It is something the agent must check.

IMO, any leafref object that includes a path statement
with non-existent nodes (or any reason) is an invalid
object, and the agent must remove that object or shutdown.

Andy