Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [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 ( |
sbarbari | 1e3e29c | 2019-11-05 10:06:50 -0500 | [diff] [blame] | 20 | "github.com/opencord/voltha-lib-go/v2/pkg/db" |
Scott Baker | f1b096c | 2019-11-01 12:36:30 -0700 | [diff] [blame] | 21 | tp_pb "github.com/opencord/voltha-protos/v2/go/tech_profile" |
Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [diff] [blame] | 22 | ) |
| 23 | |
| 24 | type TechProfileIf interface { |
sbarbari | 1e3e29c | 2019-11-05 10:06:50 -0500 | [diff] [blame] | 25 | SetKVClient() *db.Backend |
Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [diff] [blame] | 26 | GetTechProfileInstanceKVPath(techProfiletblID uint32, uniPortName string) string |
| 27 | GetTPInstanceFromKVStore(techProfiletblID uint32, path string) (*TechProfile, error) |
| 28 | CreateTechProfInstance(techProfiletblID uint32, uniPortName string, intfId uint32) *TechProfile |
| 29 | DeleteTechProfileInstance(techProfiletblID uint32, uniPortName string) error |
| 30 | GetprotoBufParamValue(paramType string, paramKey string) int32 |
| 31 | GetUsScheduler(tpInstance *TechProfile) *tp_pb.SchedulerConfig |
| 32 | GetDsScheduler(tpInstance *TechProfile) *tp_pb.SchedulerConfig |
| 33 | GetTrafficScheduler(tpInstance *TechProfile, SchedCfg *tp_pb.SchedulerConfig, |
| 34 | ShapingCfg *tp_pb.TrafficShapingInfo) *tp_pb.TrafficScheduler |
| 35 | GetTrafficQueues(tp *TechProfile, Dir tp_pb.Direction) []*tp_pb.TrafficQueue |
| 36 | GetGemportIDForPbit(tp *TechProfile, Dir tp_pb.Direction, pbit uint32) uint32 |
Girish Gowdra | 9447baf | 2019-11-05 16:42:37 +0530 | [diff] [blame] | 37 | FindAllTpInstances(techProfiletblID uint32, ponIntf uint32, onuID uint32) []TechProfile |
Scott Baker | 2c1c482 | 2019-10-16 11:02:41 -0700 | [diff] [blame] | 38 | } |