blob: d5a83f2bff94009d584f6ccb9a757ccf395ff63e [file] [log] [blame]
Shad Ansari19249582018-04-30 04:31:00 +00001// Copyright (c) 2018 Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at:
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16package openolt;
17import "google/api/annotations.proto";
18
19service Openolt {
20
21 rpc ActivateOnu(Onu) returns (Empty) {
22 option (google.api.http) = {
23 post: "/v1/EnableOnu"
24 body: "*"
25 };
26 }
27
28 rpc OmciMsgOut(OmciMsg) returns (Empty) {
29 option (google.api.http) = {
30 post: "/v1/OmciMsgOut"
31 body: "*"
32 };
33 }
34
35 rpc OnuPacketOut(OnuPacket) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/OnuPacketOut"
38 body: "*"
39 };
40 }
41
Nicolas Palpacuerb78def42018-06-07 12:55:26 -040042 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
43 option (google.api.http) = {
44 post: "/v1/UplinkPacketOut"
45 body: "*"
46 };
47 }
48
Shad Ansari19249582018-04-30 04:31:00 +000049 rpc FlowAdd(Flow) returns (Empty) {
50 option (google.api.http) = {
51 post: "/v1/FlowAdd"
52 body: "*"
53 };
54 }
55
nick7be062f2018-05-25 17:52:56 -040056 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
57 option (google.api.http) = {
58 post: "/v1/HeartbeatCheck"
59 body: "*"
60 };
61 }
62
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040063
Shad Ansari19249582018-04-30 04:31:00 +000064 rpc EnableIndication(Empty) returns (stream Indication) {}
65}
66
67message Indication {
68 oneof data {
69 OltIndication olt_ind = 1;
70 IntfIndication intf_ind = 2;
71 IntfOperIndication intf_oper_ind = 3;
72 OnuDiscIndication onu_disc_ind = 4;
73 OnuIndication onu_ind = 5;
74 OmciIndication omci_ind = 6;
75 PacketIndication pkt_ind = 7;
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040076 PortStatistics port_stats = 8;
77 FlowStatistics flow_stats = 9;
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -040078 AlarmIndication alarm_ind= 10;
79 }
80}
81
82message AlarmIndication {
83 oneof data {
84 LosIndication los_ind = 1;
85 DyingGaspIndication dying_gasp_ind = 2;
Shad Ansari19249582018-04-30 04:31:00 +000086 }
87}
88
89message OltIndication {
90 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +000091}
92
93message IntfIndication {
94 fixed32 intf_id = 1;
95 string oper_state = 2; // up, down
96}
97
98message OnuDiscIndication {
99 fixed32 intf_id = 1;
100 SerialNumber serial_number = 2;
101}
102
103message OnuIndication {
104 fixed32 intf_id = 1;
105 fixed32 onu_id = 2;
106 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +0000107 string admin_state = 5; // up, down
108 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000109}
110
111message IntfOperIndication {
112 string type = 1; // nni, pon
113 fixed32 intf_id = 2;
114 string oper_state = 3; // up, down
115}
116
117message OmciIndication {
118 fixed32 intf_id = 1;
119 fixed32 onu_id = 2;
120 bytes pkt = 3;
121}
122
123message PacketIndication {
124 fixed32 intf_id = 1;
125 fixed32 gemport_id = 2;
126 fixed32 flow_id = 3;
127 bytes pkt = 4;
128}
129
nick7be062f2018-05-25 17:52:56 -0400130message Heartbeat {
131 fixed32 heartbeat_signature = 1;
132}
133
Shad Ansari19249582018-04-30 04:31:00 +0000134message Onu {
135 fixed32 intf_id = 1;
136 fixed32 onu_id = 2;
137 SerialNumber serial_number = 3;
138}
139
140message OmciMsg {
141 fixed32 intf_id = 1;
142 fixed32 onu_id = 2;
143 bytes pkt = 3;
144}
145
146message OnuPacket {
147 fixed32 intf_id = 1;
148 fixed32 onu_id = 2;
149 bytes pkt = 3;
150}
151
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400152message UplinkPacket {
153 fixed32 intf_id = 1;
154 bytes pkt = 2;
155}
156
Shad Ansari19249582018-04-30 04:31:00 +0000157message Classifier {
158 fixed32 o_tpid = 1;
159 fixed32 o_vid = 2;
160 fixed32 i_tpid = 3;
161 fixed32 i_vid = 4;
162 fixed32 o_pbits = 5;
163 fixed32 i_pbits = 6;
164 fixed32 eth_type = 7;
165 bytes dst_mac = 8;
166 bytes src_mac = 9;
167 fixed32 ip_proto = 10;
168 fixed32 dst_ip = 11;
169 fixed32 src_ip = 12;
170 fixed32 src_port = 13;
171 fixed32 dst_port = 14;
172 string pkt_tag_type = 15; // untagged, single_tag, double_tag
173}
174
175message ActionCmd {
176 bool add_outer_tag = 1;
177 bool remove_outer_tag = 2;
178 bool trap_to_host = 3;
179}
180
181message Action {
182 ActionCmd cmd = 1;
183 fixed32 o_vid = 2;
184 fixed32 o_pbits = 3;
185 fixed32 o_tpid = 4;
186 fixed32 i_vid = 5;
187 fixed32 i_pbits = 6;
188 fixed32 i_tpid = 7;
189}
190
191message Flow {
192 fixed32 access_intf_id = 1;
193 fixed32 onu_id = 2;
194 fixed32 flow_id = 3;
195 string flow_type = 4; // upstream, downstream, broadcast, multicast
196 fixed32 network_intf_id = 5;
197 fixed32 gemport_id = 6;
198 Classifier classifier = 7;
199 Action action = 8;
200}
201
202message SerialNumber {
203 bytes vendor_id = 1;
204 bytes vendor_specific = 2;
205}
206
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400207message PortStatistics {
208 fixed32 intf_id = 1;
209 fixed64 rx_bytes = 2;
210 fixed64 rx_packets = 3;
211 fixed64 rx_ucast_packets = 4;
212 fixed64 rx_mcast_packets = 5;
213 fixed64 rx_bcast_packets = 6;
214 fixed64 rx_error_packets = 7;
215 fixed64 tx_bytes = 8;
216 fixed64 tx_packets = 9;
217 fixed64 tx_ucast_packets = 10;
218 fixed64 tx_mcast_packets = 11;
219 fixed64 tx_bcast_packets = 12;
220 fixed64 tx_error_packets = 13;
221 fixed64 rx_crc_errors = 14;
222 fixed64 bip_errors = 15;
223 fixed32 timestamp = 16;
224}
225
226message FlowStatistics {
227 fixed32 flow_id = 1;
228 fixed64 rx_bytes = 2;
229 fixed64 rx_packets = 3;
230 fixed64 tx_bytes = 8;
231 fixed64 tx_packets = 9;
232 fixed32 timestamp = 16;
233}
234
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400235message LosIndication {
236 fixed32 intf_id = 1;
237 string status = 2;
238}
239
240message DyingGaspIndication {
241 fixed32 intf_id = 1;
242 fixed32 onu_id = 2;
243 string status = 3;
244}
245
Shad Ansari19249582018-04-30 04:31:00 +0000246message Empty {}