Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [diff] [blame] | 1 | /* |
Joey Armstrong | 7f8436c | 2023-07-09 20:23:27 -0400 | [diff] [blame] | 2 | * Copyright 2019-2023 Open Networking Foundation (ONF) and the ONF Contributors |
Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [diff] [blame] | 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 | |
| 17 | package techprofile |
| 18 | |
| 19 | import ( |
npujar | 5bf737f | 2020-01-16 19:35:25 +0530 | [diff] [blame] | 20 | "context" |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 21 | |
| 22 | "github.com/opencord/voltha-lib-go/v7/pkg/db" |
| 23 | tp_pb "github.com/opencord/voltha-protos/v5/go/tech_profile" |
Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [diff] [blame] | 24 | ) |
| 25 | |
| 26 | type TechProfileIf interface { |
Matteo Scandolo | f34d908 | 2020-11-24 13:56:34 -0800 | [diff] [blame] | 27 | SetKVClient(ctx context.Context, pathPrefix string) *db.Backend |
Holger Hildebrandt | 40bd267 | 2023-02-10 08:14:26 +0000 | [diff] [blame] | 28 | CloseKVClient(ctx context.Context) |
Girish Gowdra | 248971a | 2021-06-01 15:14:15 -0700 | [diff] [blame] | 29 | GetTechProfileInstanceKey(ctx context.Context, tpID uint32, uniPortName string) string |
| 30 | GetTPInstance(ctx context.Context, path string) (interface{}, error) |
| 31 | CreateTechProfileInstance(ctx context.Context, tpID uint32, uniPortName string, intfID uint32) (interface{}, error) |
| 32 | DeleteTechProfileInstance(ctx context.Context, tpID uint32, uniPortName string) error |
| 33 | GetUsScheduler(tpInstance *tp_pb.TechProfileInstance) *tp_pb.SchedulerConfig |
| 34 | GetDsScheduler(tpInstance *tp_pb.TechProfileInstance) *tp_pb.SchedulerConfig |
| 35 | GetTrafficScheduler(tpInstance *tp_pb.TechProfileInstance, SchedCfg *tp_pb.SchedulerConfig, ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler |
| 36 | GetTrafficQueues(ctx context.Context, tp *tp_pb.TechProfileInstance, Dir tp_pb.Direction) ([]*tp_pb.TrafficQueue, error) |
| 37 | GetMulticastTrafficQueues(ctx context.Context, tp *tp_pb.TechProfileInstance) []*tp_pb.TrafficQueue |
Gamze Abaka | 1400dc4 | 2021-02-26 10:37:45 +0000 | [diff] [blame] | 38 | GetGemportForPbit(ctx context.Context, tp interface{}, Dir tp_pb.Direction, pbit uint32) interface{} |
Gamze Abaka | 41b02e6 | 2021-06-10 07:58:00 +0000 | [diff] [blame] | 39 | FindAllTpInstances(ctx context.Context, oltDeviceID string, tpID uint32, ponIntf uint32, onuID uint32) interface{} |
Matteo Scandolo | b85b2f0 | 2021-03-18 14:44:41 -0700 | [diff] [blame] | 40 | GetResourceID(ctx context.Context, IntfID uint32, ResourceType string, NumIDs uint32) ([]uint32, error) |
| 41 | FreeResourceID(ctx context.Context, IntfID uint32, ResourceType string, ReleaseContent []uint32) error |
Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [diff] [blame] | 42 | } |