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