| // |
| // 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"; |
| |
| //import "google/protobuf/empty.proto"; |
| import "bal_obj.proto"; |
| import "bal_model_types.proto"; |
| import "bal_errno.proto"; |
| |
| message BalErr { |
| BalErrno err = 1; |
| } |
| |
| message BalDefault { |
| string device_id = 1; /**< device id */ |
| } |
| |
| enum BalRebootStatus |
| { |
| BAL_OLT_UP_AFTER_REBOOT = 0; |
| BAL_OLT_UP_AFTER_ACTIVATION = 1; |
| BAL_OLT_STATUS_UNKNOWN = 2; |
| } |
| |
| message BalRebootState { |
| BalRebootStatus is_reboot = 1; |
| } |
| |
| /** |
| * BAL configuration object |
| */ |
| message BalCfg { |
| BalObj hdr = 1; // Transport header |
| oneof obj { |
| BalAccessTerminalCfg cfg = 2; // Access Terminal |
| BalFlowCfg flow = 3; // Flow |
| BalGroupCfg group = 4; |
| BalInterfaceCfg interface = 5; |
| BalPacketCfg packet = 6; |
| BalSubscriberTerminalCfg terminal = 7; |
| BalTmQueueCfg tm_queue_cfg = 8; |
| BalTmSchedCfg tm_sched_cfg = 9; |
| } |
| string device_id = 10; |
| } |
| |
| message BalInit { |
| string voltha_adapter_ip_port = 1; // IP:port of the VOLTHA Adapter |
| } |
| |
| message BalHeartbeat { |
| string device_id = 1; |
| } |
| |
| message BalReboot { |
| string device_id = 1; |
| } |
| |
| message BalKey { |
| BalObj hdr = 1; // Transport header |
| oneof obj { |
| BalAccessTerminalKey access_term_key = 2; |
| BalFlowKey flow_key = 3; |
| BalGroupKey group_key = 4; |
| BalInterfaceKey interface_key = 5; |
| BalSubscriberTerminalKey terminal_key = 6; |
| BalTmQueueKey tm_queue_key = 7; |
| BalTmSchedKey tm_sched_key = 8; |
| } |
| } |
| |
| service Bal { |
| /** |
| * Initialize the BAL Public API internal data structures |
| **/ |
| rpc BalApiInit(BalInit) returns(BalErr) {} |
| /** |
| * Un-initialize the BAL Public API internal data structures |
| **/ |
| rpc BalApiFinish(BalCfg) returns(BalErr) {} |
| /** |
| * BAL Public API Set (or modify) command. |
| * |
| * Set (or modify) the specified object instance (with implicit creation |
| * of dynamic objects) associated with the specified access-terminal device. |
| **/ |
| rpc BalCfgSet(BalCfg) returns(BalErr) {} |
| rpc BalCfgClear(BalKey) returns(BalErr) {} |
| rpc BalCfgGet(BalKey) returns(BalCfg) {} |
| rpc BalApiReboot(BalReboot) returns(BalErr) {} |
| rpc BalApiHeartbeat(BalHeartbeat) returns(BalRebootState) {} |
| rpc BalCfgStatGet(BalInterfaceKey) returns(BalInterfaceStat) {} |
| } |