Internals

The YANG Module Namespace Identifier

Internally in NSO, a YANG module is identified by its namespace. Each such namespace must be unique. Before CDM, this namespace identifier was always the same as the XML namespace defined in the YANG module. With CDM, the namespace is constructed from a mount-id and the XML namespace. The resulting namespace is sometimes referred to as a crunched namespace.

The Mount Point

In order to implement CDM, NSO uses YANG Schema Mount, defined in RFC 8528. This document introduces a mount point, under which YANG models are mounted. NSO defines two such mount points, in /devices/device/config and /devices/device/live-status. Under these mount points, all the device's YANG modules are mounted.

This implies that traversing a path in the schema that crosses a mount-point signals that referencing a node under the mount point by using a module's name, prefix, or XML namespace may be ambiguous (since there may be multiple versions of the same module, with different definitions of the same node). In order to resolve this ambiguity, it is necessary to know the mount-id.

A NED package must define a ned-id that identifies the device-type for the NED. In NSO the ned-id is also the mount-id for the crunched namespaces.

Note

This means that the ned-id must be unique for each NED and will serve the dual role of defining the device-type and mount-id.

So, when traversing a mount-point, NSO will internally lookup the ned-id for the specific device instance and resolve the ambiguities in module name, prefix or XML namespace. This way all user-code can and must use paths and XML namespaces just as before. There is no need for user-code to ever handle crunched namespaces.