khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | import "google/protobuf/any.proto"; |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 4 | import "openflow_13.proto"; |
| 5 | import public "logical_device.proto"; |
| 6 | |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 7 | |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 8 | option go_package = "github.com/opencord/voltha-protos/go/inter_container"; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [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 | |
khenaidoo | fdbad6e | 2018-11-06 22:26:38 -0500 | [diff] [blame] | 24 | message Packet { |
| 25 | bytes payload = 1; |
| 26 | } |
| 27 | |
| 28 | message ErrorCode { |
| 29 | enum codes { |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 30 | UNSUPPORTED_REQUEST = 0; |
| 31 | INVALID_PARAMETERS = 1; |
khenaidoo | fdbad6e | 2018-11-06 22:26:38 -0500 | [diff] [blame] | 32 | } |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 33 | } |
| 34 | |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 35 | message Error { |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 36 | ErrorCode code = 1; |
| 37 | string reason = 2; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | enum MessageType { |
| 41 | REQUEST = 0; |
| 42 | RESPONSE = 1; |
khenaidoo | 7923270 | 2018-12-04 11:00:41 -0500 | [diff] [blame] | 43 | DEVICE_DISCOVERED=2; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 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 | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 51 | int64 timestamp = 5; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [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 | } |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 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; |
khenaidoo | 6fdf0ba | 2018-11-02 14:38:33 -0400 | [diff] [blame] | 83 | } |
| 84 | |
khenaidoo | 7923270 | 2018-12-04 11:00:41 -0500 | [diff] [blame] | 85 | message DeviceDiscovered { |
| 86 | string id = 1; |
| 87 | string parent_id = 2; |
| 88 | string device_type = 3; |
khenaidoo | 1937407 | 2018-12-11 11:05:15 -0500 | [diff] [blame] | 89 | string publisher = 4; |
khenaidoo | 7923270 | 2018-12-04 11:00:41 -0500 | [diff] [blame] | 90 | } |
| 91 | |
khenaidoo | 6fdf0ba | 2018-11-02 14:38:33 -0400 | [diff] [blame] | 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; |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | message InterAdapterHeader { |
| 104 | string id = 1; |
| 105 | InterAdapterMessageType.Types type = 2; |
| 106 | string from_topic = 3; |
| 107 | string to_topic = 4; |
| 108 | string to_device_id = 5; |
| 109 | string proxy_device_id = 6; |
| 110 | int64 timestamp = 7; |
| 111 | } |
| 112 | |
| 113 | message InterAdapterResponseBody { |
khenaidoo | 91ecfd6 | 2018-11-04 17:13:42 -0500 | [diff] [blame] | 114 | bool status = 1; |
| 115 | google.protobuf.Any body = 2; |
khenaidoo | 6fdf0ba | 2018-11-02 14:38:33 -0400 | [diff] [blame] | 116 | } |
| 117 | |
| 118 | message InterAdapterMessage { |
| 119 | InterAdapterHeader header = 1; |
| 120 | google.protobuf.Any body = 2; |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 121 | } |