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