blob: 6604703ebce3d6f2754cb7653fe1afdd5844f713 [file] [log] [blame]
//Copyright 2017 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package api;
import "google/api/annotations.proto";
message EchoMessage{
string Ping =1;
}
message EchoReplyMessage{
string Pong =1;
}
message AddChassisMessage{
string CLLI =1;
string VCoreIP =2;
int32 VCorePort=3;
int32 Rack=4;
int32 Shelf=5;
}
message AddChassisReturn{
string DeviceID = 1;
}
message AddOLTChassisMessage{
string CLLI=1;
string SlotIP=2;
fixed32 SlotPort=3;
string Hostname=4;
fixed32 NumPorts = 5;
bool Activate = 6;
enum OltDriver {
openoltDriver= 0;
asfvolt16Driver=1;
adtranDriver=2;
tibitsDriver=3;
}
OltDriver Driver=7;
enum OltType{
edgecore=0;
adtran=1;
tibit=2;
}
OltType Type=8;
}
message AddOLTChassisReturn {
string DeviceID =1;
string ChassisDeviceID =2;
}
message AddOntMessage{
string CLLI=1;
int32 SlotNumber=2;
int32 PortNumber=3;
int32 OntNumber=4;
string SerialNumber=5;
}
message AddOntReturn{
bool Success=1;
}
message DeleteOntMessage{
string CLLI=1;
int32 SlotNumber=2;
int32 PortNumber=3;
int32 OntNumber=4;
string SerialNumber=5;
}
message DeleteOntReturn{
bool Success=1;
}
message OutputMessage{
string Something=1;
}
message OutputReturn{
bool Success=1;
}
service AbstractOLT{
rpc Echo(EchoMessage) returns (EchoReplyMessage){
option(google.api.http)={
post:"/v1/Echo"
body:"*"
};
}
rpc CreateChassis(AddChassisMessage) returns (AddChassisReturn) {
option(google.api.http) = {
post: "/v1/CreateAbstractChassis"
body:"*"
};
}
rpc CreateOLTChassis(AddOLTChassisMessage) returns (AddOLTChassisReturn) {
option(google.api.http) = {
post: "/v1/CreateOLTChassis"
body:"*"
};
}
rpc ProvisionOnt(AddOntMessage) returns (AddOntReturn) {
option(google.api.http) = {
post:"/v1/ProvsionOnt"
body:"*"
};
}
rpc DeleteOnt(DeleteOntMessage) returns (DeleteOntReturn){
option(google.api.http)={
post:"/v1/DeleteOnt"
body:"*"
};
}
rpc Output(OutputMessage)returns(OutputReturn){
option(google.api.http)={
post:"/v1/Output"
body:"*"
};
}
}