Scott Baker | e7144bc | 2019-10-01 14:16:47 -0700 | [diff] [blame^] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | option go_package = "github.com/opencord/voltha-protos/go/inter_container"; |
| 4 | |
| 5 | import public "voltha_protos/common.proto"; |
| 6 | import public "voltha_protos/voltha.proto"; |
| 7 | import "google/protobuf/any.proto"; |
| 8 | import "voltha_protos/openflow_13.proto"; |
| 9 | import public "voltha_protos/logical_device.proto"; |
| 10 | |
| 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; |
| 52 | string key_topic = 5; |
| 53 | int64 timestamp = 6; |
| 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; |
| 102 | ONU_IND_REQUEST = 6; |
| 103 | ONU_IND_RESPONSE = 7; |
| 104 | TECH_PROFILE_DOWNLOAD_REQUEST = 8; |
| 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 |
| 120 | common.ConnectStatus.ConnectStatus connect_status = 2; |
| 121 | voltha.Device.ProxyAddress proxy_address = 3; |
| 122 | } |
| 123 | |
| 124 | message InterAdapterTechProfileDownloadMessage { |
| 125 | uint32 uni_id = 1; |
| 126 | string path = 2; |
| 127 | } |
| 128 | |
| 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 | } |