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