VOL-1494: Add missing field for ofp_stats

Copied over from voltha 1.x protos. Needed
by ofagent

Change-Id: I43ad2c918f309f7d1c5d1f5996154bf2f13df578
4 files changed
tree: ac4d53c739f46ca02f242bcb2c5067fe80a46210
  1. .gitignore
  2. .gitreview
  3. Gopkg.lock
  4. Gopkg.toml
  5. MANIFEST.in
  6. Makefile
  7. README.md
  8. VERSION
  9. build_go_protos.sh
  10. go/
  11. protos/
  12. python/
  13. setup.py
  14. tox.ini
  15. vendor/
README.md

voltha-protos

Protobuf files used by 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.

NOTE: The protos/google/api directory has files copied from the Google APIs, 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 package or the golang go-genproto repo.

Go environment

Get the Voltha-protos repository:

git clone https://gerrit.opencord.org/voltha-protos
cd voltha-protos

Setting up the Go environment

After installing Go on the MAC, the GOPATH environment variable should be set to ~/go. Create a symbolic link in the $GOPATH/src tree to the voltha-go repository:

mkdir $GOPATH/src/github.com/opencord
ln -s ~/repos/voltha-protos $GOPATH/src/github.com/opencord/voltha-protos

Go dependencies

install dependencies

go install ./vendor/github.com/golang/protobuf/protoc-gen-go

Building locally

make build

use dist/*.tar.gz for local python imports use go/ for local go imports

Using voltha-protos in your project

Python

Installation: pip install voltha-protos

Use: from voltha_protos import voltha_pb2

go

go get github.com/opencord/voltha-protos or dep ensure if using dep

To use the libraries, import protos with the root path github.com/opencord/voltha-protos/go/

Testing

make test will run tests for all languages.