blob: 59339ccd39e2f694882e77e09c222994b2335c1b [file] [log] [blame]
Matteo Scandolo84f7d482019-08-08 19:00:47 -07001// 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 bbsim;
17
Matteo Scandolo10f965c2019-09-24 10:40:46 -070018// Models
19
Matteo Scandolo84f7d482019-08-08 19:00:47 -070020message PONPort {
21 int32 ID = 1;
22 string OperState = 2;
23}
24
25message NNIPort {
26 int32 ID = 1;
27 string OperState = 2;
28}
29
30message Olt {
31 int32 ID = 1;
Matteo Scandolo8df63df2019-09-12 10:34:32 -070032 string SerialNumber = 2;
33 string OperState = 3;
34 string InternalState = 4;
35 repeated NNIPort NNIPorts = 5;
36 repeated PONPort PONPorts = 6;
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070037}
38
39message ONU {
40 int32 ID = 1;
41 string SerialNumber = 2;
42 string OperState = 3;
43 string InternalState = 4;
44 int32 PonPortID = 5;
Matteo Scandolo4b3fc7e2019-09-17 16:49:54 -070045 int32 STag = 6;
46 int32 CTag = 7;
47 string HwAddress = 8;
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070048}
49
50message ONUs {
51 repeated ONU items = 1;
Matteo Scandolo84f7d482019-08-08 19:00:47 -070052}
53
Matteo Scandolo10f965c2019-09-24 10:40:46 -070054// Inputs
55
56message ONURequest {
57 string SerialNumber = 1;
58}
59
60// Utils
61
Matteo Scandolo84f7d482019-08-08 19:00:47 -070062message VersionNumber {
63 string version = 1;
64 string buildTime = 2;
65 string commitHash = 3;
66 string gitStatus = 4;
67}
68
Matteo Scandolo2bf742a2019-10-01 11:33:34 -070069message LogLevel {
70 string level = 1;
71 bool caller = 2;
72}
73
Matteo Scandolo10f965c2019-09-24 10:40:46 -070074message Response {
75 int32 status_code = 1;
76 string message = 2;
77}
78
Matteo Scandolo84f7d482019-08-08 19:00:47 -070079message Empty {}
80
81service BBSim {
82 rpc Version(Empty) returns (VersionNumber) {}
83 rpc GetOlt(Empty) returns (Olt) {}
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070084 rpc GetONUs(Empty) returns (ONUs) {}
Matteo Scandolo2bf742a2019-10-01 11:33:34 -070085 rpc SetLogLevel(LogLevel) returns (LogLevel) {}
Matteo Scandolo10f965c2019-09-24 10:40:46 -070086 rpc ShutdownONU (ONURequest) returns (Response) {}
87 rpc PoweronONU (ONURequest) returns (Response) {}
Matteo Scandolo84f7d482019-08-08 19:00:47 -070088}