[VOL-5483] Add support at openonu adapter to fetch the current PM data from the supported ONT devices.

Change-Id: I205b4a59b2a4eacff71e2114de8ceb07d7d131e5
Signed-off-by: pnalmas <praneeth.nalmas@radisys.com>
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 337a97b..1bdeab0 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -5197,7 +5197,14 @@
 // getONUGEMStatsInfo - Get the GEM PM history data of the request ONT device
 func (dh *deviceHandler) getONUGEMStatsInfo(ctx context.Context) *extension.SingleGetValueResponse {
 	resp := dh.pOnuMetricsMgr.GetONUGEMCounters(ctx)
-	logger.Debugw(ctx, "Received response from AlarmManager for Active Alarms for DeviceEntry", log.Fields{"device-id": dh.DeviceID})
+	logger.Debugw(ctx, "Received response from ONU Metrics Manager for GEM Stats", log.Fields{"device-id": dh.DeviceID})
+	return resp
+}
+
+// getOnuFECStats - Get the GEM PM history data of the request ONT device
+func (dh *deviceHandler) getOnuFECStats(ctx context.Context) *extension.SingleGetValueResponse {
+	resp := dh.pOnuMetricsMgr.GetONUFECCounters(ctx)
+	logger.Debugw(ctx, "Received response from ONU Metrics Manager for FEC Stats", log.Fields{"device-id": dh.DeviceID})
 	return resp
 }
 
diff --git a/internal/pkg/core/openonu.go b/internal/pkg/core/openonu.go
index 0f6a887..e5e31fc 100755
--- a/internal/pkg/core/openonu.go
+++ b/internal/pkg/core/openonu.go
@@ -527,8 +527,11 @@
 			return resp, nil
 		case *extension.GetValueRequest_OnuAllocGemStats:
 			resp := handler.getONUGEMStatsInfo(ctx)
-			logger.Infow(ctx, "Received response for on demand active alarms request ", log.Fields{"response": resp})
+			logger.Infow(ctx, "Received response for on demand GEM counters ", log.Fields{"response": resp})
 			return resp, nil
+		case *extension.GetValueRequest_FecHistory:
+			return handler.getOnuFECStats(ctx), nil
+
 		default:
 			return uniprt.PostUniStatusErrResponse(extension.GetValueResponse_UNSUPPORTED), nil
 		}