# voltha-protos

Protobuf files used by [VOLTHA](https://wiki.opencord.org/display/CORD/VOLTHA).

Currently this is used to generate both go and python.

Protobuf definition files are located in `protos/voltha_protos` directory. This
directory heirarchy and import scheme is required to allow the python code
generated by the GRPC compiler to [have the correct import
paths](https://github.com/grpc/grpc/issues/9575#issuecomment-293934506).

> NOTE: The `protos/google/api` directory has files copied from the [Google
> APIs](https://github.com/googleapis/googleapis), and is only included for
> initial compilation of the VOLTHA protobuf files - these API's should be
> installed independently via either the python
> [googleapis-common-protos](https://pypi.org/project/googleapis-common-protos/)
> package or the golang [go-genproto](https://github.com/google/go-genproto)
> repo.

## Building locally

### Python

make build

use dist/*.tar.gz for local imports

## Using voltha-protos in your project

### Python

Installation: `pip install voltha-protos`

Use: `from voltha_protos import voltha_pb2`

### go

`go get ...`

## Testing

`make test` will run tests for all languages.

