kdarapu | b26b450 | 2019-10-05 03:02:33 +0530 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package techprofile |
| 18 | |
| 19 | import ( |
npujar | ec5762e | 2020-01-01 14:08:48 +0530 | [diff] [blame] | 20 | "context" |
| 21 | |
Esin Karaman | ccb714b | 2019-11-29 15:02:06 +0000 | [diff] [blame] | 22 | "github.com/opencord/voltha-lib-go/v3/pkg/db" |
| 23 | tp_pb "github.com/opencord/voltha-protos/v3/go/tech_profile" |
kdarapu | b26b450 | 2019-10-05 03:02:33 +0530 | [diff] [blame] | 24 | ) |
| 25 | |
| 26 | type TechProfileIf interface { |
sbarbari | a8910ba | 2019-11-05 10:12:23 -0500 | [diff] [blame] | 27 | SetKVClient() *db.Backend |
kdarapu | b26b450 | 2019-10-05 03:02:33 +0530 | [diff] [blame] | 28 | GetTechProfileInstanceKVPath(techProfiletblID uint32, uniPortName string) string |
npujar | ec5762e | 2020-01-01 14:08:48 +0530 | [diff] [blame] | 29 | 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 |
kdarapu | b26b450 | 2019-10-05 03:02:33 +0530 | [diff] [blame] | 32 | GetprotoBufParamValue(paramType string, paramKey string) int32 |
Girish Kumar | 8f73fe0 | 2019-12-09 13:19:37 +0000 | [diff] [blame] | 33 | GetUsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error) |
| 34 | GetDsScheduler(tpInstance *TechProfile) (*tp_pb.SchedulerConfig, error) |
kdarapu | b26b450 | 2019-10-05 03:02:33 +0530 | [diff] [blame] | 35 | GetTrafficScheduler(tpInstance *TechProfile, SchedCfg *tp_pb.SchedulerConfig, |
| 36 | ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler |
Girish Kumar | 8f73fe0 | 2019-12-09 13:19:37 +0000 | [diff] [blame] | 37 | GetTrafficQueues(tp *TechProfile, Dir tp_pb.Direction) ([]*tp_pb.TrafficQueue, error) |
Scott Baker | ee7c0a0 | 2020-01-07 11:12:26 -0800 | [diff] [blame] | 38 | GetMulticastTrafficQueues(tp *TechProfile) []*tp_pb.TrafficQueue |
kdarapu | b26b450 | 2019-10-05 03:02:33 +0530 | [diff] [blame] | 39 | GetGemportIDForPbit(tp *TechProfile, Dir tp_pb.Direction, pbit uint32) uint32 |
npujar | ec5762e | 2020-01-01 14:08:48 +0530 | [diff] [blame] | 40 | FindAllTpInstances(ctx context.Context, techProfiletblID uint32, ponIntf uint32, onuID uint32) []TechProfile |
kdarapu | b26b450 | 2019-10-05 03:02:33 +0530 | [diff] [blame] | 41 | } |