[VOL-3318] : Framework for collecting Metrics from the ONU
- Currently implements collecting of OpticalPower Metrics and UNI status metrics
- Supports changing Metric collection frequency
- Use voltha-lib-go version 4.0.6
Change-Id: I9bd1ec8d8af9d739db96ae0303b6702dd3ce8520
diff --git a/internal/pkg/onuadaptercore/openonu.go b/internal/pkg/onuadaptercore/openonu.go
index f670437..c75dc97 100644
--- a/internal/pkg/onuadaptercore/openonu.go
+++ b/internal/pkg/onuadaptercore/openonu.go
@@ -424,7 +424,14 @@
//Update_pm_config returns PmConfigs nil or error
func (oo *OpenONUAC) Update_pm_config(ctx context.Context, device *voltha.Device, pmConfigs *voltha.PmConfigs) error {
- return errors.New("unImplemented")
+ logger.Infow(ctx, "update-pm-config", log.Fields{"device-id": device.Id})
+ if handler := oo.getDeviceHandler(ctx, device.Id, false); handler != nil {
+ handler.updatePmConfig(ctx, pmConfigs)
+ } else {
+ logger.Warnw(ctx, "no handler found for update-pm-config", log.Fields{"device-id": device.Id})
+ return fmt.Errorf(fmt.Sprintf("handler-not-found-%s", device.Id))
+ }
+ return nil
}
//Receive_packet_out sends packet out to the device
@@ -506,7 +513,7 @@
return nil, errors.New("unImplemented")
}
-//Single_get_value_request as needed by voltha-lib-go update to 4.0.xx?
+// Single_get_value_request - unimplemented
func (oo *OpenONUAC) Single_get_value_request(ctx context.Context, request extension.SingleGetValueRequest) (*extension.SingleGetValueResponse, error) {
return nil, errors.New("unImplemented")
}