[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/inter_container.proto b/protos/voltha_protos/inter_container.proto
new file mode 100644
index 0000000..8e160ce
--- /dev/null
+++ b/protos/voltha_protos/inter_container.proto
@@ -0,0 +1,128 @@
+syntax = "proto3";
+
+import "google/protobuf/any.proto";
+import "voltha_protos/openflow_13.proto";
+import public "voltha_protos/logical_device.proto";
+
+
+option go_package = "github.com/opencord/voltha-go/protos/inter_container";
+
+package voltha;
+
+message StrType {
+ string val = 1;
+}
+
+message IntType {
+ int64 val = 1;
+}
+
+message BoolType {
+ bool val = 1;
+}
+
+message Packet {
+ bytes payload = 1;
+}
+
+message ErrorCode {
+ enum codes {
+ UNSUPPORTED_REQUEST = 0;
+ INVALID_PARAMETERS = 1;
+ }
+}
+
+message Error {
+ ErrorCode code = 1;
+ string reason = 2;
+}
+
+enum MessageType {
+ REQUEST = 0;
+ RESPONSE = 1;
+ DEVICE_DISCOVERED=2;
+}
+
+message Header {
+ string id = 1;
+ MessageType type = 2;
+ string from_topic = 3;
+ string to_topic = 4;
+ int64 timestamp = 5;
+}
+
+message Argument {
+ string key = 1;
+ google.protobuf.Any value = 2;
+}
+
+message InterContainerMessage {
+ Header header = 1;
+ google.protobuf.Any body = 2;
+}
+
+message InterContainerRequestBody {
+ string rpc = 2;
+ repeated Argument args = 3;
+ bool response_required = 4;
+ string reply_to_topic = 5;
+}
+
+message InterContainerResponseBody {
+ bool success = 1;
+ google.protobuf.Any result = 3;
+}
+
+message SwitchCapability {
+ openflow_13.ofp_desc desc = 1;
+ openflow_13.ofp_switch_features switch_features = 2;
+}
+
+message PortCapability {
+ LogicalPort port = 1;
+}
+
+message DeviceDiscovered {
+ string id = 1;
+ string parent_id = 2;
+ string device_type = 3;
+ string publisher = 4;
+}
+
+message InterAdapterMessageType {
+ enum Types {
+ FLOW_REQUEST = 0;
+ FLOW_RESPONSE = 1;
+ OMCI_REQUEST = 2;
+ OMCI_RESPONSE = 3;
+ METRICS_REQUEST = 4;
+ METRICS_RESPONSE = 5;
+ }
+}
+
+message InterAdapterHeader {
+ string id = 1;
+ InterAdapterMessageType.Types type = 2;
+ string from_topic = 3;
+ string to_topic = 4;
+ string to_device_id = 5;
+ string proxy_device_id = 6;
+ int64 timestamp = 7;
+}
+
+message InterAdapterOmciMessage {
+ bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE
+}
+
+message InterAdapterResponseBody {
+ bool status = 1;
+ oneof payload {
+ google.protobuf.Any body = 2;
+ InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE
+ }
+}
+
+message InterAdapterMessage {
+ InterAdapterHeader header = 1;
+ google.protobuf.Any body = 2;
+}