[VOL-2120] BBSim replies as the HeartbeatCheck message as the openolt agent does
Change-Id: I774f7a717d6bd6328d7d8b48617af8e42352dadf
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index 6464c18..db25f32 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -841,8 +841,11 @@
}
func (o OltDevice) HeartbeatCheck(context.Context, *openolt.Empty) (*openolt.Heartbeat, error) {
- oltLogger.Error("HeartbeatCheck not implemented")
- return new(openolt.Heartbeat), nil
+ res := openolt.Heartbeat{HeartbeatSignature: uint32(time.Now().Unix())}
+ oltLogger.WithFields(log.Fields{
+ "signature": res.HeartbeatSignature,
+ }).Trace("HeartbeatCheck")
+ return &res, nil
}
func (o OltDevice) GetDeviceInfo(context.Context, *openolt.Empty) (*openolt.DeviceInfo, error) {