This commit consists of:
1) Yang annotations to the protobuf definitions.  These annotations, when
   added to the relevant proto files in Voltha,  allow us to convert
   the voltha proto schemas into Yang schemas without the need to change the
   model definitions.
2) Update to the Yang parser to handle the above annotations
3) Some initial work on the netconf GET RPCs (work in progress)
4) Cleanup

Change-Id: I5e4f4217850f0beb1c41aca1b2530a41e4f8a809
diff --git a/netconf/protos/Makefile b/netconf/protos/Makefile
index 008a531..9bd1108 100644
--- a/netconf/protos/Makefile
+++ b/netconf/protos/Makefile
@@ -20,38 +20,15 @@
   $(error To get started, please source the env.sh file from Voltha top level directory)
 endif
 
-default: build
-
-PB2_FILES := \
-	voltha_pb2.py
+default: copyfiles
 
 TARGET_PROTO_DIR := $(VOLTHA_BASE)/netconf/protos
 SOURCE_PROTO_DIR := $(VOLTHA_BASE)/voltha/protos
 
-build: copyfiles
-
 copyfiles:
 	rsync -av --include '*/' --exclude='third_party/__init__.py' --include '*.py' --exclude='*' $(SOURCE_PROTO_DIR)/ $(TARGET_PROTO_DIR)
 
 
-PROTO_FILES := $(wildcard *.proto) $(wildcard third_party/google/api/*proto)
-PROTO_PB2_FILES := $(foreach f,$(PROTO_FILES),$(subst .proto,_pb2.py,$(f)))
-PROTO_DESC_FILES := $(foreach f,$(PROTO_FILES),$(subst .proto,.desc,$(f)))
-
-PROTOC_PREFIX := /usr/local
-PROTOC_LIBDIR := $(PROTOC_PREFIX)/lib
-
-build: $(PROTO_PB2_FILES)
-
-%_pb2.py: %.proto Makefile
-	@echo "Building protocol buffer artifacts from $<"
-	env LD_LIBRARY_PATH=$(PROTOC_LIBDIR) python -m grpc.tools.protoc \
-	    -I. \
-	    -I./third_party \
-	    --python_out=. \
-	    --grpc_python_out=. \
-	    $<
-
 clean:
 	rm -f $(PROTO_PB2_FILES) $(PROTO_DESC_FILES)
 
diff --git a/netconf/protos/yang_options.proto b/netconf/protos/yang_options.proto
new file mode 100644
index 0000000..5ff2ed6
--- /dev/null
+++ b/netconf/protos/yang_options.proto
@@ -0,0 +1,52 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file contains annotation definitions that can be used to describe
+// a configuration tree.
+
+syntax = "proto3";
+
+package voltha;
+
+import "google/protobuf/descriptor.proto";
+
+enum MessageParserOption {
+    // Move any enclosing child enum/message definition to the same level
+    // as the parent (this message) in the yang generated file
+    MOVE_TO_PARENT_LEVEL= 0;
+
+    // Create both a grouping and a container for this message.  The container
+    // name will be the message name.  The grouping name will be the message
+    // name prefixed with "grouping_"
+    CREATE_BOTH_GROUPING_AND_CONTAINER = 1;
+}
+
+message InlineNode {
+    string id = 1;
+    string type = 2;
+}
+
+extend google.protobuf.MessageOptions {
+    // This annotation is used to indicate how a message is parsed when
+    // converting from proto to yang format.
+    MessageParserOption yang_child_rule = 7761774;
+
+    MessageParserOption yang_message_rule = 7761775;
+}
+
+extend google.protobuf.FieldOptions {
+    // If present, the field (a message reference) should be replaced by the
+    // message itself.  For now, this applies only to non-repeated fields.
+    InlineNode yang_inline_node = 7761776;
+}