[VOL-4111] Moving Services under the UNI struct
Controlling the UNI state via OMCI Set Messages
Upgraded APIs to reflect the new format
Change-Id: I3a6c166205fad4a381e562ab3b873d03b633303e
diff --git a/internal/bbr/devices/olt.go b/internal/bbr/devices/olt.go
index b40bf58..39ce70b 100644
--- a/internal/bbr/devices/olt.go
+++ b/internal/bbr/devices/olt.go
@@ -42,7 +42,8 @@
BBSimPort string
BBSimApiPort string
- conn *grpc.ClientConn
+ conn *grpc.ClientConn
+ Client *openolt.OpenoltClient
TargetOnus int
CompletedOnus int // Number of ONUs that have received a DHCPAck
@@ -76,6 +77,7 @@
client, conn := Connect(o.BBSimIp, o.BBSimPort)
o.conn = conn
+ o.Client = &client
defer conn.Close()
deviceInfo, err := o.getDeviceInfo(client)
@@ -301,6 +303,7 @@
onu.Channel <- msg
}
+// packets arriving from the ONU and received in VOLTHA
func (o *OltMock) handlePktIndication(client openolt.OpenoltClient, pktIndication *openolt.PacketIndication) {
pkt := gopacket.NewPacket(pktIndication.Pkt, layers.LayerTypeEthernet, gopacket.Default)
@@ -344,7 +347,7 @@
}
service := s.(*devices.Service)
- onu := service.Onu
+ onu := service.UniPort.Onu
msg := types.Message{
Type: types.OnuPacketIn,