Carsten Bormann <[email protected]> writes:

> On 2021-11-24, at 09:13, Ladislav Lhotka <[email protected]> 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. 

> — 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.

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

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.

> 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

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

> 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.

Thanks, Lada


>
> Grüße, Carsten
>

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

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

Reply via email to