<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC7950 PUBLIC "" "https://www.rfc-editor.org/refs/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3986 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!ENTITY RFC6241 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?><?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="info" docName="draft-chen-netmod-enterprise-yang-namespace-02">
<front>
<title abbrev="Enterprise YANG Namespace">Grammar for Enterprise YANG Module
Namespace</title>
<author fullname="I. Chen" initials="I."
            surname="Chen">
      <organization>Kuatro Technologies</organization>
      <address>
        <email>ichen@kuatrotech.com</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
</author>
<date day="13" month="October" year="2016" />
<area>OPS</area>
<workgroup>NETMOD</workgroup>
<abstract>
<t>
This document defines the grammar to create enterprise YANG module
namespaces that are globally unique, as required by the YANG modeling
language.
</t>
</abstract>
</front>

<middle>
<section title="Introduction"> <!-- 1, line 99-->
<t>The use of a standard data modeling language YANG <xref target="RFC7950"/> together with
Network Configuration Protocol (NETCONF) <xref target="RFC6241"/> allows for the creation of 
a standard network configuration interface.  YANG further allows vendors to
customize standard YANG modules and to create enterprise YANG modules that adapt 
standard YANG modules to different devices and features.  To identify YANG modules,
<xref target="RFC7950"/> requires YANG module namespaces of all YANG modules, both standard
YANG modules and enterprise YANG modules, be globally unique.  <xref target="RFC7950"/> also
recommends that enterprise YANG modules have module names that are globally
unique.
</t>
<t>Based the module naming convention recommended in <xref target="RFC7950"/>, this document
defines the grammar to create YANG module namespaces for enterprise YANG
modules that result in globally unique namespaces. 
</t>
<section title="Terminology"> <!-- 1.1, line 119-->
<t>The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14, <xref target="RFC2119"/>.
</t>
</section> <!-- ends: "1.1 from line 119-->
</section> <!-- ends: "1 from line 99-->
<section title="YANG Module Name and Namespace Requirements and Recommendations"> <!-- 2, line 127-->
<t><xref target="RFC7950"/> consists of several YANG module name and namespace requirements and
recommendations.
</t>
<t><xref target="RFC7950"/> Section 5.3 paragraph 1 states that
</t>
<t>
Each module is
bound to a distinct XML namespace <xref target="XML-NAMES"/>, which is a globally
unique URI <xref target="RFC3986"/>.
</t>
<t><xref target="RFC7950"/> Section 5.3 paragraph 3 states that
</t>
<t>
XML namespaces for private modules are assigned by the organization
owning the module without a central registry.  Namespace URIs MUST be
chosen so they cannot collide with standard or other enterprise
namespaces -- for example, by using the enterprise or organization
name in the namespace.
</t>
<t><xref target="RFC7950"/> Section 6.2.1 paragraph 1 states that
</t>
<t>
Each identifier is valid in a namespace that depends on the type of
the YANG item being defined.  All identifiers defined in a namespace
MUST be unique.
</t>
<t>o  All module and submodule names share the same global module
      identifier namespace.
</t>
<t>The requirement in <xref target="RFC7950"/> Section 6.2.1 means that even enterprise YANG module
names must be globally unique.  The recommendation in <xref target="RFC7950"/> Section 5.3
means that it is desirable to define enterprise YANG modules names to use an
organization's name as a prefix.
</t>
</section> <!-- ends: "2 from line 127-->
<section title="Enterprise YANG Module Namespace Grammar"> <!-- 3, line 173-->
<t>This section defines the grammar to create globally unique enterprise YANG module
namespaces.  The grammar defines a namespace to be a Uniform Resource Name (URN)
under the top-level "rdns" name identifier <xref target="rdns"/>, followed by an organization's reverse registered domain name and optional
sub-domain hierarchies, and ending with the module name with the organization's
name as the prefix.
</t>
<t>&lt;namespace&gt; = urn:rdns:&lt;reverse-dns&gt;:&lt;sub-domain&gt;&lt;module-name&gt;
</t>
<t>&lt;reverse-dns&gt; = An organization's registered domain name in reverse
</t>
<t>&lt;sub-domain&gt; = Empty string or
               additional levels of hierarchy defined within a domain
               in which each level is delimited by colons
</t>
<t>&lt;module-name&gt; = &lt;organization-prefix&gt;-&lt;function&gt;
</t>
<t>&lt;function&gt; = A string that describes the function provided by the
             YANG module
</t>
<t>In discussions on the NETMOD working group mailing list, there are 
suggestions that the top-level name identifier should be "yang" instead of
"rdns".  While the final decision on the exact name identifier might not be
"rdns", the grammar described in this document is expected to
remain as described above.
</t>
</section> <!-- ends: "3 from line 173-->
<section title="Usage Example"> <!-- 4, line 201-->
<t>Suppose a vendor has a registered domain name "example.com".  This vendor has
also chosen to place all of its YANG modules under the "yang" sub-domain.
Following the enterprise YANG module namespace grammar described in this
document, the vendor ends up with the patterns below.
</t>
<t>&lt;reverse-dns&gt; = com:example
&lt;sub-domain&gt; = yang
&lt;namespace&gt; = urn:rdns:com:example:yang:&lt;module-name&gt;
&lt;module-name&gt; = example-&lt;function&gt;
</t>
<t>As a result, this vendor's OSPF YANG module has the namespace
"urn:rdns:com:example:yang:example-ospf".
</t>
</section> <!-- ends: "4 from line 201-->
<section title="Security Considerations"> <!-- 5, line 220-->
<t>TBD.
</t>
</section> <!-- ends: "5 from line 220-->
<section title="IANA Considerations"> <!-- 6, line 225-->
<t>This document does not register any new names with IANA.  The
registration of the new "rdns" name is done in <xref target="rdns"/>.
</t>
</section> <!-- ends: "6 from line 225-->
</middle>
<back>
<references title="Normative References">
    &RFC3986;
    &RFC7950;
    &RFC2119;
    <!--  Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP14, RFC 2119, DOI 10.17487/RFC2119, March 1997,<http://www.rfc-editor.org/info/rfc2119>. -->
<reference anchor="rdns">
  <front>
    <title>Work in progress, 'draft-chen-rdns-urn-07.txt'</title>
    <author initials="I." surname="Chen" fullname="I. Chen">
      <organization/>
    </author>
    <date year="2016" month="September"/>
  </front>
</reference>
<reference anchor="XML-NAMES">
  <front>
    <title>Namespaces in XML 1.0 (Third Edition)</title>
    <author initials="T." surname="Bray"><organization /></author>
    <author initials="D." surname="Hollander"><organization /></author>
    <author initials="A." surname="Layman"><organization /></author>
    <author initials="R." surname="Tobin"><organization /></author>
    <author initials="H." surname="Thompson"><organization /></author>
    <date year="2009" month="December"/>
  </front>
  <seriesInfo name="Recommendation" value="REC-xml-names-20091208"/>
</reference>
</references>
<references title="Informative References">    
&RFC6241;
    <!--  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., and A.Bierman, Ed., "Network Configuration Protocol (NETCONF)", RFC 6241, DOI10.17487/RFC6241, June 2011, <http://www.rfc-editor.org/info/rfc6241>. -->
</references>
</back>
</rfc>
<!-- generated from file yang_namespace.nroff with nroff2xml 0.1.0 by Tomek Mrugalski -->
