For troubleshooting purposes we need to run our automation (and thus pygnmi) from our laptop instead of prod servers.
GRPC supports the "grpc_proxy" env-var out of the box, but pygnmi does additional certificate verification.
Unfortunately ssl.get_server_certificate doesn't support proxies, so we have to handle it at lower level (the code is greatly inspired by https://stackoverflow.com/questions/53587700).
You can then use it with for example:
grpc_proxy=http://proxy:8080 python3 test-gnmi3.py
For troubleshooting purposes we need to run our automation (and thus pygnmi) from our laptop instead of prod servers.
GRPC supports the "grpc_proxy" env-var out of the box, but pygnmi does additional certificate verification. Unfortunately ssl.get_server_certificate doesn't support proxies, so we have to handle it at lower level (the code is greatly inspired by https://stackoverflow.com/questions/53587700).
You can then use it with for example:
grpc_proxy=http://proxy:8080 python3 test-gnmi3.py