Commit c53f6b8b authored by Ricard Vilalta's avatar Ricard Vilalta
Browse files

Update commands.txt with gNMI instructions

parent c3aa63ec
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
@@ -262,5 +262,43 @@ Service b8c99e2c-39d8-424d-9833-554634269555 deleted
(mock-osm) exit
Bye!

############
# gNMI
############

## Download and install the latest release
$ sudo bash -c "$(curl -sL https://get.containerlab.dev)“

## Deploy proposed two SR node scenario
$ cd tfs-ctrl/hackfest/gnmi
$ sudo containerlab deploy -t srlinux.clab.yml

## Access SR Bash
$ docker exec -it clab-srlinux-srl1 bash

## Acess SR CLI
$ docker exec -it clab-srlinux-srl1 sr_cli

## Destroy scenario
$ sudo containerlab destroy --topo srlinux.clab.yml

## Install gNMIc
$ sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)"

## gNMI Capabilities request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify capabilities

## gNMI Get request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /interface[name=mgmt0]

## gNMI Set request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --update-path /system/name/host-name --update-value slr11

(we check the changed value) 
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name 

## Subscribe request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf subscribe --path /interface[name=mgmt0]/statistics
(In another terminal, you can generate traffic) 
$ssh admin@clab-srlinux-srl1