blob: a7915c8f10da4f2a907a20e1e1cda6d6f9c344ec [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
42 rpc FlowAdd(Flow) returns (Empty) {
43 option (google.api.http) = {
44 post: "/v1/FlowAdd"
45 body: "*"
46 };
47 }
48
nick7be062f2018-05-25 17:52:56 -040049 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
50 option (google.api.http) = {
51 post: "/v1/HeartbeatCheck"
52 body: "*"
53 };
54 }
55
Shad Ansari19249582018-04-30 04:31:00 +000056 rpc EnableIndication(Empty) returns (stream Indication) {}
57}
58
59message Indication {
60 oneof data {
61 OltIndication olt_ind = 1;
62 IntfIndication intf_ind = 2;
63 IntfOperIndication intf_oper_ind = 3;
64 OnuDiscIndication onu_disc_ind = 4;
65 OnuIndication onu_ind = 5;
66 OmciIndication omci_ind = 6;
67 PacketIndication pkt_ind = 7;
68 }
69}
70
71message OltIndication {
72 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +000073}
74
75message IntfIndication {
76 fixed32 intf_id = 1;
77 string oper_state = 2; // up, down
78}
79
80message OnuDiscIndication {
81 fixed32 intf_id = 1;
82 SerialNumber serial_number = 2;
83}
84
85message OnuIndication {
86 fixed32 intf_id = 1;
87 fixed32 onu_id = 2;
88 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +000089 string admin_state = 5; // up, down
90 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +000091}
92
93message IntfOperIndication {
94 string type = 1; // nni, pon
95 fixed32 intf_id = 2;
96 string oper_state = 3; // up, down
97}
98
99message OmciIndication {
100 fixed32 intf_id = 1;
101 fixed32 onu_id = 2;
102 bytes pkt = 3;
103}
104
105message PacketIndication {
106 fixed32 intf_id = 1;
107 fixed32 gemport_id = 2;
108 fixed32 flow_id = 3;
109 bytes pkt = 4;
110}
111
nick7be062f2018-05-25 17:52:56 -0400112message Heartbeat {
113 fixed32 heartbeat_signature = 1;
114}
115
Shad Ansari19249582018-04-30 04:31:00 +0000116message Onu {
117 fixed32 intf_id = 1;
118 fixed32 onu_id = 2;
119 SerialNumber serial_number = 3;
120}
121
122message OmciMsg {
123 fixed32 intf_id = 1;
124 fixed32 onu_id = 2;
125 bytes pkt = 3;
126}
127
128message OnuPacket {
129 fixed32 intf_id = 1;
130 fixed32 onu_id = 2;
131 bytes pkt = 3;
132}
133
134message Classifier {
135 fixed32 o_tpid = 1;
136 fixed32 o_vid = 2;
137 fixed32 i_tpid = 3;
138 fixed32 i_vid = 4;
139 fixed32 o_pbits = 5;
140 fixed32 i_pbits = 6;
141 fixed32 eth_type = 7;
142 bytes dst_mac = 8;
143 bytes src_mac = 9;
144 fixed32 ip_proto = 10;
145 fixed32 dst_ip = 11;
146 fixed32 src_ip = 12;
147 fixed32 src_port = 13;
148 fixed32 dst_port = 14;
149 string pkt_tag_type = 15; // untagged, single_tag, double_tag
150}
151
152message ActionCmd {
153 bool add_outer_tag = 1;
154 bool remove_outer_tag = 2;
155 bool trap_to_host = 3;
156}
157
158message Action {
159 ActionCmd cmd = 1;
160 fixed32 o_vid = 2;
161 fixed32 o_pbits = 3;
162 fixed32 o_tpid = 4;
163 fixed32 i_vid = 5;
164 fixed32 i_pbits = 6;
165 fixed32 i_tpid = 7;
166}
167
168message Flow {
169 fixed32 access_intf_id = 1;
170 fixed32 onu_id = 2;
171 fixed32 flow_id = 3;
172 string flow_type = 4; // upstream, downstream, broadcast, multicast
173 fixed32 network_intf_id = 5;
174 fixed32 gemport_id = 6;
175 Classifier classifier = 7;
176 Action action = 8;
177}
178
179message SerialNumber {
180 bytes vendor_id = 1;
181 bytes vendor_specific = 2;
182}
183
184message Empty {}