Robot gRPC package
This package allows sending/receiving messages in a gRPC event stream.
Supported devices
This gRPC ROBOT library is intended to support different Protocol Buffer definitions. Precondition is that python files generated from Protocol Buffer files are available in a pip package which must be installed before the library is used.
| Supported device | Pip package | Pip package version | Library Name |
|---|---|---|---|
| dmi | device-management-interface | 0.9.1 | grpc_robot.Dmi |
| 0.9.2 | grpc_robot.Dmi | ||
| 0.9.3 | grpc_robot.Dmi | ||
| 0.9.4 | grpc_robot.Dmi | ||
| 0.9.5 | grpc_robot.Dmi | ||
| 0.9.6 | grpc_robot.Dmi | ||
| 0.9.8 | grpc_robot.Dmi | ||
| 0.9.9 | grpc_robot.Dmi | ||
| 0.10.1 | grpc_robot.Dmi | ||
| 0.10.2 | grpc_robot.Dmi | ||
| 0.12.0 | grpc_robot.Dmi | ||
| 1.0.0 | grpc_robot.Dmi | ||
| 1.2.1 | grpc_robot.Dmi | ||
| 1.4.0 | grpc_robot.Dmi | ||
| 1.13.0 | grpc_robot.Dmi | ||
| 1.13.1 | grpc_robot.Dmi | ||
| 1.16.0 | grpc_robot.Dmi | ||
| voltha | voltha-protos | 4.0.13 | grpc_robot.Voltha |
| 4.2.0 | grpc_robot.Voltha |
Tools
The package also offers some keywords for convenience to work with Robot Framework.
List of keywords:
The list of keywords may can be extended by request if required.
Installation
pip install robot-grpc
How to use robot-grpc in Robot Framework
The library has a named parameter version to indicate the ProtoBuf file set to be used.
Import Library grpc_robot.Dmi
Import Library grpc_robot.Voltha
Import Library grpc_robot.Collections
Import Library grpc_robot.DmiTools
Import Library grpc_robot.VolthaTools
How to update the grpc-robot to support newer DMI versions (e.g. 1.4.0)
- Create a new version folder “dmi_1_4_0” in “/grpc-robot/grpc_robot/services/dmi”
- Place an init.py and a dmi.json file in this folder:
- In most cases the init.py file can be copied from the last dmi version's folder and updated to the dmi version from which the new version shall derive.
- The dmi.json file must be created. Please check chapter "How to create the dmi.json file"
- If the new DMI version introduces new RPCs or the types of the parameter and/or the return have been changed for some RPC the according keyword files from the last DMI version must be edited and placed into the new folder. It is not neccessary to update the keyword files if the content of the RPC have changed. For each RPC which shall be supported by the grpc-robot a keyword must be defined in the files.
- Update the README.md file with the new version.
- Update the documentation string of class GrpcDmiRobot in file "/grpc-robot/grpc_robot/dmi_robot.py" and/or "/grpc-robot/grpc_robot/voltha_robot.py".
- Update the tests if required.
- Update the VERSION file for the library version.
- Create the new package and upload it to pypi.org
- cd /robot-grpc
- rm dist/*; python3 setup.py sdist bdist_wheel
- PYTHONPATH=/robot-grpc source MAKEDOC
- rm dist/*; python3 setup.py sdist bdist_wheel
- pip uninstall -y grpc-robot; pip install dist/*.tar.gz
- twine upload dist/*
How to create the dmi.json file
The json file is the conversion of the ProtoBuf files content into json format which is used by the library.
-
Clone or update the repository https://github.com/opencord/device-management-interface.git. Make sure the VERSION file shows the desired DMI version. If not checkout the version of interest.
-
In the command line interface run the command:
- grpc_robot.protop -i -o dmi
e.g. grpc_robot.protop -i ~/repositories/device-management-interface/protos/dmi -o /robot-grpc/grpc_robot/services/ dmi 1.4.0
NOTE: If an error "parsy.ParseError: expected one of ..." occurs: most-likely it is a block-comment (/* ... */) in the *.proto file. Simply remove that block-comment and retry.
Metadata
Release files for grpc-robot 2.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grpc_robot-2.11.0.tar.gz | 1.3 MB | Without provenance | Details for grpc_robot-2.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grpc_robot-2.11.0-py3-none-any.whl | Python 3 | none | any | Details for grpc_robot-2.11.0-py3-none-any.whl |
Total release size: 1.5 MB
Release files / grpc_robot-2.11.0.tar.gz
| Download URL | grpc_robot-2.11.0.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
348d027ad5b4ca38af81136f160a1d990dcd7448c82df045ebc21cbc042ff03b
|
|
BLAKE2b-256 checksum How to use checksums |
6c29000aecaf437c75303f3df1babf248cd427e975be8498a9279a74f6a33c85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / grpc_robot-2.11.0-py3-none-any.whl
| Download URL | grpc_robot-2.11.0-py3-none-any.whl |
|---|---|
| Size | 144.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5684d6a33cf33f2ba2363df6d49dcec80d5c712792a251cc294a301f41177ecd
|
|
BLAKE2b-256 checksum How to use checksums |
15d08e39ada1c978f8817e4a46c3fbac412ed78b1adb1661b5cb31a6868a5a36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Security for grpc-robot 2.11.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.