blob: d1b731360bef8b57b1f646998316e81a4eb97e14 [file] [log] [blame]
Matteo Scandolo4747d292019-08-05 11:50:18 -07001package devices
2
3import (
4 "context"
5 "errors"
6 "fmt"
Matteo Scandolo84f7d482019-08-08 19:00:47 -07007 "gerrit.opencord.org/bbsim/api/openolt"
Matteo Scandolo4747d292019-08-05 11:50:18 -07008 "github.com/looplab/fsm"
9 log "github.com/sirupsen/logrus"
10 "google.golang.org/grpc"
11 "net"
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070012 "os"
Matteo Scandolo4747d292019-08-05 11:50:18 -070013 "sync"
14)
15
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070016var oltLogger = log.WithFields(log.Fields{
Matteo Scandolo84f7d482019-08-08 19:00:47 -070017 "module": "OLT",
18})
19
Matteo Scandolo4747d292019-08-05 11:50:18 -070020func init() {
21 //log.SetReportCaller(true)
22 log.SetLevel(log.DebugLevel)
23}
24
Matteo Scandolo84f7d482019-08-08 19:00:47 -070025var olt = OltDevice{}
26
27func GetOLT() OltDevice {
28 return olt
29}
30
Matteo Scandolo4747d292019-08-05 11:50:18 -070031func CreateOLT(seq int, nni int, pon int, onuPerPon int) OltDevice {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070032 oltLogger.WithFields(log.Fields{
Matteo Scandolo4747d292019-08-05 11:50:18 -070033 "ID": seq,
34 "NumNni":nni,
35 "NumPon":pon,
36 "NumOnuPerPon":onuPerPon,
37 }).Debug("CreateOLT")
38
Matteo Scandolo84f7d482019-08-08 19:00:47 -070039 olt = OltDevice{
Matteo Scandolo4747d292019-08-05 11:50:18 -070040 ID: seq,
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070041 OperState: getOperStateFSM(func(e *fsm.Event) {
42 oltLogger.Debugf("Changing OLT OperState from %s to %s", e.Src, e.Dst)
43 }),
Matteo Scandolo4747d292019-08-05 11:50:18 -070044 NumNni:nni,
45 NumPon:pon,
46 NumOnuPerPon:onuPerPon,
47 Pons: []PonPort{},
48 Nnis: []NniPort{},
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070049 channel: make(chan Message),
Matteo Scandolo4747d292019-08-05 11:50:18 -070050 }
51
52 // OLT State machine
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070053 // NOTE do we need 2 state machines for the OLT? (InternalState and OperState)
Matteo Scandolo4747d292019-08-05 11:50:18 -070054 olt.InternalState = fsm.NewFSM(
55 "created",
56 fsm.Events{
57 {Name: "enable", Src: []string{"created"}, Dst: "enabled"},
58 {Name: "disable", Src: []string{"enabled"}, Dst: "disabled"},
59 },
60 fsm.Callbacks{
61 "enter_state": func(e *fsm.Event) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070062 oltLogger.Debugf("Changing OLT InternalState from %s to %s", e.Src, e.Dst)
Matteo Scandolo4747d292019-08-05 11:50:18 -070063 },
64 },
65 )
66
67 // create NNI Port
68 nniPort := NniPort{
69 ID: uint32(0),
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070070 OperState: getOperStateFSM(func(e *fsm.Event) {
71 oltLogger.Debugf("Changing NNI OperState from %s to %s", e.Src, e.Dst)
72 }),
Matteo Scandolo4747d292019-08-05 11:50:18 -070073 Type: "nni",
74 }
75 olt.Nnis = append(olt.Nnis, nniPort)
76
77 // create PON ports
78 for i := 0; i < pon; i++ {
79 p := PonPort{
80 NumOnu: olt.NumOnuPerPon,
81 ID: uint32(i),
Matteo Scandolo4747d292019-08-05 11:50:18 -070082 Type: "pon",
83 }
Matteo Scandolo9a3518c2019-08-13 14:36:01 -070084 p.OperState = getOperStateFSM(func(e *fsm.Event) {
85 oltLogger.WithFields(log.Fields{
86 "ID": p.ID,
87 }).Debugf("Changing PON Port OperState from %s to %s", e.Src, e.Dst)
88 })
Matteo Scandolo4747d292019-08-05 11:50:18 -070089
90 // create ONU devices
91 for j := 0; j < onuPerPon; j++ {
92 o := CreateONU(olt, p, uint32(j + 1))
93 p.Onus = append(p.Onus, o)
94 }
95
96 olt.Pons = append(olt.Pons, p)
97 }
98
99 wg := sync.WaitGroup{}
100
101 wg.Add(1)
102 go newOltServer(olt)
103 wg.Wait()
104 return olt
105}
106
107func newOltServer(o OltDevice) error {
108 // TODO make configurable
109 address := "0.0.0.0:50060"
Matteo Scandolo4747d292019-08-05 11:50:18 -0700110 lis, err := net.Listen("tcp", address)
111 if err != nil {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700112 oltLogger.Fatalf("OLT failed to listen: %v", err)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700113 }
114 grpcServer := grpc.NewServer()
115 openolt.RegisterOpenoltServer(grpcServer, o)
116
117 go grpcServer.Serve(lis)
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700118 oltLogger.Debugf("OLT Listening on: %v", address)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700119
120 return nil
121}
122
123// Device Methods
124
125func (o OltDevice) Enable (stream openolt.Openolt_EnableIndicationServer) error {
126
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700127 oltLogger.Debug("Enable OLT called")
Matteo Scandolo84f7d482019-08-08 19:00:47 -0700128
Matteo Scandolo4747d292019-08-05 11:50:18 -0700129 wg := sync.WaitGroup{}
130 wg.Add(1)
131
132 // create a channel for all the OLT events
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700133 go o.processOltMessages(stream)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700134
135 // enable the OLT
136 olt_msg := Message{
137 Type: OltIndication,
138 Data: OltIndicationMessage{
139 OperState: UP,
140 },
141 }
142 o.channel <- olt_msg
143
144 // send NNI Port Indications
145 for _, nni := range o.Nnis {
146 msg := Message{
147 Type: NniIndication,
148 Data: NniIndicationMessage{
149 OperState: UP,
150 NniPortID: nni.ID,
151 },
152 }
153 o.channel <- msg
154 }
155
156 // send PON Port indications
157 for _, pon := range o.Pons {
158 msg := Message{
159 Type: PonIndication,
160 Data: PonIndicationMessage{
161 OperState: UP,
162 PonPortID: pon.ID,
163 },
164 }
165 o.channel <- msg
166
167 for _, onu := range pon.Onus {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700168 go onu.processOnuMessages(stream)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700169 msg := Message{
170 Type: OnuDiscIndication,
171 Data: OnuDiscIndicationMessage{
172 Onu: onu,
173 OperState: UP,
174 },
175 }
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700176 onu.channel <- msg
Matteo Scandolo4747d292019-08-05 11:50:18 -0700177 }
178 }
179
180 wg.Wait()
181 return nil
182}
183
184// Helpers method
185
186func (o OltDevice) getPonById(id uint32) (*PonPort, error) {
187 for _, pon := range o.Pons {
188 if pon.ID == id {
189 return &pon, nil
190 }
191 }
192 return nil, errors.New(fmt.Sprintf("Cannot find PonPort with id %d in OLT %d", id, o.ID))
193}
194
195func (o OltDevice) getNniById(id uint32) (*NniPort, error) {
196 for _, nni := range o.Nnis {
197 if nni.ID == id {
198 return &nni, nil
199 }
200 }
201 return nil, errors.New(fmt.Sprintf("Cannot find NniPort with id %d in OLT %d", id, o.ID))
202}
203
Matteo Scandolo4747d292019-08-05 11:50:18 -0700204func (o OltDevice) sendOltIndication(msg OltIndicationMessage, stream openolt.Openolt_EnableIndicationServer) {
205 data := &openolt.Indication_OltInd{OltInd: &openolt.OltIndication{OperState: msg.OperState.String()}}
206 if err := stream.Send(&openolt.Indication{Data: data}); err != nil {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700207 oltLogger.Error("Failed to send Indication_OltInd: %v", err)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700208 }
209
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700210 oltLogger.WithFields(log.Fields{
Matteo Scandolo4747d292019-08-05 11:50:18 -0700211 "OperState": msg.OperState,
212 }).Debug("Sent Indication_OltInd")
213}
214
215func (o OltDevice) sendNniIndication(msg NniIndicationMessage, stream openolt.Openolt_EnableIndicationServer) {
216 nni, _ := o.getNniById(msg.NniPortID)
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700217 nni.OperState.Event("enable")
218 // NOTE Operstate may need to be an integer
Matteo Scandolo4747d292019-08-05 11:50:18 -0700219 operData := &openolt.Indication_IntfOperInd{IntfOperInd: &openolt.IntfOperIndication{
220 Type: nni.Type,
221 IntfId: nni.ID,
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700222 OperState: nni.OperState.Current(),
Matteo Scandolo4747d292019-08-05 11:50:18 -0700223 }}
224
225 if err := stream.Send(&openolt.Indication{Data: operData}); err != nil {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700226 oltLogger.Error("Failed to send Indication_IntfOperInd for NNI: %v", err)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700227 }
228
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700229 oltLogger.WithFields(log.Fields{
Matteo Scandolo4747d292019-08-05 11:50:18 -0700230 "Type": nni.Type,
231 "IntfId": nni.ID,
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700232 "OperState": nni.OperState.Current(),
Matteo Scandolo4747d292019-08-05 11:50:18 -0700233 }).Debug("Sent Indication_IntfOperInd for NNI")
234}
235
236func (o OltDevice) sendPonIndication(msg PonIndicationMessage, stream openolt.Openolt_EnableIndicationServer) {
237 pon, _ := o.getPonById(msg.PonPortID)
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700238 pon.OperState.Event("enable")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700239 discoverData := &openolt.Indication_IntfInd{IntfInd: &openolt.IntfIndication{
240 IntfId: pon.ID,
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700241 OperState: pon.OperState.Current(),
Matteo Scandolo4747d292019-08-05 11:50:18 -0700242 }}
243
244 if err := stream.Send(&openolt.Indication{Data: discoverData}); err != nil {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700245 oltLogger.Error("Failed to send Indication_IntfInd: %v", err)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700246 }
247
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700248 oltLogger.WithFields(log.Fields{
Matteo Scandolo4747d292019-08-05 11:50:18 -0700249 "IntfId": pon.ID,
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700250 "OperState": pon.OperState.Current(),
Matteo Scandolo4747d292019-08-05 11:50:18 -0700251 }).Debug("Sent Indication_IntfInd")
252
253 operData := &openolt.Indication_IntfOperInd{IntfOperInd: &openolt.IntfOperIndication{
254 Type: pon.Type,
255 IntfId: pon.ID,
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700256 OperState: pon.OperState.Current(),
Matteo Scandolo4747d292019-08-05 11:50:18 -0700257 }}
258
259 if err := stream.Send(&openolt.Indication{Data: operData}); err != nil {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700260 oltLogger.Error("Failed to send Indication_IntfOperInd for PON: %v", err)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700261 }
262
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700263 oltLogger.WithFields(log.Fields{
Matteo Scandolo4747d292019-08-05 11:50:18 -0700264 "Type": pon.Type,
265 "IntfId": pon.ID,
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700266 "OperState": pon.OperState.Current(),
Matteo Scandolo4747d292019-08-05 11:50:18 -0700267 }).Debug("Sent Indication_IntfOperInd for PON")
268}
269
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700270func (o OltDevice) processOltMessages(stream openolt.Openolt_EnableIndicationServer) {
271 oltLogger.Debug("Started OLT Indication Channel")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700272 for message := range o.channel {
273
Matteo Scandolo4747d292019-08-05 11:50:18 -0700274
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700275 oltLogger.WithFields(log.Fields{
276 "oltId": o.ID,
277 "messageType": message.Type,
278 }).Trace("Received message")
279
280 switch message.Type {
281 case OltIndication:
282 msg, _ := message.Data.(OltIndicationMessage)
283 if msg.OperState == UP {
Matteo Scandolo4747d292019-08-05 11:50:18 -0700284 o.InternalState.Event("enable")
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700285 o.OperState.Event("enable")
286 } else if msg.OperState == DOWN {
287 o.InternalState.Event("disable")
288 o.OperState.Event("disable")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700289 }
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700290 o.sendOltIndication(msg, stream)
291 case NniIndication:
292 msg, _ := message.Data.(NniIndicationMessage)
293 o.sendNniIndication(msg, stream)
294 case PonIndication:
295 msg, _ := message.Data.(PonIndicationMessage)
296 o.sendPonIndication(msg, stream)
297 default:
298 oltLogger.Warnf("Received unknown message data %v for type %v in OLT channel", message.Data, message.Type)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700299 }
300
301 }
302}
303
304// GRPC Endpoints
305
306func (o OltDevice) ActivateOnu(context context.Context, onu *openolt.Onu) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700307 oltLogger.WithFields(log.Fields{
Matteo Scandolo4747d292019-08-05 11:50:18 -0700308 "onuSerialNumber": onu.SerialNumber,
309 }).Info("Received ActivateOnu call from VOLTHA")
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700310
311 pon, _ := o.getPonById(onu.IntfId)
312 _onu, _ := pon.getOnuBySn(onu.SerialNumber)
313
314 // NOTE we need to immediately activate the ONU or the OMCI state machine won't start
Matteo Scandolo4747d292019-08-05 11:50:18 -0700315 msg := Message{
316 Type: OnuIndication,
317 Data: OnuIndicationMessage{
318 OnuSN: onu.SerialNumber,
319 PonPortID: onu.IntfId,
320 OperState: UP,
321 },
322 }
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700323 _onu.channel <- msg
Matteo Scandolo4747d292019-08-05 11:50:18 -0700324 return new(openolt.Empty) , nil
325}
326
327func (o OltDevice) DeactivateOnu(context.Context, *openolt.Onu) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700328 oltLogger.Error("DeactivateOnu not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700329 return new(openolt.Empty) , nil
330}
331
332func (o OltDevice) DeleteOnu(context.Context, *openolt.Onu) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700333 oltLogger.Error("DeleteOnu not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700334 return new(openolt.Empty) , nil
335}
336
337func (o OltDevice) DisableOlt(context.Context, *openolt.Empty) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700338 // NOTE when we disable the OLT should we disable NNI, PONs and ONUs altogether?
339 olt_msg := Message{
340 Type: OltIndication,
341 Data: OltIndicationMessage{
342 OperState: DOWN,
343 },
344 }
345 o.channel <- olt_msg
Matteo Scandolo4747d292019-08-05 11:50:18 -0700346 return new(openolt.Empty) , nil
347}
348
349func (o OltDevice) DisablePonIf(context.Context, *openolt.Interface) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700350 oltLogger.Error("DisablePonIf not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700351 return new(openolt.Empty) , nil
352}
353
354func (o OltDevice) EnableIndication(_ *openolt.Empty, stream openolt.Openolt_EnableIndicationServer) error {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700355 oltLogger.WithField("oltId", o.ID).Info("OLT receives EnableIndication call from VOLTHA")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700356 o.Enable(stream)
357 return nil
358}
359
360func (o OltDevice) EnablePonIf(context.Context, *openolt.Interface) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700361 oltLogger.Error("EnablePonIf not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700362 return new(openolt.Empty) , nil
363}
364
365func (o OltDevice) FlowAdd(context.Context, *openolt.Flow) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700366 oltLogger.Error("FlowAdd not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700367 return new(openolt.Empty) , nil
368}
369
370func (o OltDevice) FlowRemove(context.Context, *openolt.Flow) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700371 oltLogger.Error("FlowRemove not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700372 return new(openolt.Empty) , nil
373}
374
375func (o OltDevice) HeartbeatCheck(context.Context, *openolt.Empty) (*openolt.Heartbeat, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700376 oltLogger.Error("HeartbeatCheck not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700377 return new(openolt.Heartbeat) , nil
378}
379
380func (o OltDevice) GetDeviceInfo(context.Context, *openolt.Empty) (*openolt.DeviceInfo, error) {
381
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700382 oltLogger.WithField("oltId", o.ID).Info("OLT receives GetDeviceInfo call from VOLTHA")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700383 devinfo := new(openolt.DeviceInfo)
384 devinfo.Vendor = "BBSim"
385 devinfo.Model = "asfvolt16"
Matteo Scandolo84f7d482019-08-08 19:00:47 -0700386 devinfo.HardwareVersion = "emulated"
Matteo Scandolo4747d292019-08-05 11:50:18 -0700387 devinfo.FirmwareVersion = ""
388 devinfo.Technology = "xgspon"
389 devinfo.PonPorts = 1
390 devinfo.OnuIdStart = 1
391 devinfo.OnuIdEnd = 255
392 devinfo.AllocIdStart = 1024
393 devinfo.AllocIdEnd = 16383
394 devinfo.GemportIdStart = 1024
395 devinfo.GemportIdEnd = 65535
396 devinfo.FlowIdStart = 1
397 devinfo.FlowIdEnd = 16383
Matteo Scandolo84f7d482019-08-08 19:00:47 -0700398 devinfo.DeviceSerialNumber = fmt.Sprintf("BBSIM_OLT_%d", o.ID)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700399
400 return devinfo, nil
401}
402
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700403func (o OltDevice) OmciMsgOut(ctx context.Context, omci_msg *openolt.OmciMsg) (*openolt.Empty, error) {
404 oltLogger.Debugf("Recevied OmciMsgOut - IntfId: %d OnuId: %d", omci_msg.IntfId, omci_msg.OnuId)
405 pon, _ := o.getPonById(omci_msg.IntfId)
406 onu, _ := pon.getOnuById(omci_msg.OnuId)
407 msg := Message{
408 Type: OMCI,
409 Data: OmciMessage{
410 OnuSN: onu.SerialNumber,
411 OnuId: onu.ID,
412 msg: omci_msg,
413 },
414 }
415 onu.channel <- msg
Matteo Scandolo4747d292019-08-05 11:50:18 -0700416 return new(openolt.Empty) , nil
417}
418
419func (o OltDevice) OnuPacketOut(context.Context, *openolt.OnuPacket) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700420 oltLogger.Error("OnuPacketOut not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700421 return new(openolt.Empty) , nil
422}
423
424func (o OltDevice) Reboot(context.Context, *openolt.Empty) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700425 oltLogger.Info("Shutting Down, hope you're running in K8s...")
426 os.Exit(0)
Matteo Scandolo4747d292019-08-05 11:50:18 -0700427 return new(openolt.Empty) , nil
428}
429
430func (o OltDevice) ReenableOlt(context.Context, *openolt.Empty) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700431 oltLogger.Error("ReenableOlt not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700432 return new(openolt.Empty) , nil
433}
434
435func (o OltDevice) UplinkPacketOut(context context.Context, packet *openolt.UplinkPacket) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700436 oltLogger.Error("UplinkPacketOut not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700437 return new(openolt.Empty) , nil
438}
439
440func (o OltDevice) CollectStatistics(context.Context, *openolt.Empty) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700441 oltLogger.Error("CollectStatistics not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700442 return new(openolt.Empty) , nil
443}
444
445func (o OltDevice) CreateTconts(context context.Context, packet *openolt.Tconts) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700446 oltLogger.Error("CreateTconts not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700447 return new(openolt.Empty) , nil
448}
449
450func (o OltDevice) RemoveTconts(context context.Context, packet *openolt.Tconts) (*openolt.Empty, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700451 oltLogger.Error("RemoveTconts not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700452 return new(openolt.Empty) , nil
453}
454
455func (o OltDevice) GetOnuInfo(context context.Context, packet *openolt.Onu) (*openolt.OnuIndication, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700456 oltLogger.Error("GetOnuInfo not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700457 return new(openolt.OnuIndication) , nil
458}
459
460func (o OltDevice) GetPonIf(context context.Context, packet *openolt.Interface) (*openolt.IntfIndication, error) {
Matteo Scandolo9a3518c2019-08-13 14:36:01 -0700461 oltLogger.Error("GetPonIf not implemented")
Matteo Scandolo4747d292019-08-05 11:50:18 -0700462 return new(openolt.IntfIndication) , nil
463}