Using gNMI with YANG Suite¶
Enabling gNMI in a device profile¶
By default, device profiles are marked as not supporting gNMI. You’ll need to enable gNMI support when creating/editing the device profile. If you’re not familiar with the basic concepts of device profiles, please refer to the device profile documentation at “Setup–>Device profiles”. Be sure to select the correct platform and port number, and perform a connectivity check to verify this information is correct.
Checking device capabilities¶
From the sidebar on any YANG Suite page, select “Protocols–>gNMI” to reach the main gNMI page. Here, you can select a device to use. Only device profiles that have enabled support for gNMI will be listed.
You can then click the “Capabilities” button for a report of the device’s gNMI capabilities.
Loading YANG modules¶
First, you’ll need to select a YANG module set. (If you haven’t already created one or more of these, see the filemanager documentation at “Setup–>YANG files and repositories”.)
After selecting the YANG set, select the “Module(s)” area, start typing in the name or a portion of the name of the YANG file you wish to work from, and pick one or more module(s).
Then select the “Load Module(s)” button, and after a few moments, the selected modules will be displayed.
If you’re not already familiar with the basic concepts of YANG Suite’s tree UI for working with YANG modules, please refer to the corresponding documentation at “Explore–>YANG”.
Building an RPC¶
Now that you have a device selected and YANG module(s) loaded, select the desired operation (Get, Set, or Subscribe) and any associated options (Get data type, prefixing style, etc.) using the buttons in the top section of the page.
In the YANG module tree display, you can then select the nodes of interest (and the associated values and operations, for a Set request) that you wish to use for building a gNMI RPC.
Get¶
Set¶
Once you have made the desired selections, click “Build JSON” to construct the corresponding RPC, which will be displayed as JSON in the field to the right.
Running an RPC¶
Once you have constructed an RPC, simply select “Run RPC” to transmit it to the selected device and display the outcome.