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{ |
| 68 | string ChassisDeviceID=1; |
| 69 | string SlotDeviceID=2; |
| 70 | int32 PortNumber=3; |
| 71 | int32 OntNumber=4; |
| 72 | } |
| 73 | message AddOntReturn{ |
| 74 | bool Success=1; |
| 75 | Error error = 2; |
| 76 | } |
| 77 | |
| 78 | service AddChassis{ |
| 79 | rpc CreateChassis(AddChassisMessage) returns (AddChassisReturn) { |
| 80 | option(google.api.http) = { |
| 81 | post: "/1/CreateAbstractChassis" |
| 82 | body:"*" |
| 83 | }; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | service AddOLTChassis { |
| 88 | rpc CreateOLTChassis(AddOLTChassisMessage) returns (AddOLTChassisReturn) { |
| 89 | option(google.api.http) = { |
| 90 | post: "/1/CreateOLTChassis" |
| 91 | body:"*" |
| 92 | }; |
| 93 | } |
| 94 | } |
| 95 | service ActivateSlot{ |
| 96 | rpc EnableSlot(ActivateSlotMessage) returns (ActivateSlotReturn){ |
| 97 | option(google.api.http) = { |
| 98 | post: "/1/EnableSlot" |
| 99 | body:"*" |
| 100 | }; |
| 101 | } |
| 102 | } |
| 103 | service ActivateOnt { |
| 104 | rpc ProvisionOnt(AddOntMessage) returns (AddOntReturn) {} |
| 105 | } |
| 106 | |