blob: 28af2bf3ab4608f94174b4fd6e9977649ef562a4 [file] [log] [blame]
Zack Williams52209662019-02-07 10:15:31 -07001syntax = "proto3";
2
William Kurkianad745652019-03-20 08:45:51 -04003option go_package = "github.com/opencord/voltha-protos/go/inter_container";
4
Mahir Gunyel4b0dab22019-05-16 13:56:09 -07005import public "voltha_protos/common.proto";
6import public "voltha_protos/voltha.proto";
Zack Williams52209662019-02-07 10:15:31 -07007import "google/protobuf/any.proto";
8import "voltha_protos/openflow_13.proto";
9import public "voltha_protos/logical_device.proto";
10
Zack Williams52209662019-02-07 10:15:31 -070011package voltha;
12
13message StrType {
14 string val = 1;
15}
16
17message IntType {
18 int64 val = 1;
19}
20
21message BoolType {
22 bool val = 1;
23}
24
25message Packet {
26 bytes payload = 1;
27}
28
29message ErrorCode {
30 enum codes {
31 UNSUPPORTED_REQUEST = 0;
32 INVALID_PARAMETERS = 1;
33 }
34}
35
36message Error {
37 ErrorCode code = 1;
38 string reason = 2;
39}
40
41enum MessageType {
42 REQUEST = 0;
43 RESPONSE = 1;
44 DEVICE_DISCOVERED=2;
45}
46
47message Header {
48 string id = 1;
49 MessageType type = 2;
50 string from_topic = 3;
51 string to_topic = 4;
William Kurkian6ea97f82019-03-13 15:51:55 -040052 string key_topic = 5;
53 int64 timestamp = 6;
Zack Williams52209662019-02-07 10:15:31 -070054}
55
56message Argument {
57 string key = 1;
58 google.protobuf.Any value = 2;
59}
60
61message InterContainerMessage {
62 Header header = 1;
63 google.protobuf.Any body = 2;
64}
65
66message InterContainerRequestBody {
67 string rpc = 2;
68 repeated Argument args = 3;
69 bool response_required = 4;
70 string reply_to_topic = 5;
71}
72
73message InterContainerResponseBody {
74 bool success = 1;
75 google.protobuf.Any result = 3;
76}
77
78message SwitchCapability {
79 openflow_13.ofp_desc desc = 1;
80 openflow_13.ofp_switch_features switch_features = 2;
81}
82
83message PortCapability {
84 LogicalPort port = 1;
85}
86
87message DeviceDiscovered {
88 string id = 1;
89 string parent_id = 2;
90 string device_type = 3;
91 string publisher = 4;
92}
93
94message 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;
Matt Jeanneret909d7dc2019-03-08 17:21:09 -0500102 ONU_IND_REQUEST = 6;
103 ONU_IND_RESPONSE = 7;
Matt Jeanneret15249fa2019-04-12 20:25:31 -0400104 TECH_PROFILE_DOWNLOAD_REQUEST = 8;
Zack Williams52209662019-02-07 10:15:31 -0700105 }
106}
107
108message 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
118message InterAdapterOmciMessage {
119 bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE
Mahir Gunyel4b0dab22019-05-16 13:56:09 -0700120 common.ConnectStatus.ConnectStatus connect_status = 2;
121 voltha.Device.ProxyAddress proxy_address = 3;
Zack Williams52209662019-02-07 10:15:31 -0700122}
123
Matt Jeanneret15249fa2019-04-12 20:25:31 -0400124message InterAdapterTechProfileDownloadMessage {
125 uint32 uni_id = 1;
126 string path = 2;
127}
128
Zack Williams52209662019-02-07 10:15:31 -0700129message 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
137message InterAdapterMessage {
138 InterAdapterHeader header = 1;
139 google.protobuf.Any body = 2;
140}