Updated dependencies for the affinity router.
Added the build mechanism for the affinity router.
Change-Id: I940edcc07f0a030f651dcb805b91e68418147151
diff --git a/protos/afrouter.proto b/protos/afrouter.proto
new file mode 100644
index 0000000..903e5cc
--- /dev/null
+++ b/protos/afrouter.proto
@@ -0,0 +1,36 @@
+// protoc -I echo/ echo/*.proto --go_out=plugins=grpc:echo
+
+syntax = "proto3";
+
+option go_package = "github.com/opencord/voltha-go/protos/afrouter";
+
+package afrouter;
+
+service Configuration {
+ rpc SetConnection (Conn) returns (Result) {}
+ rpc SetAffinity(Affinity) returns (Result) {}
+}
+
+message Result {
+ bool success = 1;
+ string error = 2;
+}
+
+message Conn {
+ string server = 1;
+ string pkg = 2;
+ string svc = 3;
+ string cluster = 4;
+ string backend = 5;
+ string connection = 6;
+ string addr = 7;
+ uint64 port = 8;
+}
+
+message Affinity {
+ string router = 1;
+ string route = 2;
+ string cluster = 3;
+ string backend = 4;
+ string id = 5;
+}
diff --git a/protos/scripts/build_protos.sh b/protos/scripts/build_protos.sh
index 8702e05..d221fa5 100755
--- a/protos/scripts/build_protos.sh
+++ b/protos/scripts/build_protos.sh
@@ -42,6 +42,7 @@
export IETF_PB="$SRC_DIR/ietf_interfaces.proto"
export OF_PB="$SRC_DIR/openflow_13.proto"
export OMCI_PB="$SRC_DIR/omci*.proto"
+export AFROUTER_PB="$SRC_DIR/afrouter.proto"
export PB_VARS="\
VOLTHA_PB \
@@ -50,7 +51,11 @@
SCHEMA_PB \
IETF_PB \
OF_PB \
- OMCI_PB"
+ OMCI_PB \
+ AFROUTER_PB"
+
+export OTHER_INCLUDES="/usr/local/include/googleapis"
+export PROTO_DESC_FILE="${SRC_DIR}/voltha.pb"
for pb_var in $PB_VARS
do
@@ -58,3 +63,5 @@
echo "Compiling $pbs"
protoc --go_out=$MAPS,plugins=grpc:$GOPATH/src $INCS $pbs
done
+
+protoc -I ${SRC_DIR} -I ${OTHER_INCLUDES} --include_imports --include_source_info --descriptor_set_out=${PROTO_DESC_FILE} ${SRC_DIR}/*.proto