reference
reference copied to clipboard
Clarification request: gnmi.proto ModelData.name field
The ModelData
protocol, as used in a CapabilityResponse
(among other places), defines a field name
, described as the "Name of the model" (seen here).
The clarification requested is to describe what statement of a YANG module is used to provide the value for name
. Is it the YANG module name, or the YANG module namespace which is used?
In the NETCONF equivalent of CapabilityResponse
, the YANG module namespace is used as the value of the <capability>
elements, with the module name appended as a query parameter.
For example, a NETCONF server indicates it supports the YANG module openconfig-bgp.yang
by providing a capability like:
<capability>http://openconfig.net/yang/bgp?module=openconfig-bgp&revision=2017-02-02</capability>
If your intent was to make name
in the ModelData
for this example be openconfig-bgp
and for this field to be suitable as a schema collection key on a server, it is possible for module name collisions (as this repository saw early, leading to the module * -> module openconfig-*
changes) if the module namespaces are ignored.
The above choice could be phrased with a question, "is a GNMI server implementation allowed to load two YANG modules with the same module name in different module namespaces?". If yes (to my mind an expectation of NETCONF servers), using the module name (as opposed to the namespace) has this problem.