VOL-1537 : Create the Alarm Framework in golang openolt adapter

           Added event proxy to publish generic events which can
           be device events a.k.a alarms or KPIs. These events are
           published to the KAFKA bus to the topic "voltha.events"

           As event_proxy.go is a dependency for the alarm framework
           and it is utilized by the openolt golang adapter so this
           code changes needs to be merged first so the dependencies
           could be resolved.

Change-Id: Ib82003e449e605349eeb10af1c8405b78ac30f7d
diff --git a/vendor/github.com/opencord/voltha-protos/Makefile b/vendor/github.com/opencord/voltha-protos/Makefile
index a0f1ad6..b9083d5 100644
--- a/vendor/github.com/opencord/voltha-protos/Makefile
+++ b/vendor/github.com/opencord/voltha-protos/Makefile
@@ -32,16 +32,8 @@
 PROTO_GO_DEST_DIR := go
 PROTO_GO_PB:= $(foreach f, $(PROTO_FILES), $(patsubst protos/voltha_protos/%.proto,$(PROTO_GO_DEST_DIR)/$(call go_package_path,$(f))/%.pb.go,$(f)))
 
-PROTOC_PREFIX := /usr/local
-PROTOC_VERSION := "3.7.0"
-PROTOC_DOWNLOAD_PREFIX := "https://github.com/google/protobuf/releases/download"
-PROTOC_DIR := protobuf-$(PROTOC_VERSION)
-PROTOC_TARBALL := protobuf-python-$(PROTOC_VERSION).tar.gz
-PROTOC_DOWNLOAD_URI := $(PROTOC_DOWNLOAD_PREFIX)/v$(PROTOC_VERSION)/$(PROTOC_TARBALL)
-PROTOC_BUILD_TMP_DIR := "/tmp/protobuf-build-$(shell uname -s | tr '[:upper:]' '[:lower:]')"
-
-# Force pb file to be regenrated every time.  Otherwise the make process assumes whats there is still ok
-.PHONY: go/voltha.pb
+# Force pb file to be regenrated every time.  Otherwise the make process assumes generated version is still valid
+.PHONY: go/voltha.pb protoc_check
 
 print:
 	@echo "Proto files: $(PROTO_FILES)"
@@ -58,7 +50,7 @@
 clean: python-clean go-clean
 
 # Python targets
-python-protos: $(PROTO_PYTHON_PB2)
+python-protos: protoc_check $(PROTO_PYTHON_PB2)
 
 venv_protos:
 	virtualenv $@;\
@@ -77,6 +69,7 @@
     $<
 
 python-build: setup.py python-protos
+	rm -rf dist/
 	python ./setup.py sdist
 
 python-test: tox.ini setup.py python-protos
@@ -99,17 +92,7 @@
     $(PROTO_PYTHON_PB2_GRPC)
 
 # Go targets
-go-protos: protoc_check_version $(PROTO_GO_PB) go/voltha.pb
-
-protoc_check_version:
-ifeq ("", "$(shell which protoc)")
-	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
-	@echo "It looks like you don't have a version of protocol buffer tools."
-	@echo "To install the protocol buffer toolchain, you can run:"
-	@echo "    make install-protoc"
-	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
-	exit 1
-endif
+go-protos: protoc_check $(PROTO_GO_PB) go/voltha.pb
 
 go_temp:
 	mkdir -p go_temp
@@ -129,32 +112,50 @@
     --descriptor_set_out=$@ \
     ${PROTO_FILES}
 
-go-test:
-ifneq ("libprotoc 3.7.0", "$(shell protoc --version)")
-	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
-	@echo "It looks like you don't have protocol buffer tools ${PROTOC_VERSION} installed."
-	@echo "To install this version, you can run:"
-	@echo "    make install-protoc"
-	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
-	exit 1
-endif
+go-test: protoc_check
 	test/test-go-proto-consistency.sh
 
 go-clean:
 	rm -rf go_temp
 
+# Protobuf compiler helper functions
+protoc_check:
+ifeq ("", "$(shell which protoc)")
+	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+	@echo "It looks like you don't have a version of protocol buffer tools."
+	@echo "To install the protocol buffer toolchain on Linux, you can run:"
+	@echo "    make install-protoc"
+	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+	exit 1
+endif
+ifneq ("libprotoc 3.7.0", "$(shell protoc --version)")
+	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+	@echo "You have the wrong version of protoc installed"
+	@echo "Please install version 3.7.0"
+	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+	exit 1
+endif
+
 install-protoc:
-	@echo "Downloading and installing protocol buffer support."
+	@echo "Downloading and installing protocol buffer support (Linux amd64 only)"
+ifneq ("Linux", "$(shell uname -s)")
+	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+	@echo "Automated installation of protoc not supported on $(shell uname -s)"
+	@echo "Please install protoc v3.7.0 from:"
+	@echo "  https://github.com/protocolbuffers/protobuf/releases"
+	@echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+	exit 1
+endif
 	@echo "Installation will require sudo priviledges"
 	@echo "This will take a few minutes."
-	mkdir -p $(PROTOC_BUILD_TMP_DIR)
-	@echo "We ask for sudo credentials now so we can install at the end"; \
+	@echo "Asking for sudo credentials now so we can install at the end"
 	sudo echo "Thanks"; \
-    cd $(PROTOC_BUILD_TMP_DIR); \
-    wget $(PROTOC_DOWNLOAD_URI); \
-    tar xzvf $(PROTOC_TARBALL); \
-    cd $(PROTOC_DIR); \
-    ./configure --prefix=$(PROTOC_PREFIX); \
-    make; \
-    sudo make install; \
-    sudo ldconfig
+    PROTOC_VERSION="3.7.0" ;\
+    PROTOC_SHA256SUM="a1b8ed22d6dc53c5b8680a6f1760a305b33ef471bece482e92728f00ba2a2969" ;\
+    curl -L -o /tmp/protoc-$${PROTOC_VERSION}-linux-x86_64.zip https://github.com/google/protobuf/releases/download/v$${PROTOC_VERSION}/protoc-$${PROTOC_VERSION}-linux-x86_64.zip ;\
+    echo "$${PROTOC_SHA256SUM}  /tmp/protoc-$${PROTOC_VERSION}-linux-x86_64.zip" | sha256sum -c - ;\
+    unzip /tmp/protoc-$${PROTOC_VERSION}-linux-x86_64.zip -d /tmp/protoc3 ;\
+    sudo mv /tmp/protoc3/bin/* /usr/local/bin/ ;\
+    sudo mv /tmp/protoc3/include/* /usr/local/include/ ;\
+    sudo chmod -R a+rx /usr/local/bin/* ;\
+    sudo chmod -R a+rX /usr/local/include/