google gNMI Protocol Version 0.4.0 — gNMI Wildcards

elem { name: "interface" key { key: "name" value: "Loopback111" } } } gNMI Wildcards The gNMI protocol supports wildcards for Get paths. This is the ability to use a wildcards in a path to match multiple elements. These wildcards indicate all elements in a given subtree in the schema. An elem is an element, and it is a value between / characters in an xPath. An elem is also available in a gNMI path. For example, the position of a wildcard relative to elem names implies that the wildcard stands for an interface, and is interpreted as all interfaces. There are two types of wildcards; implicit and explicit, and both are supported. Get paths support all types and combinations of path wildcards.

• Implicit wildcards: These expand a list of elements in an element tree. Implicit wildcard occurs when a key value is not provided for elements of a list. The following is a sample path implicit wildcard. This wildcard will return the descriptions of all interfaces on a device: path { elem { name: "interfaces" } elem { name: "interface" } elem { name: "config" } elem { name: "description" } } • Explicit wildcards: Provides the same functionality by • Specifying an asterisk (*) for either the path element name or key name. The following sample shows a path asterisk wildcard as the key name. This wildcard returns the description for all interfaces on a device. path { elem { name:

"interfaces" } elem { name: "interface" key { value: "*" } } elem { key: "name" name: “config" gNMI Protocol gNMI Wildcards gNMI Protocol 11