Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | import "google/protobuf/any.proto"; |
| 4 | import "voltha_protos/openflow_13.proto"; |
| 5 | import public "voltha_protos/logical_device.proto"; |
| 6 | |
| 7 | |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 8 | option go_package = "github.com/opencord/voltha-protos/go/inter_container"; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 9 | |
| 10 | package voltha; |
| 11 | |
| 12 | message StrType { |
| 13 | string val = 1; |
| 14 | } |
| 15 | |
| 16 | message IntType { |
| 17 | int64 val = 1; |
| 18 | } |
| 19 | |
| 20 | message BoolType { |
| 21 | bool val = 1; |
| 22 | } |
| 23 | |
| 24 | message Packet { |
| 25 | bytes payload = 1; |
| 26 | } |
| 27 | |
| 28 | message ErrorCode { |
| 29 | enum codes { |
| 30 | UNSUPPORTED_REQUEST = 0; |
| 31 | INVALID_PARAMETERS = 1; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | message Error { |
| 36 | ErrorCode code = 1; |
| 37 | string reason = 2; |
| 38 | } |
| 39 | |
| 40 | enum MessageType { |
| 41 | REQUEST = 0; |
| 42 | RESPONSE = 1; |
| 43 | DEVICE_DISCOVERED=2; |
| 44 | } |
| 45 | |
| 46 | message Header { |
| 47 | string id = 1; |
| 48 | MessageType type = 2; |
| 49 | string from_topic = 3; |
| 50 | string to_topic = 4; |
William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 51 | string key_topic = 5; |
| 52 | int64 timestamp = 6; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | message Argument { |
| 56 | string key = 1; |
| 57 | google.protobuf.Any value = 2; |
| 58 | } |
| 59 | |
| 60 | message InterContainerMessage { |
| 61 | Header header = 1; |
| 62 | google.protobuf.Any body = 2; |
| 63 | } |
| 64 | |
| 65 | message InterContainerRequestBody { |
| 66 | string rpc = 2; |
| 67 | repeated Argument args = 3; |
| 68 | bool response_required = 4; |
| 69 | string reply_to_topic = 5; |
| 70 | } |
| 71 | |
| 72 | message InterContainerResponseBody { |
| 73 | bool success = 1; |
| 74 | google.protobuf.Any result = 3; |
| 75 | } |
| 76 | |
| 77 | message SwitchCapability { |
| 78 | openflow_13.ofp_desc desc = 1; |
| 79 | openflow_13.ofp_switch_features switch_features = 2; |
| 80 | } |
| 81 | |
| 82 | message PortCapability { |
| 83 | LogicalPort port = 1; |
| 84 | } |
| 85 | |
| 86 | message DeviceDiscovered { |
| 87 | string id = 1; |
| 88 | string parent_id = 2; |
| 89 | string device_type = 3; |
| 90 | string publisher = 4; |
| 91 | } |
| 92 | |
| 93 | message InterAdapterMessageType { |
| 94 | enum Types { |
| 95 | FLOW_REQUEST = 0; |
| 96 | FLOW_RESPONSE = 1; |
| 97 | OMCI_REQUEST = 2; |
| 98 | OMCI_RESPONSE = 3; |
| 99 | METRICS_REQUEST = 4; |
| 100 | METRICS_RESPONSE = 5; |
Matt Jeanneret | 909d7dc | 2019-03-08 17:21:09 -0500 | [diff] [blame] | 101 | ONU_IND_REQUEST = 6; |
| 102 | ONU_IND_RESPONSE = 7; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 103 | } |
| 104 | } |
| 105 | |
| 106 | message InterAdapterHeader { |
| 107 | string id = 1; |
| 108 | InterAdapterMessageType.Types type = 2; |
| 109 | string from_topic = 3; |
| 110 | string to_topic = 4; |
| 111 | string to_device_id = 5; |
| 112 | string proxy_device_id = 6; |
| 113 | int64 timestamp = 7; |
| 114 | } |
| 115 | |
| 116 | message InterAdapterOmciMessage { |
| 117 | bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE |
| 118 | } |
| 119 | |
| 120 | message InterAdapterResponseBody { |
| 121 | bool status = 1; |
| 122 | oneof payload { |
| 123 | google.protobuf.Any body = 2; |
| 124 | InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | message InterAdapterMessage { |
| 129 | InterAdapterHeader header = 1; |
| 130 | google.protobuf.Any body = 2; |
| 131 | } |