[VOL-1460]
- Imported protobuf definitions from pyvoltha at
https://gerrit.opencord.org/gitweb?p=pyvoltha.git, commit hash:
944aee71301b8ddb211b6e51d685f56d5c4a911b
- Imported upstream Google API protos from
https://github.com/googleapis/googleapis, commit hash:
5a90fbea68ce4a6e87c20d2df10df5ecd88299ff
- Fixed `import` paths and directory heirarchy in protobuf definitions
to be compatible with both python 2 and 3.
- Created Makefile scaffold to generate language-specific bindings for
python and go
Change-Id: Idd6b6b985a5eae4c38d40dd07ae78744c09e37f5
diff --git a/protos/voltha_protos/meta.proto b/protos/voltha_protos/meta.proto
new file mode 100644
index 0000000..fc02e46
--- /dev/null
+++ b/protos/voltha_protos/meta.proto
@@ -0,0 +1,57 @@
+// 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";
+
+option go_package = "github.com/opencord/voltha-go/protos/common";
+
+package voltha;
+
+import "google/protobuf/descriptor.proto";
+
+message ChildNode {
+ string key = 1;
+}
+
+enum Access {
+
+ // read-write, stored attribute
+ CONFIG = 0;
+
+ // read-only field, stored with the model, covered by its hash
+ READ_ONLY = 1;
+
+ // A read-only attribute that is not stored in the model, not covered
+ // by its hash, its value is filled real-time upon each request.
+ REAL_TIME = 2;
+
+}
+
+extend google.protobuf.FieldOptions {
+
+ // If present, it indicates that this field is stored as external child node
+ // or children nodes in Voltha's internal configuration tree.
+ // If the field is a container field and if the option specifies a key
+ // the child objects will be addressible by that key.
+ ChildNode child_node = 7761772;
+
+ // This annotation can be used to indicate that a field is read-only,
+ // from the perspective of NBI access. Backend plugins and system
+ // internals can update the field but the update requests through the
+ // NBI will ignore for instance a field that is marked as read-only (RO).
+ Access access = 7761773;
+}