blob: 7041800b2b0a63e3d2e427dd574d6140fa6086d3 [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
49 rpc EnableIndication(Empty) returns (stream Indication) {}
50}
51
52message Indication {
53 oneof data {
54 OltIndication olt_ind = 1;
55 IntfIndication intf_ind = 2;
56 IntfOperIndication intf_oper_ind = 3;
57 OnuDiscIndication onu_disc_ind = 4;
58 OnuIndication onu_ind = 5;
59 OmciIndication omci_ind = 6;
60 PacketIndication pkt_ind = 7;
61 }
62}
63
64message OltIndication {
65 string oper_state = 1; // up, down
Shad Ansari185a5e82018-05-11 16:10:10 +000066 string mac = 2;
67 string serial_number = 3;
68 string manufacturer = 4;
69 string name = 5;
Shad Ansari19249582018-04-30 04:31:00 +000070}
71
72message IntfIndication {
73 fixed32 intf_id = 1;
74 string oper_state = 2; // up, down
75}
76
77message OnuDiscIndication {
78 fixed32 intf_id = 1;
79 SerialNumber serial_number = 2;
80}
81
82message OnuIndication {
83 fixed32 intf_id = 1;
84 fixed32 onu_id = 2;
85 string oper_state = 3; // up, down
86 SerialNumber serial_number = 4;
87}
88
89message IntfOperIndication {
90 string type = 1; // nni, pon
91 fixed32 intf_id = 2;
92 string oper_state = 3; // up, down
93}
94
95message OmciIndication {
96 fixed32 intf_id = 1;
97 fixed32 onu_id = 2;
98 bytes pkt = 3;
99}
100
101message PacketIndication {
102 fixed32 intf_id = 1;
103 fixed32 gemport_id = 2;
104 fixed32 flow_id = 3;
105 bytes pkt = 4;
106}
107
108message Onu {
109 fixed32 intf_id = 1;
110 fixed32 onu_id = 2;
111 SerialNumber serial_number = 3;
112}
113
114message OmciMsg {
115 fixed32 intf_id = 1;
116 fixed32 onu_id = 2;
117 bytes pkt = 3;
118}
119
120message OnuPacket {
121 fixed32 intf_id = 1;
122 fixed32 onu_id = 2;
123 bytes pkt = 3;
124}
125
126message Classifier {
127 fixed32 o_tpid = 1;
128 fixed32 o_vid = 2;
129 fixed32 i_tpid = 3;
130 fixed32 i_vid = 4;
131 fixed32 o_pbits = 5;
132 fixed32 i_pbits = 6;
133 fixed32 eth_type = 7;
134 bytes dst_mac = 8;
135 bytes src_mac = 9;
136 fixed32 ip_proto = 10;
137 fixed32 dst_ip = 11;
138 fixed32 src_ip = 12;
139 fixed32 src_port = 13;
140 fixed32 dst_port = 14;
141 string pkt_tag_type = 15; // untagged, single_tag, double_tag
142}
143
144message ActionCmd {
145 bool add_outer_tag = 1;
146 bool remove_outer_tag = 2;
147 bool trap_to_host = 3;
148}
149
150message Action {
151 ActionCmd cmd = 1;
152 fixed32 o_vid = 2;
153 fixed32 o_pbits = 3;
154 fixed32 o_tpid = 4;
155 fixed32 i_vid = 5;
156 fixed32 i_pbits = 6;
157 fixed32 i_tpid = 7;
158}
159
160message Flow {
161 fixed32 access_intf_id = 1;
162 fixed32 onu_id = 2;
163 fixed32 flow_id = 3;
164 string flow_type = 4; // upstream, downstream, broadcast, multicast
165 fixed32 network_intf_id = 5;
166 fixed32 gemport_id = 6;
167 Classifier classifier = 7;
168 Action action = 8;
169}
170
171message SerialNumber {
172 bytes vendor_id = 1;
173 bytes vendor_specific = 2;
174}
175
176message Empty {}