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