blob: 86f9a7298ac1eb47cd0f119c70f9c3d83423cead [file] [log] [blame]
Author Namea594e632018-08-10 11:33:58 -04001//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
15syntax = "proto3";
16package api;
17import "google/api/annotations.proto";
18
19message AddChassisMessage{
20 string CLLI =1;
21 string VCoreIP =2;
22 int32 VCorePort=3;
23}
24message Error {
25 int32 ErrorNum = 1;
26 string ErrorMessage=2;
27 int32 Serverity=3;
28}
29message AddChassisReturn{
30 string DeviceID = 1;
31 Error error = 2;
32}
33message 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}
55message AddOLTChassisReturn {
56 string DeviceID =1;
57 string ChassisDeviceID =2;
58 Error error = 3;
59}
60message ActivateSlotMessage{
61 string SlotDeviceID = 1;
62}
63message ActivateSlotReturn{
64 bool Success = 1;
65 Error error = 2;
66}
67message AddOntMessage{
donNewtonAlpha5234b132018-08-16 14:12:28 -040068 string CLLI=1;
69 int32 SlotNumber=2;
Author Namea594e632018-08-10 11:33:58 -040070 int32 PortNumber=3;
71 int32 OntNumber=4;
donNewtonAlpha4c0abcd2018-08-14 15:50:52 -040072 string SerialNumber=5;
Author Namea594e632018-08-10 11:33:58 -040073}
74message AddOntReturn{
75 bool Success=1;
76 Error error = 2;
77}
78
donNewtonAlpha5234b132018-08-16 14:12:28 -040079service AbstractOLT{
Author Namea594e632018-08-10 11:33:58 -040080 rpc CreateChassis(AddChassisMessage) returns (AddChassisReturn) {
81 option(google.api.http) = {
donNewtonAlpha5234b132018-08-16 14:12:28 -040082 post: "/v1/CreateAbstractChassis"
Author Namea594e632018-08-10 11:33:58 -040083 body:"*"
84 };
85 }
Author Namea594e632018-08-10 11:33:58 -040086
Author Namea594e632018-08-10 11:33:58 -040087 rpc CreateOLTChassis(AddOLTChassisMessage) returns (AddOLTChassisReturn) {
88 option(google.api.http) = {
donNewtonAlpha5234b132018-08-16 14:12:28 -040089 post: "/v1/CreateOLTChassis"
Author Namea594e632018-08-10 11:33:58 -040090 body:"*"
91 };
92 }
Author Namea594e632018-08-10 11:33:58 -040093 rpc EnableSlot(ActivateSlotMessage) returns (ActivateSlotReturn){
94 option(google.api.http) = {
donNewtonAlpha5234b132018-08-16 14:12:28 -040095 post: "/v1/EnableSlot"
Author Namea594e632018-08-10 11:33:58 -040096 body:"*"
97 };
98 }
donNewtonAlpha5234b132018-08-16 14:12:28 -040099 rpc ProvisionOnt(AddOntMessage) returns (AddOntReturn) {
100 option(google.api.http) = {
101 post:"/v1/ProvsionOnt"
102 body:"*"
103 };
104 }
Author Namea594e632018-08-10 11:33:58 -0400105}
106