Hi Lada,


> On 2021-11-26, at 09:48, Ladislav Lhotka <ladislav.lho...@nic.cz> wrote:
> 
> Carsten Bormann <c...@tzi.org> writes:
> 
>> On 2021-11-24, at 09:13, Ladislav Lhotka <ladislav.lho...@nic.cz> wrote:
>>> 
>>> Please let me know what you think about this.
>> 
>> I think it is amazing.
>> 
>> So for each registry, you have
>> 
>> — manually extracted an information model and kept that in your head,
> 
> Well, my old head doesn't serve me that well anymore, I was just looking into 
> the registry web page and XML. 

Indeed, so you had to apply human intelligence to produce information that is 
not available for the registry.

>> — written code that translates the information you could extract from the 
>> XML form of the registry into a YANG data model (note that this data model 
>> is not defining the registry, but it is the translated content of the 
>> registry)
> 
> Right, and IANA needn't be involved at all.

In the long run, we will need to make sure we actually capture the information 
model for registries (at the time the registries are created and updated, when 
the experts are in the house).

>> This is certainly highly useful.
>> It also requires to essentially start from scratch for each new registry.
> 
> Registry schemas are quite diverse, so a universal translation procedure 
> isn't possible.

(That’s why I said we need to capture the information model.
There is not a single one that applies to every registry.)

> Also, some decisions may be necessary on the YANG side - for example, whether 
> the registry records are to be represented as enums or identities.

Right, that is essentially the the IM ➔ DM mapping, and that needs to be done 
for each kind of DM (unless the IM already contains enough hints to carry this 
out by default).

> In most cases, writing a registry-specific translation isn't difficult and 
> amounts to copying Makefile and XSLT stylesheet templates, editing parameters 
> in the Makefile and writing a few XSLT lines.

I’m not questioning this, I just note that this is a mostly manual process that 
will be hard to maintain in the long run.

>> Shouldn’t registries come with a machine readable information model?
> 
> Actually, RELAX NG schemas are available, for example
> 
> https://www.iana.org/assignments/dns-parameters/dns-parameters.rng

These are data models for the registry page, not the underlying information 
models.

> They are useful for clarifying what to expect in the registry but don't help 
> much with automating the translation. 

(Because the IM info is missing.)

>> Shouldn’t it then be “easy” to build a generic tool that creates a YANG 
>> model out of the data in the registry?
> 
> Ideally, YANG might be able to directly "import" registries, but this is 
> quite difficult to achieve because registries are not very uniform.

… and you’d need the IM info (and any DM mapping hints).

                        .oOo.

I don’t want to hold up this effort by trying to do this properly, but I note 
that YANG is not the only target DM that registries would need to translate 
info.
(And you’ll note that I’m thinking like an SDF author here…)

Grüße, Carsten

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to