Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 1 | // 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 | |
| 15 | syntax = "proto3"; |
| 16 | package bbsim; |
| 17 | |
Matteo Scandolo | 10f965c | 2019-09-24 10:40:46 -0700 | [diff] [blame] | 18 | // Models |
| 19 | |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 20 | message PONPort { |
| 21 | int32 ID = 1; |
| 22 | string OperState = 2; |
| 23 | } |
| 24 | |
| 25 | message NNIPort { |
| 26 | int32 ID = 1; |
| 27 | string OperState = 2; |
| 28 | } |
| 29 | |
| 30 | message Olt { |
| 31 | int32 ID = 1; |
Matteo Scandolo | 8df63df | 2019-09-12 10:34:32 -0700 | [diff] [blame] | 32 | string SerialNumber = 2; |
| 33 | string OperState = 3; |
| 34 | string InternalState = 4; |
| 35 | repeated NNIPort NNIPorts = 5; |
| 36 | repeated PONPort PONPorts = 6; |
Matteo Scandolo | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | message ONU { |
| 40 | int32 ID = 1; |
| 41 | string SerialNumber = 2; |
| 42 | string OperState = 3; |
| 43 | string InternalState = 4; |
| 44 | int32 PonPortID = 5; |
Matteo Scandolo | 4b3fc7e | 2019-09-17 16:49:54 -0700 | [diff] [blame] | 45 | int32 STag = 6; |
| 46 | int32 CTag = 7; |
| 47 | string HwAddress = 8; |
Matteo Scandolo | 2742870 | 2019-10-11 16:21:16 -0700 | [diff] [blame^] | 48 | int32 PortNo = 9; |
Matteo Scandolo | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | message ONUs { |
| 52 | repeated ONU items = 1; |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 53 | } |
| 54 | |
Matteo Scandolo | 10f965c | 2019-09-24 10:40:46 -0700 | [diff] [blame] | 55 | // Inputs |
| 56 | |
| 57 | message ONURequest { |
| 58 | string SerialNumber = 1; |
| 59 | } |
| 60 | |
| 61 | // Utils |
| 62 | |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 63 | message VersionNumber { |
| 64 | string version = 1; |
| 65 | string buildTime = 2; |
| 66 | string commitHash = 3; |
| 67 | string gitStatus = 4; |
| 68 | } |
| 69 | |
Matteo Scandolo | 2bf742a | 2019-10-01 11:33:34 -0700 | [diff] [blame] | 70 | message LogLevel { |
| 71 | string level = 1; |
| 72 | bool caller = 2; |
| 73 | } |
| 74 | |
Matteo Scandolo | 10f965c | 2019-09-24 10:40:46 -0700 | [diff] [blame] | 75 | message Response { |
| 76 | int32 status_code = 1; |
| 77 | string message = 2; |
| 78 | } |
| 79 | |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 80 | message Empty {} |
| 81 | |
| 82 | service BBSim { |
| 83 | rpc Version(Empty) returns (VersionNumber) {} |
| 84 | rpc GetOlt(Empty) returns (Olt) {} |
Matteo Scandolo | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 85 | rpc GetONUs(Empty) returns (ONUs) {} |
Matteo Scandolo | d2ca2c7 | 2019-10-04 16:50:22 -0700 | [diff] [blame] | 86 | rpc GetONU(ONURequest) returns (ONU) {} |
Matteo Scandolo | 2bf742a | 2019-10-01 11:33:34 -0700 | [diff] [blame] | 87 | rpc SetLogLevel(LogLevel) returns (LogLevel) {} |
Matteo Scandolo | 10f965c | 2019-09-24 10:40:46 -0700 | [diff] [blame] | 88 | rpc ShutdownONU (ONURequest) returns (Response) {} |
| 89 | rpc PoweronONU (ONURequest) returns (Response) {} |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 90 | } |