- Notifications
You must be signed in to change notification settings - Fork0
NX-OS gRPC Python connectivity library.
License
cisco-ie/nx-os-grpc-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
NX-OS gRPC Python connectivity library. Proto files sourced fromdocumentation.
Requires Python and recommendspipenv. Manual usage ofpip/virtualenv is not covered. Usesblack for code formatting andpylint for code linting.
git clone https://github.com/cisco-grpc-connection-libs/nx-os-grpc-python.gitcd nx-os-grpc-python# If pipenv not installed, install!pip install --user pipenv# Now use pipenv, source from lockfilepipenv --three install --dev --ignore-pipfile# Or use latest libraries./update_deps.sh# Enter virtual environmentpipenv shell# Do your thing.exit
We useblack for code formatting andpylint for code linting.clean_code.sh will runblack against all of the code undernxos_grpc/ except forprotoc compiled protobufs, and runpylint against Python files directly undernxos_grpc/. They don't totally agree, and we aren't using perfect naming conventions in some cases, so we're not looking for perfection here.
./clean_code.sh
TODO: Add pre-commit hook to automatically run black if any Python files are being committed.
If a newnxos_grpc.proto definition is released, useupdate_protos.sh to recompile. If breaking changes are introduced the wrapper library must be updated.
./update_protos.sh
In order to use a secure channel you must acquire the necessary gRPC PEM files,grpc.pem. This PEM file is found with your downloaded gRPC Agent RPM. You must then specify the file path or the content of this PEM file when initializing the Client class.
TODO: Where to acquire gRPC Agent RPM?
Open an issue :)
- A potential issue that might arise is that this library uses the latest
grpcioandprotobufpackages whereas the NX-OS gRPC server was built against 0.11.1 which is ~2016 and lacks compatibility documentation. If an issue is encountered we will go down the rabbit hole, ignoring until then. Tracking in#2.
Big thanks to Kyoung Yun for a reference client implementation.
About
NX-OS gRPC Python connectivity library.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.