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