Start Model Driven Telemetry Lab.
Login into the devbox VM inside this lab and clone the gnmic-bin repo to have the gnmic binary available inside the lab:
git clone https://github.com/hellt/gnmic-bin.git
mv gnmic-bin/gnmic ~/gnmic
git clone https://github.com/YangModels/yang
Run gnmic with XR's OpenConfig models matching the release running in the Lab (6.5.3)
./gnmic --address 10.10.20.35 --insecure -e json_ietf \
--username admin --password Cisco123 \
--file yang/vendor/cisco/xr/653/openconfig-interfaces.yang \
--dir yang/standard/ietf/ \
--exclude ietf-interfaces \
prompt
When you constructed the path with the help of auto-suggestions, with XR you need to make one addition because XR's gNMI interfaces uses outdated way to distinct the models used in conjunction with the path.
A user needs to append the module name to the path, so if the path is /interfaces/interfaces, the openconfig-interfaces module name needs to be prepended like that:
openconfig-interfaces:interfaces/interface
Output:
gnmic> get --path openconfig-interfaces:interfaces/interface
Get Response:
[
{
"timestamp": 1603291718169945610,
"time": "2020-10-21T14:48:38.16994561Z",
"updates": [
{
"Path": "openconfig-interfaces:interfaces/interface",
"values": {
"interfaces/interface": [
{
"config": {
"enabled": true,