Subject: [babel] problems with draft-babel-yang-model

From: t petch <[email-masked]>
Date: Mon, 13 Sep 2021 10:54:39 +0100

Apologies for my scruffy post last Friday afternoon - I was gettting 
overwhelmed by a PC with webmail that wants me to do nothing but Social 
Media!

This I-d has several references to a metric being NULL (no value).

Trouble is, YANG has no such concept.  I raised this on the Netmod list 
and there is agreement that YANG has no such concept but they also did 
the homework, that I had not done, and read RFC9046 which assumes that 
the concept of NULL exists.  It says ' if the data model uses zero to 
represent NULL values ..' but that is not the case here.  YANG uses zero 
to mean zero and does not have the concept of NULL.  Rather, if a value 
is not set, then NETCONF, RESTCONF return nothing which is not the same 
as setting it to NULL as can happen in other languages.  As was pointed 
out on the Netmod list, this absence of a value cannot be distinguished 
from access being denied by access control, one solution to which is 
using a YANG union with another data type.

Anyhow, for me, the wording in babel-yang-model is wrong.  It talks of 
metrics being 'NULL (no value)' but this is not a concept that exists in 
YANG.  I think that either this needs calling out in the data model, 
that there is no representation for NULL in YANG and so that aspect of 
the information model cannot be represented, or if the representation of 
NULL is required, then the YANG needs changing, e.g. by creating a union 
with e.g. a leaf of type 'empty' with the description explaining how 
NULL is modeled.

I have seen this sort of approach elsewhere, may be in LSR or TEAS, 
although I cannot lay my hand on an example just now.

Tom Petch