1
0
Fork 0
hscloud/dc/arista-proxy
q3k 47b7e850e7 dc/arista-proxy: fix by using github.com/q3k/cursedjson
Change-Id: Id9657a30af8c16afe4ddde7e2ac04f4508a2fd18
2019-09-26 18:32:39 +02:00
..
proto dc/arista-proxy: fix by using github.com/q3k/cursedjson 2019-09-26 18:32:39 +02:00
BUILD.bazel dc/arista-proxy: fix by using github.com/q3k/cursedjson 2019-09-26 18:32:39 +02:00
README.md go/svc/(dc stuff) -> dc/ 2019-07-21 15:20:51 +02:00
main.go dc/arista-proxy: fix by using github.com/q3k/cursedjson 2019-09-26 18:32:39 +02:00
service.go dc/arista-proxy: fix by using github.com/q3k/cursedjson 2019-09-26 18:32:39 +02:00

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