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