Voltha Golang GRPC Client

Introduction

This GoLang library is meant to be used as a layer between C libraries that need to interact with Voltha.

The Voltha GRPC Go api was generated by first copying all the voltha .proto files located under:

../../voltha/protos

Followed by the execution of the command:

protoc --go_out=plugins=grpc:. *.proto

TODO(s)

  • At the moment, the resulting API files had to be manually fixed to obtain a working solution. There were conflicting imports throughout the file. It still needs to be investigated

  • The user-facing API, i.e. the exported methods with the main voltha.go file, need to be manually added. Only a few commands have been completed as it requires a lot of effort to translate between the GRPC data model to C model that can be used by C libraries.

  • As a first attempt to auto-generate some of the code, a utility executable (generate-c-header .go) was implemented to create the C header that defines all the necessary C data structures based on the available Voltha GRPC data structures. This utility still needs some polishing.