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