blob: 4577e4272afca04d945fb49a0acb3831d662c4eb [file] [log] [blame]
Shad Ansari05d6a6e2018-04-06 23:17:50 +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 FlowAdd(Flow) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/FlowAdd"
38 body: "*"
39 };
40 }
41
42 rpc EnableIndication(Empty) returns (stream Indication) {}
43}
44
45message Indication {
46 oneof data {
47 OltIndication olt_ind = 1;
48 IntfIndication intf_ind = 2;
49 IntfOperIndication intf_oper_ind = 3;
50 OnuDiscIndication onu_disc_ind = 4;
51 OnuIndication onu_ind = 5;
52 OmciIndication omci_ind = 6;
Shad Ansari6b5b3672018-04-23 18:44:15 +000053 PacketIndication data_ind = 7;
Shad Ansari05d6a6e2018-04-06 23:17:50 +000054 }
55}
56
57message OltIndication {
58 string oper_state = 1; // up, down
59}
60
61message IntfIndication {
62 fixed32 intf_id = 1;
63 string oper_state = 2; // up, down
64}
65
66message OnuDiscIndication {
67 fixed32 intf_id = 1;
68 SerialNumber serial_number = 2;
69}
70
71message OnuIndication {
72 fixed32 intf_id = 1;
73 fixed32 onu_id = 2;
74 string oper_state = 3; // up, down
75 SerialNumber serial_number = 4;
76}
77
78message IntfOperIndication {
79 string type = 1; // nni, pon
80 fixed32 intf_id = 2;
81 string oper_state = 3; // up, down
82}
83
84message OmciIndication {
85 fixed32 intf_id = 1;
86 fixed32 onu_id = 2;
87 bytes pkt = 3;
88}
89
Shad Ansari6b5b3672018-04-23 18:44:15 +000090message PacketIndication {
Shad Ansari235a44a2018-04-23 17:53:20 +000091 fixed32 intf_id = 1;
92 fixed32 gemport_id = 2;
93 fixed32 flow_id = 3;
Shad Ansari6b5b3672018-04-23 18:44:15 +000094 bytes pkt = 4;
Shad Ansari235a44a2018-04-23 17:53:20 +000095}
96
Shad Ansari05d6a6e2018-04-06 23:17:50 +000097message Onu {
98 fixed32 intf_id = 1;
99 fixed32 onu_id = 2;
100 SerialNumber serial_number = 3;
101}
102
103message OmciMsg {
104 fixed32 intf_id = 1;
105 fixed32 onu_id = 2;
106 bytes pkt = 3;
107}
108
109message Classifier {
110 fixed32 o_tpid = 1;
111 fixed32 o_vid = 2;
112 fixed32 i_tpid = 3;
113 fixed32 i_vid = 4;
114 fixed32 o_pbits = 5;
115 fixed32 i_pbits = 6;
116 fixed32 eth_type = 7;
117 bytes dst_mac = 8;
118 bytes src_mac = 9;
119 fixed32 ip_proto = 10;
120 fixed32 dst_ip = 11;
121 fixed32 src_ip = 12;
122 fixed32 src_port = 13;
123 fixed32 dst_port = 14;
124 string pkt_tag_type = 15; // untagged, single, double
125}
126
127message ActionCmd {
128 bool add_outer_tag = 1;
129 bool remove_outer_tag = 2;
130 bool trap_to_host = 3;
131}
132
133message Action {
134 ActionCmd cmd = 1;
135 fixed32 o_vid = 2;
136 fixed32 o_pbits = 3;
137 fixed32 o_tpid = 4;
138 fixed32 i_vid = 5;
139 fixed32 i_pbits = 6;
140 fixed32 i_tpid = 7;
141}
142
143message Flow {
144 fixed32 access_intf_id = 1;
145 fixed32 onu_id = 2;
146 fixed32 flow_id = 3;
147 string flow_type = 4; // upstream, downstream, broadcast, multicast
148 fixed32 network_intf_id = 5;
149 fixed32 gemport_id = 6;
150 Classifier classifier = 7;
151 Action action = 8;
152}
153
154message SerialNumber {
155 bytes vendor_id = 1;
156 bytes vendor_specific = 2;
157}
158
159message Empty {}