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 | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | message ONUs { |
| 51 | repeated ONU items = 1; |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 52 | } |
| 53 | |
Matteo Scandolo | 10f965c | 2019-09-24 10:40:46 -0700 | [diff] [blame^] | 54 | // Inputs |
| 55 | |
| 56 | message ONURequest { |
| 57 | string SerialNumber = 1; |
| 58 | } |
| 59 | |
| 60 | // Utils |
| 61 | |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 62 | message VersionNumber { |
| 63 | string version = 1; |
| 64 | string buildTime = 2; |
| 65 | string commitHash = 3; |
| 66 | string gitStatus = 4; |
| 67 | } |
| 68 | |
Matteo Scandolo | 2bf742a | 2019-10-01 11:33:34 -0700 | [diff] [blame] | 69 | message LogLevel { |
| 70 | string level = 1; |
| 71 | bool caller = 2; |
| 72 | } |
| 73 | |
Matteo Scandolo | 10f965c | 2019-09-24 10:40:46 -0700 | [diff] [blame^] | 74 | message Response { |
| 75 | int32 status_code = 1; |
| 76 | string message = 2; |
| 77 | } |
| 78 | |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 79 | message Empty {} |
| 80 | |
| 81 | service BBSim { |
| 82 | rpc Version(Empty) returns (VersionNumber) {} |
| 83 | rpc GetOlt(Empty) returns (Olt) {} |
Matteo Scandolo | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 84 | rpc GetONUs(Empty) returns (ONUs) {} |
Matteo Scandolo | 2bf742a | 2019-10-01 11:33:34 -0700 | [diff] [blame] | 85 | rpc SetLogLevel(LogLevel) returns (LogLevel) {} |
Matteo Scandolo | 10f965c | 2019-09-24 10:40:46 -0700 | [diff] [blame^] | 86 | rpc ShutdownONU (ONURequest) returns (Response) {} |
| 87 | rpc PoweronONU (ONURequest) returns (Response) {} |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 88 | } |