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 | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 24 | enum ErrorCode { |
| 25 | UNSUPPORTED_REQUEST = 0; |
| 26 | INVALID_PARAMETERS = 1; |
| 27 | } |
| 28 | |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 29 | message Error { |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 30 | ErrorCode code = 1; |
| 31 | string reason = 2; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | enum MessageType { |
| 35 | REQUEST = 0; |
| 36 | RESPONSE = 1; |
| 37 | } |
| 38 | |
| 39 | message Header { |
| 40 | string id = 1; |
| 41 | MessageType type = 2; |
| 42 | string from_topic = 3; |
| 43 | string to_topic = 4; |
| 44 | int64 timestamp = 5; |
| 45 | } |
| 46 | |
| 47 | message Argument { |
| 48 | string key = 1; |
| 49 | google.protobuf.Any value = 2; |
| 50 | } |
| 51 | |
| 52 | message InterContainerMessage { |
| 53 | Header header = 1; |
| 54 | google.protobuf.Any body = 2; |
| 55 | } |
| 56 | |
| 57 | message InterContainerRequestBody { |
| 58 | string rpc = 2; |
| 59 | repeated Argument args = 3; |
| 60 | bool response_required = 4; |
| 61 | string reply_to_topic = 5; |
| 62 | } |
| 63 | |
| 64 | message InterContainerResponseBody { |
| 65 | bool success = 1; |
| 66 | google.protobuf.Any result = 3; |
| 67 | } |
khenaidoo | b920354 | 2018-09-17 22:56:37 -0400 | [diff] [blame] | 68 | |
| 69 | message SwitchCapability { |
| 70 | openflow_13.ofp_desc desc = 1; |
| 71 | openflow_13.ofp_switch_features switch_features = 2; |
| 72 | } |
| 73 | |
| 74 | message PortCapability { |
| 75 | LogicalPort port = 1; |
| 76 | } |