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