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"; |
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 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 86 | message DeviceDiscovered { |
| 87 | string id = 1; |
| 88 | string parent_id = 2; |
| 89 | string device_type = 3; |
| 90 | string publisher = 4; |
| 91 | } |
| 92 | |
| 93 | message InterAdapterMessageType { |
| 94 | enum Types { |
| 95 | FLOW_REQUEST = 0; |
| 96 | FLOW_RESPONSE = 1; |
| 97 | OMCI_REQUEST = 2; |
| 98 | OMCI_RESPONSE = 3; |
| 99 | METRICS_REQUEST = 4; |
| 100 | METRICS_RESPONSE = 5; |
Matt Jeanneret | 909d7dc | 2019-03-08 17:21:09 -0500 | [diff] [blame] | 101 | ONU_IND_REQUEST = 6; |
| 102 | ONU_IND_RESPONSE = 7; |
Matt Jeanneret | 15249fa | 2019-04-12 20:25:31 -0400 | [diff] [blame] | 103 | TECH_PROFILE_DOWNLOAD_REQUEST = 8; |
Girish Gowdra | 475e63e | 2019-11-20 16:42:59 +0530 | [diff] [blame] | 104 | DELETE_GEM_PORT_REQUEST = 9; |
| 105 | DELETE_TCONT_REQUEST = 10; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 106 | } |
| 107 | } |
| 108 | |
| 109 | message InterAdapterHeader { |
| 110 | string id = 1; |
| 111 | InterAdapterMessageType.Types type = 2; |
| 112 | string from_topic = 3; |
| 113 | string to_topic = 4; |
| 114 | string to_device_id = 5; |
| 115 | string proxy_device_id = 6; |
Scott Baker | 06cb92d | 2020-04-16 10:05:23 -0700 | [diff] [blame] | 116 | google.protobuf.Timestamp timestamp = 7; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | message InterAdapterOmciMessage { |
| 120 | bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE |
Serkant Uluderya | cbcfaa4 | 2019-10-18 13:25:08 +0300 | [diff] [blame] | 121 | common.ConnectStatus.Types connect_status = 2; |
Mahir Gunyel | 4b0dab2 | 2019-05-16 13:56:09 -0700 | [diff] [blame] | 122 | voltha.Device.ProxyAddress proxy_address = 3; |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 123 | } |
| 124 | |
Matt Jeanneret | 15249fa | 2019-04-12 20:25:31 -0400 | [diff] [blame] | 125 | message InterAdapterTechProfileDownloadMessage { |
| 126 | uint32 uni_id = 1; |
| 127 | string path = 2; |
| 128 | } |
| 129 | |
Girish Gowdra | 475e63e | 2019-11-20 16:42:59 +0530 | [diff] [blame] | 130 | message InterAdapterDeleteGemPortMessage { |
| 131 | uint32 uni_id = 1; |
| 132 | string tp_path = 2; |
| 133 | uint32 gem_port_id = 3; |
| 134 | } |
| 135 | |
| 136 | message InterAdapterDeleteTcontMessage { |
| 137 | uint32 uni_id = 1; |
| 138 | string tp_path = 2; |
| 139 | uint32 alloc_id = 3; |
| 140 | } |
| 141 | |
Zack Williams | 5220966 | 2019-02-07 10:15:31 -0700 | [diff] [blame] | 142 | message InterAdapterResponseBody { |
| 143 | bool status = 1; |
| 144 | oneof payload { |
| 145 | google.protobuf.Any body = 2; |
| 146 | InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | message InterAdapterMessage { |
| 151 | InterAdapterHeader header = 1; |
| 152 | google.protobuf.Any body = 2; |
| 153 | } |