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 | |
| 18 | message PONPort { |
| 19 | int32 ID = 1; |
| 20 | string OperState = 2; |
| 21 | } |
| 22 | |
| 23 | message NNIPort { |
| 24 | int32 ID = 1; |
| 25 | string OperState = 2; |
| 26 | } |
| 27 | |
| 28 | message Olt { |
| 29 | int32 ID = 1; |
Matteo Scandolo | 8df63df | 2019-09-12 10:34:32 -0700 | [diff] [blame] | 30 | string SerialNumber = 2; |
| 31 | string OperState = 3; |
| 32 | string InternalState = 4; |
| 33 | repeated NNIPort NNIPorts = 5; |
| 34 | repeated PONPort PONPorts = 6; |
Matteo Scandolo | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | message ONU { |
| 38 | int32 ID = 1; |
| 39 | string SerialNumber = 2; |
| 40 | string OperState = 3; |
| 41 | string InternalState = 4; |
| 42 | int32 PonPortID = 5; |
Matteo Scandolo | 4b3fc7e | 2019-09-17 16:49:54 -0700 | [diff] [blame] | 43 | int32 STag = 6; |
| 44 | int32 CTag = 7; |
| 45 | string HwAddress = 8; |
Matteo Scandolo | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | message ONUs { |
| 49 | repeated ONU items = 1; |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | message VersionNumber { |
| 53 | string version = 1; |
| 54 | string buildTime = 2; |
| 55 | string commitHash = 3; |
| 56 | string gitStatus = 4; |
| 57 | } |
| 58 | |
Matteo Scandolo | 2bf742a | 2019-10-01 11:33:34 -0700 | [diff] [blame^] | 59 | message LogLevel { |
| 60 | string level = 1; |
| 61 | bool caller = 2; |
| 62 | } |
| 63 | |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 64 | message Empty {} |
| 65 | |
| 66 | service BBSim { |
| 67 | rpc Version(Empty) returns (VersionNumber) {} |
| 68 | rpc GetOlt(Empty) returns (Olt) {} |
Matteo Scandolo | 9a3518c | 2019-08-13 14:36:01 -0700 | [diff] [blame] | 69 | rpc GetONUs(Empty) returns (ONUs) {} |
Matteo Scandolo | 2bf742a | 2019-10-01 11:33:34 -0700 | [diff] [blame^] | 70 | rpc SetLogLevel(LogLevel) returns (LogLevel) {} |
Matteo Scandolo | 84f7d48 | 2019-08-08 19:00:47 -0700 | [diff] [blame] | 71 | } |