tree: cba10bc8d956c323e4b3c34a5b19198241ab4bcf [path history] [tgz]
  1. proto/
  2. arista.proto
  3. BUILD.bazel
  4. main.go
  5. README.md
  6. service.go
go/svc/arista-proxy/README.md

Old Shitty Arista eAPI/Capi <-> gRPC proxy

Our Arista 7148S does not support gRPC/OpenConfig, so we have to make our own damn gRPC proxy.

The schema is supposed to be 1:1 mapped to the JSON-RPC EAPI. This is just a dumb proxy.

Getting and Building

go get -d -u code.hackerspace.pl/q3k/arista-proxy
go generate code.hackerspace.pl/q3k/arista-proxy/proto
go build code.hackerspace.pl/q3k/arista-proxy

Debug Status Page

The debug_address flag controls spawning an HTTP server useful for debugging. You can use it to inspect gRPC request and view general status information of the proxy.

Flags

./arista-proxy -help
Usage of ./arista-proxy:
  -alsologtostderr
    	log to standard error as well as files
  -arista_api string
    	Arista remote endpoint (default "http://admin:password@1.2.3.4:80/command-api")
  -debug_address string
    	Debug HTTP listen address, or empty to disable (default "127.0.0.1:42000")
  -listen_address string
    	gRPC listen address (default "127.0.0.1:43001")
  -log_backtrace_at value
    	when logging hits line file:N, emit a stack trace
  -log_dir string
    	If non-empty, write log files in this directory
  -logtostderr
    	log to standard error instead of files
  -stderrthreshold value
    	logs at or above this threshold go to stderr
  -v value
    	log level for V logs
  -vmodule value
    	comma-separated list of pattern=N settings for file-filtered logging