blob: 4c11734b5ef6f6115c5386d61f4624286ad0915f [file] [log] [blame]
Girish Gowdra64503432020-01-07 10:59:10 +05301/*
2 * Copyright 2018-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 core
18
19import (
20 "errors"
Girish Gowdrad4bdd372020-03-09 14:56:15 -070021 "strings"
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +053022
Girish Gowdra64503432020-01-07 10:59:10 +053023 "github.com/opencord/openolt-scale-tester/config"
Girish Gowdra390f12f2021-07-01 15:53:49 -070024 "github.com/opencord/voltha-lib-go/v7/pkg/log"
25 oop "github.com/opencord/voltha-protos/v5/go/openolt"
26 tp_pb "github.com/opencord/voltha-protos/v5/go/tech_profile"
Girish Gowdra64503432020-01-07 10:59:10 +053027 "golang.org/x/net/context"
28 "google.golang.org/grpc/codes"
29 "google.golang.org/grpc/status"
30)
31
Girish Gowdra64503432020-01-07 10:59:10 +053032// A dummy struct to comply with the WorkFlow interface.
33type AttWorkFlow struct {
34}
35
Girish Gowdraef1b7c42020-01-23 16:27:48 +053036func AddDhcpIPV4Flow(oo oop.OpenoltClient, config *config.OpenOltScaleTesterConfig, rsrMgr *OpenOltResourceMgr) error {
Girish Gowdra5d7d6442020-09-08 17:03:11 -070037 var flowID uint64
Girish Gowdra64503432020-01-07 10:59:10 +053038 var err error
39
Girish Gowdraaeceb842020-08-21 12:10:39 -070040 if flowID, err = rsrMgr.GetFlowID(context.Background(), uint32(config.NniIntfID)); err != nil {
Girish Gowdra64503432020-01-07 10:59:10 +053041 return err
42 }
43
Girish Gowdraef1b7c42020-01-23 16:27:48 +053044 // DHCP IPV4
Girish Gowdra64503432020-01-07 10:59:10 +053045 flowClassifier := &oop.Classifier{EthType: 2048, IpProto: 17, SrcPort: 67, DstPort: 68, PktTagType: "double_tag"}
46 actionCmd := &oop.ActionCmd{TrapToHost: true}
47 actionInfo := &oop.Action{Cmd: actionCmd}
48
Girish Gowdraaeceb842020-08-21 12:10:39 -070049 flow := oop.Flow{AccessIntfId: -1, OnuId: -1, UniId: -1, FlowId: flowID,
Girish Gowdra64503432020-01-07 10:59:10 +053050 FlowType: "downstream", AllocId: -1, GemportId: -1,
51 Classifier: flowClassifier, Action: actionInfo,
Girish Gowdraef1b7c42020-01-23 16:27:48 +053052 Priority: 1000, PortNo: uint32(config.NniIntfID)}
Girish Gowdra64503432020-01-07 10:59:10 +053053
54 _, err = oo.FlowAdd(context.Background(), &flow)
55
56 st, _ := status.FromError(err)
57 if st.Code() == codes.AlreadyExists {
Girish Gowdra5d7d6442020-09-08 17:03:11 -070058 logger.Debugw(nil, "Flow already exists", log.Fields{"err": err, "deviceFlow": flow})
Girish Gowdra64503432020-01-07 10:59:10 +053059 return nil
60 }
61
62 if err != nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -070063 logger.Errorw(nil, "Failed to Add DHCP IPv4 to device", log.Fields{"err": err, "deviceFlow": flow})
Girish Gowdra64503432020-01-07 10:59:10 +053064 return err
65 }
Girish Gowdra5d7d6442020-09-08 17:03:11 -070066 logger.Debugw(nil, "DHCP IPV4 added to device successfully ", log.Fields{"flow": flow})
Girish Gowdraef1b7c42020-01-23 16:27:48 +053067
68 return nil
69}
70
71func AddDhcpIPV6Flow(oo oop.OpenoltClient, config *config.OpenOltScaleTesterConfig, rsrMgr *OpenOltResourceMgr) error {
Girish Gowdra390f12f2021-07-01 15:53:49 -070072 // We do not support DHCPv6 at the moment. Uncomment the below code when it is supported in the future
73 /*
74 var flowID uint64
75 var err error
Girish Gowdraef1b7c42020-01-23 16:27:48 +053076
Girish Gowdra390f12f2021-07-01 15:53:49 -070077 if flowID, err = rsrMgr.GetFlowID(context.Background(), uint32(config.NniIntfID)); err != nil {
78 return err
79 }
Girish Gowdraef1b7c42020-01-23 16:27:48 +053080
Girish Gowdra390f12f2021-07-01 15:53:49 -070081 // DHCP IPV6
82 flowClassifier := &oop.Classifier{EthType: 34525, IpProto: 17, SrcPort: 546, DstPort: 547, PktTagType: "double_tag"}
83 actionCmd := &oop.ActionCmd{TrapToHost: true}
84 actionInfo := &oop.Action{Cmd: actionCmd}
Girish Gowdraef1b7c42020-01-23 16:27:48 +053085
Girish Gowdra390f12f2021-07-01 15:53:49 -070086 flow := oop.Flow{AccessIntfId: -1, OnuId: -1, UniId: -1, FlowId: flowID,
87 FlowType: "downstream", AllocId: -1, GemportId: -1,
88 Classifier: flowClassifier, Action: actionInfo,
89 Priority: 1000, PortNo: uint32(config.NniIntfID)}
Girish Gowdraef1b7c42020-01-23 16:27:48 +053090
Girish Gowdra390f12f2021-07-01 15:53:49 -070091 _, err = oo.FlowAdd(context.Background(), &flow)
Girish Gowdraef1b7c42020-01-23 16:27:48 +053092
Girish Gowdra390f12f2021-07-01 15:53:49 -070093 st, _ := status.FromError(err)
94 if st.Code() == codes.AlreadyExists {
95 logger.Debugw(nil, "Flow already exists", log.Fields{"err": err, "deviceFlow": flow})
96 return nil
97 }
Girish Gowdraef1b7c42020-01-23 16:27:48 +053098
Girish Gowdra390f12f2021-07-01 15:53:49 -070099 if err != nil {
100 logger.Errorw(nil, "Failed to Add DHCP IPV6 to device", log.Fields{"err": err, "deviceFlow": flow})
101 return err
102 }
103 logger.Debugw(nil, "DHCP IPV6 added to device successfully ", log.Fields{"flow": flow})
104
105 */
Girish Gowdraef1b7c42020-01-23 16:27:48 +0530106
107 return nil
108}
109
Girish Gowdraef1b7c42020-01-23 16:27:48 +0530110func ProvisionAttNniTrapFlow(oo oop.OpenoltClient, config *config.OpenOltScaleTesterConfig, rsrMgr *OpenOltResourceMgr) error {
111 _ = AddDhcpIPV4Flow(oo, config, rsrMgr)
112 _ = AddDhcpIPV6Flow(oo, config, rsrMgr)
113 _ = AddLldpFlow(oo, config, rsrMgr)
Girish Gowdra64503432020-01-07 10:59:10 +0530114
115 return nil
116}
117
Girish Gowdra64503432020-01-07 10:59:10 +0530118func (att AttWorkFlow) ProvisionScheds(subs *Subscriber) error {
119 var trafficSched []*tp_pb.TrafficScheduler
120
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700121 logger.Info(nil, "provisioning-scheds")
Girish Gowdra64503432020-01-07 10:59:10 +0530122
123 if trafficSched = getTrafficSched(subs, tp_pb.Direction_DOWNSTREAM); trafficSched == nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700124 logger.Error(nil, "ds-traffic-sched-is-nil")
Girish Gowdra64503432020-01-07 10:59:10 +0530125 return errors.New(ReasonCodeToReasonString(SCHED_CREATION_FAILED))
126 }
127
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700128 logger.Debugw(nil, "Sending Traffic scheduler create to device",
Girish Gowdra64503432020-01-07 10:59:10 +0530129 log.Fields{"Direction": tp_pb.Direction_DOWNSTREAM, "TrafficScheds": trafficSched})
130 if _, err := subs.OpenOltClient.CreateTrafficSchedulers(context.Background(), &tp_pb.TrafficSchedulers{
131 IntfId: subs.PonIntf, OnuId: subs.OnuID,
132 UniId: subs.UniID, PortNo: subs.UniPortNo,
133 TrafficScheds: trafficSched}); err != nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700134 logger.Errorw(nil, "Failed to create traffic schedulers", log.Fields{"error": err})
Girish Gowdra64503432020-01-07 10:59:10 +0530135 return errors.New(ReasonCodeToReasonString(SCHED_CREATION_FAILED))
136 }
137
138 if trafficSched = getTrafficSched(subs, tp_pb.Direction_UPSTREAM); trafficSched == nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700139 logger.Error(nil, "us-traffic-sched-is-nil")
Girish Gowdra64503432020-01-07 10:59:10 +0530140 return errors.New(ReasonCodeToReasonString(SCHED_CREATION_FAILED))
141 }
142
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700143 logger.Debugw(nil, "Sending Traffic scheduler create to device",
Girish Gowdra64503432020-01-07 10:59:10 +0530144 log.Fields{"Direction": tp_pb.Direction_UPSTREAM, "TrafficScheds": trafficSched})
145 if _, err := subs.OpenOltClient.CreateTrafficSchedulers(context.Background(), &tp_pb.TrafficSchedulers{
146 IntfId: subs.PonIntf, OnuId: subs.OnuID,
147 UniId: subs.UniID, PortNo: subs.UniPortNo,
148 TrafficScheds: trafficSched}); err != nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700149 logger.Errorw(nil, "Failed to create traffic schedulers", log.Fields{"error": err})
Girish Gowdra64503432020-01-07 10:59:10 +0530150 return errors.New(ReasonCodeToReasonString(SCHED_CREATION_FAILED))
151 }
Girish Gowdra64503432020-01-07 10:59:10 +0530152 return nil
153}
154
Girish Gowdra64503432020-01-07 10:59:10 +0530155func (att AttWorkFlow) ProvisionQueues(subs *Subscriber) error {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700156 logger.Info(nil, "provisioning-queues")
Girish Gowdra64503432020-01-07 10:59:10 +0530157
158 var trafficQueues []*tp_pb.TrafficQueue
159 if trafficQueues = getTrafficQueues(subs, tp_pb.Direction_DOWNSTREAM); trafficQueues == nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700160 logger.Error(nil, "Failed to create traffic queues")
Girish Gowdra64503432020-01-07 10:59:10 +0530161 return errors.New(ReasonCodeToReasonString(QUEUE_CREATION_FAILED))
162 }
163
164 // On receiving the CreateTrafficQueues request, the driver should create corresponding
165 // downstream queues.
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700166 logger.Debugw(nil, "Sending Traffic Queues create to device",
Girish Gowdra64503432020-01-07 10:59:10 +0530167 log.Fields{"Direction": tp_pb.Direction_DOWNSTREAM, "TrafficQueues": trafficQueues})
168 if _, err := subs.OpenOltClient.CreateTrafficQueues(context.Background(),
169 &tp_pb.TrafficQueues{IntfId: subs.PonIntf, OnuId: subs.OnuID,
170 UniId: subs.UniID, PortNo: subs.UniPortNo,
171 TrafficQueues: trafficQueues}); err != nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700172 logger.Errorw(nil, "Failed to create traffic queues in device", log.Fields{"error": err})
Girish Gowdra64503432020-01-07 10:59:10 +0530173 return errors.New(ReasonCodeToReasonString(QUEUE_CREATION_FAILED))
174 }
175
176 if trafficQueues = getTrafficQueues(subs, tp_pb.Direction_UPSTREAM); trafficQueues == nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700177 logger.Error(nil, "Failed to create traffic queues")
Girish Gowdra64503432020-01-07 10:59:10 +0530178 return errors.New(ReasonCodeToReasonString(QUEUE_CREATION_FAILED))
179 }
180
181 // On receiving the CreateTrafficQueues request, the driver should create corresponding
182 // upstream queues.
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700183 logger.Debugw(nil, "Sending Traffic Queues create to device",
Girish Gowdra64503432020-01-07 10:59:10 +0530184 log.Fields{"Direction": tp_pb.Direction_UPSTREAM, "TrafficQueues": trafficQueues})
185 if _, err := subs.OpenOltClient.CreateTrafficQueues(context.Background(),
186 &tp_pb.TrafficQueues{IntfId: subs.PonIntf, OnuId: subs.OnuID,
187 UniId: subs.UniID, PortNo: subs.UniPortNo,
188 TrafficQueues: trafficQueues}); err != nil {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700189 logger.Errorw(nil, "Failed to create traffic queues in device", log.Fields{"error": err})
Girish Gowdra64503432020-01-07 10:59:10 +0530190 return errors.New(ReasonCodeToReasonString(QUEUE_CREATION_FAILED))
191 }
192
193 return nil
194}
195
196func (att AttWorkFlow) ProvisionEapFlow(subs *Subscriber) error {
Girish Gowdra64503432020-01-07 10:59:10 +0530197 var err error
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700198 var flowID uint64
Girish Gowdra64503432020-01-07 10:59:10 +0530199 var gemPortIDs []uint32
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700200 pbitToGem := make(map[uint32]uint32)
Girish Gowdra64503432020-01-07 10:59:10 +0530201
Girish Gowdra390f12f2021-07-01 15:53:49 -0700202 var allocID = subs.TpInstance[subs.TestConfig.TpIDList[0]].UsScheduler.AllocId
Girish Gowdra64503432020-01-07 10:59:10 +0530203 for _, gem := range subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700204 gemPortIDs = append(gemPortIDs, gem.GemportId)
Girish Gowdra64503432020-01-07 10:59:10 +0530205 }
206
Girish Gowdrad4bdd372020-03-09 14:56:15 -0700207 for idx, gemID := range gemPortIDs {
208 pBitMap := subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList[idx].PbitMap
209 for pos, pbitSet := range strings.TrimPrefix(pBitMap, "0b") {
210 if pbitSet == '1' {
211 pcp := uint32(len(strings.TrimPrefix(pBitMap, "0b"))) - 1 - uint32(pos)
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700212 pbitToGem[pcp] = gemID
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530213 }
Girish Gowdra64503432020-01-07 10:59:10 +0530214 }
Girish Gowdra64503432020-01-07 10:59:10 +0530215 }
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700216 // This flowID is not the BAL flow ID now, it is the voltha-flow-id
217 if flowID, err = subs.RsrMgr.GetFlowID(context.Background(), uint32(subs.PonIntf)); err != nil {
218 return errors.New(ReasonCodeToReasonString(FLOW_ID_GENERATION_FAILED))
219 }
220 if err := AddFlow(subs, EapolFlow, Upstream, flowID, allocID, 0, 0xff,
221 true, 0, pbitToGem); err != nil {
222 return err
223 }
224
Girish Gowdra64503432020-01-07 10:59:10 +0530225 return nil
226}
227
Girish Gowdraef1b7c42020-01-23 16:27:48 +0530228func (att AttWorkFlow) ProvisionDhcpIPV4Flow(subs *Subscriber) error {
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530229 var err error
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700230 var flowID uint64
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530231 var gemPortIDs []uint32
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700232 pbitToGem := make(map[uint32]uint32)
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530233
Girish Gowdra390f12f2021-07-01 15:53:49 -0700234 var allocID = subs.TpInstance[subs.TestConfig.TpIDList[0]].UsScheduler.AllocId
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530235 for _, gem := range subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700236 gemPortIDs = append(gemPortIDs, gem.GemportId)
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530237 }
238
Girish Gowdrad4bdd372020-03-09 14:56:15 -0700239 for idx, gemID := range gemPortIDs {
240 pBitMap := subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList[idx].PbitMap
241 for pos, pbitSet := range strings.TrimPrefix(pBitMap, "0b") {
242 if pbitSet == '1' {
243 pcp := uint32(len(strings.TrimPrefix(pBitMap, "0b"))) - 1 - uint32(pos)
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700244 pbitToGem[pcp] = gemID
Girish Gowdraef1b7c42020-01-23 16:27:48 +0530245 }
246 }
247 }
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700248
249 // This flowID is not the BAL flow ID now, it is the voltha-flow-id
250 if flowID, err = subs.RsrMgr.GetFlowID(context.Background(), uint32(subs.PonIntf)); err != nil {
251 return errors.New(ReasonCodeToReasonString(FLOW_ID_GENERATION_FAILED))
252 }
253 if err := AddFlow(subs, DhcpFlowIPV4, Upstream, flowID, allocID, 0, 0xff,
254 true, 0, pbitToGem); err != nil {
255 return err
256 }
Girish Gowdraef1b7c42020-01-23 16:27:48 +0530257 return nil
258}
259
260func (att AttWorkFlow) ProvisionDhcpIPV6Flow(subs *Subscriber) error {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700261 // We do not support DHCPv6 at the moment. Uncomment the below code when it is supported in the future
262 /*
263 var err error
264 var flowID uint64
265 var gemPortIDs []uint32
266 pbitToGem := make(map[uint32]uint32)
Girish Gowdraef1b7c42020-01-23 16:27:48 +0530267
Girish Gowdra390f12f2021-07-01 15:53:49 -0700268 var allocID = subs.TpInstance[subs.TestConfig.TpIDList[0]].UsScheduler.AllocId
269 for _, gem := range subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList {
270 gemPortIDs = append(gemPortIDs, gem.GemportId)
271 }
Girish Gowdraef1b7c42020-01-23 16:27:48 +0530272
Girish Gowdra390f12f2021-07-01 15:53:49 -0700273 for idx, gemID := range gemPortIDs {
274 pBitMap := subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList[idx].PbitMap
275 for pos, pbitSet := range strings.TrimPrefix(pBitMap, "0b") {
276 if pbitSet == '1' {
277 pcp := uint32(len(strings.TrimPrefix(pBitMap, "0b"))) - 1 - uint32(pos)
278 pbitToGem[pcp] = gemID
279 }
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530280 }
281 }
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700282
Girish Gowdra390f12f2021-07-01 15:53:49 -0700283 // This flowID is not the BAL flow ID now, it is the voltha-flow-id
284 if flowID, err = subs.RsrMgr.GetFlowID(context.Background(), uint32(subs.PonIntf)); err != nil {
285 return errors.New(ReasonCodeToReasonString(FLOW_ID_GENERATION_FAILED))
286 }
287 if err := AddFlow(subs, DhcpFlowIPV6, Upstream, flowID, allocID, 0, 0xff,
288 true, 0, pbitToGem); err != nil {
289 return err
290 }
291
292 */
Girish Gowdra64503432020-01-07 10:59:10 +0530293 return nil
294}
295
296func (att AttWorkFlow) ProvisionIgmpFlow(subs *Subscriber) error {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700297 logger.Info(nil, "att-workflow-does-not-support-igmp-yet--nothing-to-do")
Girish Gowdra64503432020-01-07 10:59:10 +0530298 return nil
299}
300
301func (att AttWorkFlow) ProvisionHsiaFlow(subs *Subscriber) error {
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530302 var err error
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700303 var flowIDUs, flowIDDs uint64
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530304 var gemPortIDs []uint32
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700305 pbitToGem := make(map[uint32]uint32)
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530306
Girish Gowdra390f12f2021-07-01 15:53:49 -0700307 var allocID = subs.TpInstance[subs.TestConfig.TpIDList[0]].UsScheduler.AllocId
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530308 for _, gem := range subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700309 gemPortIDs = append(gemPortIDs, gem.GemportId)
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530310 }
311
Girish Gowdrad4bdd372020-03-09 14:56:15 -0700312 for idx, gemID := range gemPortIDs {
313 pBitMap := subs.TpInstance[subs.TestConfig.TpIDList[0]].UpstreamGemPortAttributeList[idx].PbitMap
314 for pos, pbitSet := range strings.TrimPrefix(pBitMap, "0b") {
315 if pbitSet == '1' {
316 pcp := uint32(len(strings.TrimPrefix(pBitMap, "0b"))) - 1 - uint32(pos)
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700317 pbitToGem[pcp] = gemID
Thiyagarajan Subramanib83b0432020-01-08 13:43:28 +0530318 }
319 }
320 }
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700321
322 // This flowID is not the BAL flow ID now, it is the voltha-flow-id
323 if flowIDUs, err = subs.RsrMgr.GetFlowID(context.Background(), uint32(subs.PonIntf)); err != nil {
324 return errors.New(ReasonCodeToReasonString(FLOW_ID_GENERATION_FAILED))
325 }
326 if err := AddFlow(subs, HsiaFlow, Upstream, flowIDUs, allocID, 0, 0xff,
327 true, 0, pbitToGem); err != nil {
328 return err
329 }
330 if flowIDDs, err = subs.RsrMgr.GetFlowID(context.Background(), uint32(subs.PonIntf)); err != nil {
331 return errors.New(ReasonCodeToReasonString(FLOW_ID_GENERATION_FAILED))
332 }
333 if err := AddFlow(subs, HsiaFlow, Downstream, flowIDDs, allocID, 0, 0xff,
334 true, flowIDUs, pbitToGem); err != nil {
335 return err
336 }
Girish Gowdra64503432020-01-07 10:59:10 +0530337 return nil
338}
Orhan Kupusoglu66b00d82020-03-13 12:06:33 +0300339
340func (att AttWorkFlow) ProvisionVoipFlow(subs *Subscriber) error {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700341 logger.Info(nil, "att-workflow-does-not-support-voip-yet--nothing-to-do")
Orhan Kupusoglu66b00d82020-03-13 12:06:33 +0300342 return nil
343}
344
345func (att AttWorkFlow) ProvisionVodFlow(subs *Subscriber) error {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700346 logger.Info(nil, "att-workflow-does-not-support-vod-yet--nothing-to-do")
Orhan Kupusoglu66b00d82020-03-13 12:06:33 +0300347 return nil
348}
349
350func (att AttWorkFlow) ProvisionMgmtFlow(subs *Subscriber) error {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700351 logger.Info(nil, "att-workflow-does-not-support-mgmt-yet--nothing-to-do")
Orhan Kupusoglu66b00d82020-03-13 12:06:33 +0300352 return nil
353}
354
355func (att AttWorkFlow) ProvisionMulticastFlow(subs *Subscriber) error {
Girish Gowdra5d7d6442020-09-08 17:03:11 -0700356 logger.Info(nil, "att-workflow-does-not-support-multicast-yet--nothing-to-do")
Orhan Kupusoglu66b00d82020-03-13 12:06:33 +0300357 return nil
358}