[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/common.proto b/protos/voltha_protos/common.proto
new file mode 100644
index 0000000..e3b6211
--- /dev/null
+++ b/protos/voltha_protos/common.proto
@@ -0,0 +1,122 @@
+syntax = "proto3";
+
+option go_package = "github.com/opencord/voltha-go/protos/common";
+
+package voltha;
+
+import "voltha_protos/yang_options.proto";
+
+// Convey a resource identifier
+message ID {
+ string id = 1;
+}
+
+// Represents a list of IDs
+message IDs {
+ repeated ID items = 1;
+}
+
+enum TestModeKeys {
+ api_test=0;
+}
+
+message LogLevel {
+ option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+
+ // Logging verbosity level
+ enum LogLevel {
+ DEBUG = 0;
+ INFO = 1;
+ WARNING = 2;
+ ERROR = 3;
+ CRITICAL = 4;
+ FATAL = 5;
+ }
+}
+
+message AdminState {
+ option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+
+ // Administrative State
+ enum AdminState {
+
+ // The administrative state of the device is unknown
+ UNKNOWN = 0;
+
+ // The device is pre-provisioned into Voltha, but not contacted by it
+ PREPROVISIONED = 1;
+
+ // The device is enabled for activation and operation
+ ENABLED = 2;
+
+ // The device is disabled and shall not perform its intended forwarding
+ // functions other than being available for re-activation.
+ DISABLED = 3;
+
+ // The device is in the state of image download
+ DOWNLOADING_IMAGE = 4;
+
+ // The device is marked to be deleted
+ DELETED = 5;
+ }
+}
+
+message OperStatus {
+ option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+
+ // Operational Status
+ enum OperStatus {
+
+ // The status of the device is unknown at this point
+ UNKNOWN = 0;
+
+ // The device has been discovered, but not yet activated
+ DISCOVERED = 1;
+
+ // The device is being activated (booted, rebooted, upgraded, etc.)
+ ACTIVATING = 2;
+
+ // Service impacting tests are being conducted
+ TESTING = 3;
+
+ // The device is up and active
+ ACTIVE = 4;
+
+ // The device has failed and cannot fulfill its intended role
+ FAILED = 5;
+ }
+}
+
+message ConnectStatus {
+ option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+
+ // Connectivity Status
+ enum ConnectStatus {
+
+ // The device connectivity status is unknown
+ UNKNOWN = 0;
+
+ // The device cannot be reached by Voltha
+ UNREACHABLE = 1;
+
+ // There is live communication between device and Voltha
+ REACHABLE = 2;
+ }
+}
+
+message OperationResp {
+ option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+
+ enum OperationReturnCode {
+ OPERATION_SUCCESS = 0;
+ OPERATION_FAILURE = 1;
+ OPERATION_UNSUPPORTED = 2;
+ }
+ // Return code
+ OperationReturnCode code = 1;
+
+ // Additional Info
+ string additional_info = 2;
+}
+
+