blob: 797edc8bd0afa7487634e41ad61341652dc90b3a [file] [log] [blame]
kdarapub26b4502019-10-05 03:02:33 +05301/*
2 * Copyright 2019-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package techprofile
18
19import (
sbarbaria8910ba2019-11-05 10:12:23 -050020 "github.com/opencord/voltha-lib-go/v2/pkg/db"
Scott Bakerc6e54cb2019-11-04 09:31:25 -080021 tp_pb "github.com/opencord/voltha-protos/v2/go/tech_profile"
kdarapub26b4502019-10-05 03:02:33 +053022)
23
24type TechProfileIf interface {
sbarbaria8910ba2019-11-05 10:12:23 -050025 SetKVClient() *db.Backend
kdarapub26b4502019-10-05 03:02:33 +053026 GetTechProfileInstanceKVPath(techProfiletblID uint32, uniPortName string) string
27 GetTPInstanceFromKVStore(techProfiletblID uint32, path string) (*TechProfile, error)
Girish Kumar8f73fe02019-12-09 13:19:37 +000028 CreateTechProfInstance(techProfiletblID uint32, uniPortName string, intfId uint32) (*TechProfile, error)
kdarapub26b4502019-10-05 03:02:33 +053029 DeleteTechProfileInstance(techProfiletblID uint32, uniPortName string) error
30 GetprotoBufParamValue(paramType string, paramKey string) int32
Girish Kumar8f73fe02019-12-09 13:19:37 +000031 GetUsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
32 GetDsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
kdarapub26b4502019-10-05 03:02:33 +053033 GetTrafficScheduler(tpInstance *TechProfile, SchedCfg *tp_pb.SchedulerConfig,
34 ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler
Girish Kumar8f73fe02019-12-09 13:19:37 +000035 GetTrafficQueues(tp *TechProfile, Dir tp_pb.Direction) ([]*tp_pb.TrafficQueue, error)
kdarapub26b4502019-10-05 03:02:33 +053036 GetGemportIDForPbit(tp *TechProfile, Dir tp_pb.Direction, pbit uint32) uint32
Girish Gowdra54934262019-11-13 14:19:55 +053037 FindAllTpInstances(techProfiletblID uint32, ponIntf uint32, onuID uint32) []TechProfile
kdarapub26b4502019-10-05 03:02:33 +053038}