blob: e605d49c002206b26d108c95343695082bbdffb3 [file] [log] [blame]
Scott Baker2c1c4822019-10-16 11:02:41 -07001/*
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 (
npujar5bf737f2020-01-16 19:35:25 +053020 "context"
21
serkant.uluderyab38671c2019-11-01 09:35:38 -070022 "github.com/opencord/voltha-lib-go/v3/pkg/db"
23 tp_pb "github.com/opencord/voltha-protos/v3/go/tech_profile"
Scott Baker2c1c4822019-10-16 11:02:41 -070024)
25
26type TechProfileIf interface {
sbarbari1e3e29c2019-11-05 10:06:50 -050027 SetKVClient() *db.Backend
Scott Baker2c1c4822019-10-16 11:02:41 -070028 GetTechProfileInstanceKVPath(techProfiletblID uint32, uniPortName string) string
npujar5bf737f2020-01-16 19:35:25 +053029 GetTPInstanceFromKVStore(ctx context.Context, techProfiletblID uint32, path string) (*TechProfile, error)
30 CreateTechProfInstance(ctx context.Context, techProfiletblID uint32, uniPortName string, intfId uint32) (*TechProfile, error)
31 DeleteTechProfileInstance(ctx context.Context, techProfiletblID uint32, uniPortName string) error
Scott Baker2c1c4822019-10-16 11:02:41 -070032 GetprotoBufParamValue(paramType string, paramKey string) int32
Girish Kumarb3c52d52019-12-06 12:14:14 +000033 GetUsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
34 GetDsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
Scott Baker2c1c4822019-10-16 11:02:41 -070035 GetTrafficScheduler(tpInstance *TechProfile, SchedCfg *tp_pb.SchedulerConfig,
36 ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler
Girish Kumarb3c52d52019-12-06 12:14:14 +000037 GetTrafficQueues(tp *TechProfile, Dir tp_pb.Direction) ([]*tp_pb.TrafficQueue, error)
Esin Karaman8aa75a72019-12-20 13:11:59 +000038 GetMulticastTrafficQueues(tp *TechProfile) []*tp_pb.TrafficQueue
Scott Baker2c1c4822019-10-16 11:02:41 -070039 GetGemportIDForPbit(tp *TechProfile, Dir tp_pb.Direction, pbit uint32) uint32
npujar5bf737f2020-01-16 19:35:25 +053040 FindAllTpInstances(ctx context.Context, techProfiletblID uint32, ponIntf uint32, onuID uint32) []TechProfile
Scott Baker2c1c4822019-10-16 11:02:41 -070041}