Package: grpc-robot
Robot gRPC packageThis package allows sending/receiving messages in a gRPC event stream.Supported devicesThis 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 devicePip packagePip package versionLibrary Namedmidevice-management-interface0.9.1grpc_robot.Dmi0.9.2grpc_robot.Dmi0.9.3grpc_robot.Dmi0.9.4grpc_robot.Dmi0.9.5grpc_robot.Dmi0.9.6grpc_robot.Dmi0.9.8grpc_robot.Dmi0.9.9grpc_robot.Dmi0.10.1grpc_robot.Dmi0.10.2grpc_robot.Dmi0.12.0grpc_robot.Dmi1.0.0grpc_robot.Dmi1.2.1grpc_robot.Dmi1.4.0grpc_robot.Dmi1.13.0grpc_robot.Dmi1.13.1grpc_robot.Dmi1.16.0grpc_robot.Dmivolthavoltha-protos4.0.13grpc_robot.Voltha4.2.0grpc_robot.VolthaToolsThe package also offers some keywords for convenience to work with Robot Framework.List of keywords:grpc_robot.Collectionsgrpc_robot.DmiToolsgrpc_robot.VolthaToolsThe list of keywords may can be extended by request if required.Installationpip install robot-grpcHow to userobot-grpcin Robot FrameworkThe library has a named parameterversionto 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.VolthaToolsHow 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 aninit.py and a dmi.json file in this folder:In most cases theinit.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.orgcd /robot-grpcrm dist/*; python3 setup.py sdist bdist_wheelPYTHONPATH=/robot-grpc source MAKEDOCrm dist/*; python3 setup.py sdist bdist_wheelpip uninstall -y grpc-robot; pip install dist/*.tar.gztwine upload dist/*How to create the dmi.json fileThe json file is the conversion of the ProtoBuf files content into json format which is used by the library.Clone or update the repositoryhttps://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  dmie.g. grpc_robot.protop -i ~/repositories/device-management-interface/protos/dmi -o /robot-grpc/grpc_robot/services/ dmi 1.4.0NOTE: 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.