Fixing issue of failing test case in case of consecutive device delete
Change-Id: I3b43002587929b6c8840314b58e8e02b4b259efd
diff --git a/rw_core/core/device/manager.go b/rw_core/core/device/manager.go
index cbc6bb9..461a0b8 100755
--- a/rw_core/core/device/manager.go
+++ b/rw_core/core/device/manager.go
@@ -1649,3 +1649,11 @@
//TODO Instead of directly sending to the kafka bus, queue the message and send it asynchronously
dMgr.RPCEventManager.SendRPCEvent(ctx, id, rpcEvent, category, subCategory, raisedTs)
}
+
+func (dMgr *Manager) GetTransientState(ctx context.Context, id string) (voltha.DeviceTransientState_Types, error) {
+ agent := dMgr.getDeviceAgent(ctx, id)
+ if agent == nil {
+ return voltha.DeviceTransientState_NONE, status.Errorf(codes.NotFound, "%s", id)
+ }
+ return agent.getTransientState(), nil
+}