Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 1 | //Copyright 2017 the original author or authors. |
| 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 api; |
| 17 | import "google/api/annotations.proto"; |
| 18 | |
donNewtonAlpha | b3279ea | 2018-09-18 15:55:32 -0400 | [diff] [blame] | 19 | message EchoMessage{ |
| 20 | string Ping =1; |
| 21 | } |
| 22 | message EchoReplyMessage{ |
| 23 | string Pong =1; |
| 24 | } |
| 25 | |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 26 | message AddChassisMessage{ |
| 27 | string CLLI =1; |
donNewtonAlpha | 57aa2ff | 2018-10-01 16:45:32 -0400 | [diff] [blame] | 28 | string XOSIP =2; |
| 29 | int32 XOSPort=3; |
| 30 | string XOSUser=4; |
| 31 | string XOSPassword=5; |
| 32 | int32 Rack=6; |
| 33 | int32 Shelf=7; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 34 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 35 | message AddChassisReturn{ |
| 36 | string DeviceID = 1; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 37 | } |
donNewtonAlpha | 57aa2ff | 2018-10-01 16:45:32 -0400 | [diff] [blame] | 38 | message ChangeXOSUserPasswordMessage{ |
| 39 | string CLLI =1; |
| 40 | string XOSUser=2; |
| 41 | string XOSPassword=3; |
| 42 | } |
| 43 | message ChangeXOSUserPasswordReturn{ |
| 44 | bool Success=1; |
| 45 | } |
| 46 | |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 47 | message AddOLTChassisMessage{ |
| 48 | string CLLI=1; |
| 49 | string SlotIP=2; |
| 50 | fixed32 SlotPort=3; |
| 51 | string Hostname=4; |
| 52 | fixed32 NumPorts = 5; |
| 53 | bool Activate = 6; |
| 54 | enum OltDriver { |
Don Newton | 276cd1f | 2019-02-06 17:14:03 -0500 | [diff] [blame^] | 55 | openolt= 0; |
| 56 | asfvolt16=1; |
| 57 | adtran=2; |
| 58 | tibits=3; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 59 | } |
| 60 | OltDriver Driver=7; |
| 61 | enum OltType{ |
| 62 | edgecore=0; |
Don Newton | 276cd1f | 2019-02-06 17:14:03 -0500 | [diff] [blame^] | 63 | adtranOlt=1; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 64 | tibit=2; |
| 65 | } |
| 66 | OltType Type=8; |
| 67 | |
| 68 | } |
| 69 | message AddOLTChassisReturn { |
| 70 | string DeviceID =1; |
| 71 | string ChassisDeviceID =2; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 72 | } |
donNewtonAlpha | f7cc999 | 2018-08-29 14:23:02 -0400 | [diff] [blame] | 73 | |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 74 | message AddOntMessage{ |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame] | 75 | string CLLI=1; |
| 76 | int32 SlotNumber=2; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 77 | int32 PortNumber=3; |
| 78 | int32 OntNumber=4; |
donNewtonAlpha | 4c0abcd | 2018-08-14 15:50:52 -0400 | [diff] [blame] | 79 | string SerialNumber=5; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 80 | } |
donNewtonAlpha | 292d143 | 2018-11-08 19:01:21 -0500 | [diff] [blame] | 81 | message PreProvisionOntMessage{ |
| 82 | string CLLI=1; |
| 83 | int32 SlotNumber=2; |
| 84 | int32 PortNumber=3; |
| 85 | int32 OntNumber=4; |
| 86 | uint32 STag=5; |
| 87 | uint32 CTag=6; |
| 88 | string NasPortID=7; |
| 89 | string CircuitID=8; |
| 90 | string TechProfile=9; |
| 91 | string SpeedProfile=10; |
| 92 | } |
Don Newton | 281e025 | 2018-10-22 14:38:50 -0400 | [diff] [blame] | 93 | message AddOntFullMessage{ |
| 94 | string CLLI=1; |
| 95 | int32 SlotNumber=2; |
| 96 | int32 PortNumber=3; |
| 97 | int32 OntNumber=4; |
| 98 | string SerialNumber=5; |
donNewtonAlpha | 292d143 | 2018-11-08 19:01:21 -0500 | [diff] [blame] | 99 | uint32 STag=6; |
| 100 | uint32 CTag=7; |
| 101 | string NasPortID=8; |
| 102 | string CircuitID=9; |
Don Newton | 281e025 | 2018-10-22 14:38:50 -0400 | [diff] [blame] | 103 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 104 | message AddOntReturn{ |
| 105 | bool Success=1; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 106 | } |
| 107 | |
donNewtonAlpha | f7cc999 | 2018-08-29 14:23:02 -0400 | [diff] [blame] | 108 | message DeleteOntMessage{ |
| 109 | string CLLI=1; |
| 110 | int32 SlotNumber=2; |
| 111 | int32 PortNumber=3; |
| 112 | int32 OntNumber=4; |
| 113 | string SerialNumber=5; |
| 114 | } |
| 115 | message DeleteOntReturn{ |
| 116 | bool Success=1; |
| 117 | } |
Don Newton | e973d34 | 2018-10-26 16:44:12 -0400 | [diff] [blame] | 118 | message ReflowMessage{ |
Don Newton | e973d34 | 2018-10-26 16:44:12 -0400 | [diff] [blame] | 119 | } |
| 120 | message ReflowReturn{ |
| 121 | bool Success=1; |
| 122 | } |
donNewtonAlpha | e7ab5b9 | 2018-09-27 15:09:14 -0400 | [diff] [blame] | 123 | message OutputMessage{ |
| 124 | string Something=1; |
| 125 | } |
| 126 | message OutputReturn{ |
| 127 | bool Success=1; |
| 128 | } |
donNewtonAlpha | 27ad20c | 2018-10-30 16:18:42 -0400 | [diff] [blame] | 129 | message FullInventoryMessage{ |
| 130 | } |
| 131 | message InventoryMessage{ |
| 132 | string Clli=1; |
| 133 | } |
| 134 | message InventoryReturn{ |
| 135 | string JsonDump=1; |
| 136 | } |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame] | 137 | service AbstractOLT{ |
donNewtonAlpha | b3279ea | 2018-09-18 15:55:32 -0400 | [diff] [blame] | 138 | rpc Echo(EchoMessage) returns (EchoReplyMessage){ |
| 139 | option(google.api.http)={ |
| 140 | post:"/v1/Echo" |
| 141 | body:"*" |
| 142 | }; |
| 143 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 144 | rpc CreateChassis(AddChassisMessage) returns (AddChassisReturn) { |
| 145 | option(google.api.http) = { |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame] | 146 | post: "/v1/CreateAbstractChassis" |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 147 | body:"*" |
| 148 | }; |
| 149 | } |
donNewtonAlpha | 57aa2ff | 2018-10-01 16:45:32 -0400 | [diff] [blame] | 150 | rpc ChangeXOSUserPassword(ChangeXOSUserPasswordMessage) returns(ChangeXOSUserPasswordReturn){ |
| 151 | option(google.api.http)={ |
| 152 | post:"/v1/ChangeXOSUserPassword" |
| 153 | body:"*" |
| 154 | }; |
| 155 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 156 | rpc CreateOLTChassis(AddOLTChassisMessage) returns (AddOLTChassisReturn) { |
| 157 | option(google.api.http) = { |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame] | 158 | post: "/v1/CreateOLTChassis" |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 159 | body:"*" |
| 160 | }; |
| 161 | } |
donNewtonAlpha | 292d143 | 2018-11-08 19:01:21 -0500 | [diff] [blame] | 162 | rpc PreProvisionOnt(PreProvisionOntMessage) returns (AddOntReturn) { |
| 163 | option(google.api.http) = { |
| 164 | post:"/v1/PreProvsionOnt" |
| 165 | body:"*" |
| 166 | }; |
| 167 | } |
| 168 | rpc ActivateSerial(AddOntMessage) returns (AddOntReturn) { |
| 169 | option(google.api.http) = { |
| 170 | post:"/v1/ActivateSerial" |
| 171 | body:"*" |
| 172 | }; |
| 173 | } |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame] | 174 | rpc ProvisionOnt(AddOntMessage) returns (AddOntReturn) { |
| 175 | option(google.api.http) = { |
| 176 | post:"/v1/ProvsionOnt" |
| 177 | body:"*" |
| 178 | }; |
| 179 | } |
Don Newton | 281e025 | 2018-10-22 14:38:50 -0400 | [diff] [blame] | 180 | rpc ProvisionOntFull(AddOntFullMessage) returns (AddOntReturn) { |
| 181 | option(google.api.http) = { |
| 182 | post:"/v1/ProvsionOtFull" |
| 183 | body:"*" |
| 184 | }; |
| 185 | } |
donNewtonAlpha | f7cc999 | 2018-08-29 14:23:02 -0400 | [diff] [blame] | 186 | rpc DeleteOnt(DeleteOntMessage) returns (DeleteOntReturn){ |
| 187 | option(google.api.http)={ |
| 188 | post:"/v1/DeleteOnt" |
| 189 | body:"*" |
| 190 | }; |
| 191 | } |
Don Newton | e973d34 | 2018-10-26 16:44:12 -0400 | [diff] [blame] | 192 | rpc Reflow(ReflowMessage)returns (ReflowReturn){ |
| 193 | option(google.api.http)={ |
| 194 | post:"/v1/Reflow" |
| 195 | body:"*" |
| 196 | |
| 197 | }; |
| 198 | } |
donNewtonAlpha | e7ab5b9 | 2018-09-27 15:09:14 -0400 | [diff] [blame] | 199 | rpc Output(OutputMessage)returns(OutputReturn){ |
| 200 | option(google.api.http)={ |
| 201 | post:"/v1/Output" |
Don Newton | e973d34 | 2018-10-26 16:44:12 -0400 | [diff] [blame] | 202 | body:"*" |
donNewtonAlpha | e7ab5b9 | 2018-09-27 15:09:14 -0400 | [diff] [blame] | 203 | }; |
| 204 | } |
donNewtonAlpha | 27ad20c | 2018-10-30 16:18:42 -0400 | [diff] [blame] | 205 | rpc GetFullInventory(FullInventoryMessage)returns(InventoryReturn){ |
| 206 | option(google.api.http)={ |
| 207 | post:"/v1/FullInventory" |
| 208 | body:"*" |
| 209 | }; |
| 210 | } |
| 211 | rpc GetInventory(InventoryMessage)returns(InventoryReturn){ |
| 212 | option(google.api.http)={ |
| 213 | post:"/v1/Inventory" |
| 214 | body:"*" |
| 215 | }; |
| 216 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 217 | } |
| 218 | |