Skip to content

GuillermoMM/grpcbasics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gRPC Basics Go Scripts

The objective of this project is to provide examples of gRPC API calls written in go.

It is NOT the intention to duplicate what is already provided in gnmic and gnoic clients.

The goal is to help you to create your own API calls that are not existing yet in the gnoic and/or gnmic like "Packet Link Qualification " wwhich is not yet available( at the time of writing this README).

Note also that the "programming Nokia SRLinux" training provides examples written in python only therefore this project
can be used as complementary. .

Requires

  • "Go" installed in your server. See: https://go.dev/doc/install
  • A SRLinux device (real or containerlab) that supports gRPC API calls.
  • Device configured to accept gRPC calls, example config for SRLinux below.
  • Certificates available for the device under test.
system{
        grpc-server test {
            admin-state enable
            tls-profile clab-profile
            network-instance mgmt
            port 57400
            services [
                gnmi
                gnoi
            ]
        }
}

Usage

  • git clone https://github.com/GuillermoMM/grpcbasics.git
  • Copy your certificate and key file of SRLinux to the same directory where you will run the go program.
  • Copy for instance "plq_caparequest.go" and edit lines that apply to your setup and/or needs, for example: line 39, 45, 53 and 54 ( these lines incldues IPs, ports and creds).
  • Execute : go run plq_caparequest.go
cp plq_caparequest.go /home/mprograms/
cp ca.pem /home/myprogram
cp ca.key /home/myprogram
go run healthz_get.go

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages