blob: 8391a5b6de97fc9fab44d53fdb12bd4a9e18c651 [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 (
npujarec5762e2020-01-01 14:08:48 +053020 "context"
21
Esin Karamanccb714b2019-11-29 15:02:06 +000022 "github.com/opencord/voltha-lib-go/v3/pkg/db"
23 tp_pb "github.com/opencord/voltha-protos/v3/go/tech_profile"
kdarapub26b4502019-10-05 03:02:33 +053024)
25
26type TechProfileIf interface {
sbarbaria8910ba2019-11-05 10:12:23 -050027 SetKVClient() *db.Backend
kdarapub26b4502019-10-05 03:02:33 +053028 GetTechProfileInstanceKVPath(techProfiletblID uint32, uniPortName string) string
Takahiro Suzuki2ba0e0b2020-06-05 14:23:03 -070029 GetTPInstanceFromKVStore(ctx context.Context, techProfiletblID uint32, path string) (interface{}, error)
30 CreateTechProfInstance(ctx context.Context, techProfiletblID uint32, uniPortName string, intfId uint32) (interface{}, error)
npujarec5762e2020-01-01 14:08:48 +053031 DeleteTechProfileInstance(ctx context.Context, techProfiletblID uint32, uniPortName string) error
kdarapub26b4502019-10-05 03:02:33 +053032 GetprotoBufParamValue(paramType string, paramKey string) int32
Girish Kumar8f73fe02019-12-09 13:19:37 +000033 GetUsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
34 GetDsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error)
kdarapub26b4502019-10-05 03:02:33 +053035 GetTrafficScheduler(tpInstance *TechProfile, SchedCfg *tp_pb.SchedulerConfig,
36 ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler
Girish Kumar8f73fe02019-12-09 13:19:37 +000037 GetTrafficQueues(tp *TechProfile, Dir tp_pb.Direction) ([]*tp_pb.TrafficQueue, error)
Scott Bakeree7c0a02020-01-07 11:12:26 -080038 GetMulticastTrafficQueues(tp *TechProfile) []*tp_pb.TrafficQueue
Takahiro Suzuki2ba0e0b2020-06-05 14:23:03 -070039 GetGemportIDForPbit(tp interface{}, Dir tp_pb.Direction, pbit uint32) uint32
40 FindAllTpInstances(ctx context.Context, techProfiletblID uint32, ponIntf uint32, onuID uint32) interface{}
kdarapub26b4502019-10-05 03:02:33 +053041}