Subject: [netmod] Unique prefixes

From: Balazs Lengyel <[email-masked]>
Date: Tue, 28 Jul 2009 18:02:23 +0200

Hello,
Prefixes are used widely in YANG. It would be a lot easier to read YANG Modules if they
would all use unique prefixes and if the prefixes used in import, would be the same as in
the imported module.

If the prefixes used to point out a specific modules change in every other module,
understanding the text becomes much more difficult.

It would be quite difficult to have unique prefixes for all standard and non-standard
modules, but at least standard YAMs should have a unique prefix.

Add to 14. IANA Considerations

The registry shall record for each entry:
...
  - for modules, the prefix defined in the module's prefix statement
...

Add to 7.1.4. The prefix Statement
Prefixes in YANG modules SHOULD be unique. Prefixes of standard YANG modules MUST be
unique, this is guaranteed by registering the prefix value in the new "YANG Module Names"
registry.
The prefix statement in any import statements SHOULD use the same value as the imported
modules prefix statement.

The above was discussed by Martin, David Partain, Dave Kessens, Lada, Phil, Bernd, Jurgen,
Mehmet and Balazs. The above text indicates their rough consensus.

Balazs

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 28 Jul 2009 18:29:01 +0200

On Tue, Jul 28, 2009 at 06:02:23PM +0200, Balazs Lengyel wrote:

> Prefixes are used widely in YANG. It would be a lot easier to read
> YANG Modules if they would all use unique prefixes and if the
> prefixes used in import, would be the same as in the imported
> module.
> 
> If the prefixes used to point out a specific modules change in every
> other module, understanding the text becomes much more difficult.
>
> It would be quite difficult to have unique prefixes for all standard
> and non-standard modules, but at least standard YAMs should have a
> unique prefix.

Clarification: I think we talked about RFC published YANG modules.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Andy Bierman <[email-masked]>
Date: Tue, 28 Jul 2009 10:28:39 -0700

Lengyel wrote:
> other module,

I do not think we need prefix uniqueness.
Unless every prefix string really is unique, then
it does the manager no good, since it needs code
to use an alternative, when a prefix collision comes up.

We already have unique module names and (hopefully) namespace URIs.
Use the module name in code generation, etc. because that is
the only thing you can count on as being unique.

It is impractical to maintain uniqueness among 2 and 3 character
identifiers.

Andy

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