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 | |
| 8 | option go_package = "github.com/opencord/voltha-go/protos/core_adapter"; |
| 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; |
| 43 | } |
| 44 | |
| 45 | message Header { |
| 46 | string id = 1; |
| 47 | MessageType type = 2; |
| 48 | string from_topic = 3; |
| 49 | string to_topic = 4; |
| 50 | int64 timestamp = 5; |
| 51 | } |
| 52 | |
| 53 | message Argument { |
| 54 | string key = 1; |
| 55 | google.protobuf.Any value = 2; |
| 56 | } |
| 57 | |
| 58 | message InterContainerMessage { |
| 59 | Header header = 1; |
| 60 | google.protobuf.Any body = 2; |
| 61 | } |
| 62 | |
| 63 | message InterContainerRequestBody { |
| 64 | string rpc = 2; |
| 65 | repeated Argument args = 3; |
| 66 | bool response_required = 4; |
| 67 | string reply_to_topic = 5; |
| 68 | } |
| 69 | |
| 70 | message InterContainerResponseBody { |
| 71 | bool success = 1; |
| 72 | google.protobuf.Any result = 3; |
| 73 | } |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 74 | |
| 75 | message SwitchCapability { |
| 76 | openflow_13.ofp_desc desc = 1; |
| 77 | openflow_13.ofp_switch_features switch_features = 2; |
| 78 | } |
| 79 | |
| 80 | message PortCapability { |
| 81 | LogicalPort port = 1; |
khenaidoo | 6fdf0ba | 2018-11-02 14:38:33 -0400 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | message InterAdapterMessageType { |
| 85 | enum Types { |
| 86 | FLOW_REQUEST = 0; |
| 87 | FLOW_RESPONSE = 1; |
| 88 | OMCI_REQUEST = 2; |
| 89 | OMCI_RESPONSE = 3; |
| 90 | METRICS_REQUEST = 4; |
| 91 | METRICS_RESPONSE = 5; |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | message InterAdapterHeader { |
| 96 | string id = 1; |
| 97 | InterAdapterMessageType.Types type = 2; |
| 98 | string from_topic = 3; |
| 99 | string to_topic = 4; |
| 100 | string to_device_id = 5; |
| 101 | string proxy_device_id = 6; |
| 102 | int64 timestamp = 7; |
| 103 | } |
| 104 | |
| 105 | message InterAdapterResponseBody { |
khenaidoo | 91ecfd6 | 2018-11-04 17:13:42 -0500 | [diff] [blame] | 106 | bool status = 1; |
| 107 | google.protobuf.Any body = 2; |
khenaidoo | 6fdf0ba | 2018-11-02 14:38:33 -0400 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | message InterAdapterMessage { |
| 111 | InterAdapterHeader header = 1; |
| 112 | google.protobuf.Any body = 2; |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 113 | } |