blob: a45532733bb99c735a2e04b7007b6acbac32921b [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"
Girish Gowdra4c60c672021-07-26 13:30:57 -070021 "github.com/opencord/voltha-lib-go/v6/pkg/db"
Girish Gowdra89c985b2020-10-14 15:02:09 -070022 tp_pb "github.com/opencord/voltha-protos/v4/go/tech_profile"
Scott Baker2c1c4822019-10-16 11:02:41 -070023)
24
25type TechProfileIf interface {
Matteo Scandolof34d9082020-11-24 13:56:34 -080026 SetKVClient(ctx context.Context, pathPrefix string) *db.Backend
Girish Gowdra248971a2021-06-01 15:14:15 -070027 GetTechProfileInstanceKey(ctx context.Context, tpID uint32, uniPortName string) string
28 GetTPInstance(ctx context.Context, path string) (interface{}, error)
29 CreateTechProfileInstance(ctx context.Context, tpID uint32, uniPortName string, intfID uint32) (interface{}, error)
30 DeleteTechProfileInstance(ctx context.Context, tpID uint32, uniPortName string) error
31 GetUsScheduler(tpInstance *tp_pb.TechProfileInstance) *tp_pb.SchedulerConfig
32 GetDsScheduler(tpInstance *tp_pb.TechProfileInstance) *tp_pb.SchedulerConfig
33 GetTrafficScheduler(tpInstance *tp_pb.TechProfileInstance, SchedCfg *tp_pb.SchedulerConfig, ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler
34 GetTrafficQueues(ctx context.Context, tp *tp_pb.TechProfileInstance, Dir tp_pb.Direction) ([]*tp_pb.TrafficQueue, error)
35 GetMulticastTrafficQueues(ctx context.Context, tp *tp_pb.TechProfileInstance) []*tp_pb.TrafficQueue
Gamze Abaka1400dc42021-02-26 10:37:45 +000036 GetGemportForPbit(ctx context.Context, tp interface{}, Dir tp_pb.Direction, pbit uint32) interface{}
Gamze Abaka41b02e62021-06-10 07:58:00 +000037 FindAllTpInstances(ctx context.Context, oltDeviceID string, tpID uint32, ponIntf uint32, onuID uint32) interface{}
Matteo Scandolob85b2f02021-03-18 14:44:41 -070038 GetResourceID(ctx context.Context, IntfID uint32, ResourceType string, NumIDs uint32) ([]uint32, error)
39 FreeResourceID(ctx context.Context, IntfID uint32, ResourceType string, ReleaseContent []uint32) error
Scott Baker2c1c4822019-10-16 11:02:41 -070040}