mirror of
https://gerrit.hackerspace.pl/hscloud
synced 2024-10-18 10:07:45 +00:00
49 lines
1.7 KiB
Markdown
49 lines
1.7 KiB
Markdown
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.
|
|
|
|
PKI
|
|
---
|
|
|
|
This service uses [HSPKI](https://code.hackerspace.pl/q3k/hspki), you will need to generate development TLS certificates for local use.
|
|
|
|
Getting and Building
|
|
--------------------
|
|
|
|
go get 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
|