blob: ee67d2ce8cb94ac4026f540e52d6e3a6350ae77f [file] [log] [blame]
mpagenkoaf801632020-07-03 10:00:42 +00001/*
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 (
20 "context"
21
dbainbri4d3a0dc2020-12-02 00:33:42 +000022 "github.com/opencord/voltha-lib-go/v4/pkg/db"
23 tp_pb "github.com/opencord/voltha-protos/v4/go/tech_profile"
mpagenkoaf801632020-07-03 10:00:42 +000024)
25
26type TechProfileIf interface {
dbainbri4d3a0dc2020-12-02 00:33:42 +000027 SetKVClient(ctx context.Context, pathPrefix string) *db.Backend
28 GetTechProfileInstanceKVPath(ctx context.Context, techProfiletblID uint32, uniPortName string) string
mpagenkoaf801632020-07-03 10:00:42 +000029 GetTPInstanceFromKVStore(ctx context.Context, techProfiletblID uint32, path string) (interface{}, error)
30 CreateTechProfInstance(ctx context.Context, techProfiletblID uint32, uniPortName string, intfId uint32) (interface{}, error)
31 DeleteTechProfileInstance(ctx context.Context, techProfiletblID uint32, uniPortName string) error
dbainbri4d3a0dc2020-12-02 00:33:42 +000032 GetprotoBufParamValue(ctx context.Context, paramType string, paramKey string) int32
33 GetUsScheduler(ctx context.Context, tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
34 GetDsScheduler(ctx context.Context, tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
mpagenkoaf801632020-07-03 10:00:42 +000035 GetTrafficScheduler(tpInstance *TechProfile, SchedCfg *tp_pb.SchedulerConfig,
36 ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler
dbainbri4d3a0dc2020-12-02 00:33:42 +000037 GetTrafficQueues(ctx context.Context, tp *TechProfile, Dir tp_pb.Direction) ([]*tp_pb.TrafficQueue, error)
38 GetMulticastTrafficQueues(ctx context.Context, tp *TechProfile) []*tp_pb.TrafficQueue
39 GetGemportIDForPbit(ctx context.Context, tp interface{}, Dir tp_pb.Direction, pbit uint32) uint32
mpagenkoaf801632020-07-03 10:00:42 +000040 FindAllTpInstances(ctx context.Context, techProfiletblID uint32, ponIntf uint32, onuID uint32) interface{}
41}