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 | |
| 19 | message AddChassisMessage{ |
| 20 | string CLLI =1; |
| 21 | string VCoreIP =2; |
| 22 | int32 VCorePort=3; |
| 23 | } |
| 24 | message Error { |
| 25 | int32 ErrorNum = 1; |
| 26 | string ErrorMessage=2; |
| 27 | int32 Serverity=3; |
| 28 | } |
| 29 | message AddChassisReturn{ |
| 30 | string DeviceID = 1; |
| 31 | Error error = 2; |
| 32 | } |
| 33 | message AddOLTChassisMessage{ |
| 34 | string CLLI=1; |
| 35 | string SlotIP=2; |
| 36 | fixed32 SlotPort=3; |
| 37 | string Hostname=4; |
| 38 | fixed32 NumPorts = 5; |
| 39 | bool Activate = 6; |
| 40 | enum OltDriver { |
| 41 | openoltDriver = 0; |
| 42 | asfvolt16Driver=1; |
| 43 | adtranDriver=2; |
| 44 | tibitsDriver=3; |
| 45 | } |
| 46 | OltDriver Driver=7; |
| 47 | enum OltType{ |
| 48 | edgecore=0; |
| 49 | adtran=1; |
| 50 | tibit=2; |
| 51 | } |
| 52 | OltType Type=8; |
| 53 | |
| 54 | } |
| 55 | message AddOLTChassisReturn { |
| 56 | string DeviceID =1; |
| 57 | string ChassisDeviceID =2; |
| 58 | Error error = 3; |
| 59 | } |
| 60 | message ActivateSlotMessage{ |
| 61 | string SlotDeviceID = 1; |
| 62 | } |
| 63 | message ActivateSlotReturn{ |
| 64 | bool Success = 1; |
| 65 | Error error = 2; |
| 66 | } |
| 67 | message AddOntMessage{ |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame^] | 68 | string CLLI=1; |
| 69 | int32 SlotNumber=2; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 70 | int32 PortNumber=3; |
| 71 | int32 OntNumber=4; |
donNewtonAlpha | 4c0abcd | 2018-08-14 15:50:52 -0400 | [diff] [blame] | 72 | string SerialNumber=5; |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 73 | } |
| 74 | message AddOntReturn{ |
| 75 | bool Success=1; |
| 76 | Error error = 2; |
| 77 | } |
| 78 | |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame^] | 79 | service AbstractOLT{ |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 80 | rpc CreateChassis(AddChassisMessage) returns (AddChassisReturn) { |
| 81 | option(google.api.http) = { |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame^] | 82 | post: "/v1/CreateAbstractChassis" |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 83 | body:"*" |
| 84 | }; |
| 85 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 86 | |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 87 | rpc CreateOLTChassis(AddOLTChassisMessage) returns (AddOLTChassisReturn) { |
| 88 | option(google.api.http) = { |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame^] | 89 | post: "/v1/CreateOLTChassis" |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 90 | body:"*" |
| 91 | }; |
| 92 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 93 | rpc EnableSlot(ActivateSlotMessage) returns (ActivateSlotReturn){ |
| 94 | option(google.api.http) = { |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame^] | 95 | post: "/v1/EnableSlot" |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 96 | body:"*" |
| 97 | }; |
| 98 | } |
donNewtonAlpha | 5234b13 | 2018-08-16 14:12:28 -0400 | [diff] [blame^] | 99 | rpc ProvisionOnt(AddOntMessage) returns (AddOntReturn) { |
| 100 | option(google.api.http) = { |
| 101 | post:"/v1/ProvsionOnt" |
| 102 | body:"*" |
| 103 | }; |
| 104 | } |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 105 | } |
| 106 | |