[VOL-3153]Update pm config fails for openonu device
Change-Id: I47201ac109e01e5ea331d927d4fb348f9b82494b
diff --git a/VERSION b/VERSION
index 6cdfe8d..35cee72 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.4.3-dev
+2.4.3
diff --git a/pyvoltha/adapters/extensions/events/kpi/onu/onu_omci_pm.py b/pyvoltha/adapters/extensions/events/kpi/onu/onu_omci_pm.py
index b95dae3..cfa3c7a 100644
--- a/pyvoltha/adapters/extensions/events/kpi/onu/onu_omci_pm.py
+++ b/pyvoltha/adapters/extensions/events/kpi/onu/onu_omci_pm.py
@@ -119,8 +119,8 @@
if self.default_freq != pm_config.default_freq:
# Update the callback to the new frequency.
self.default_freq = pm_config.default_freq
- self.lc.stop()
- self.lc.start(interval=self.default_freq / 10)
+ self.stop_collector()
+ self.start_collector()
if pm_config.grouped:
for group in pm_config.groups:
diff --git a/pyvoltha/adapters/extensions/events/kpi/onu/onu_pm_metrics.py b/pyvoltha/adapters/extensions/events/kpi/onu/onu_pm_metrics.py
index fddfc49..1fb29b6 100644
--- a/pyvoltha/adapters/extensions/events/kpi/onu/onu_pm_metrics.py
+++ b/pyvoltha/adapters/extensions/events/kpi/onu/onu_pm_metrics.py
@@ -88,8 +88,8 @@
if self.default_freq != pm_config.default_freq:
# Update the callback to the new frequency.
self.default_freq = pm_config.default_freq
- self.lc.stop()
- self.lc.start(interval=self.default_freq / 10)
+ self.stop_collector()
+ self.start_collector()
if pm_config.grouped:
for group in pm_config.groups:
diff --git a/pyvoltha/adapters/kafka/adapter_request_facade.py b/pyvoltha/adapters/kafka/adapter_request_facade.py
index 72bf076..2159ebe 100644
--- a/pyvoltha/adapters/kafka/adapter_request_facade.py
+++ b/pyvoltha/adapters/kafka/adapter_request_facade.py
@@ -27,7 +27,7 @@
from afkak.consumer import OFFSET_LATEST, OFFSET_EARLIEST
from pyvoltha.adapters.interface import IAdapterInterface
from voltha_protos.inter_container_pb2 import IntType, InterAdapterMessage, StrType, Error, ErrorCode
-from voltha_protos.device_pb2 import Device, Port, ImageDownload, SimulateAlarmRequest
+from voltha_protos.device_pb2 import Device, Port, ImageDownload, SimulateAlarmRequest, PmConfigs
from voltha_protos.openflow_13_pb2 import FlowChanges, FlowGroups, Flows, \
FlowGroupChanges, ofp_packet_out
from voltha_protos.voltha_pb2 import OmciTestRequest
@@ -185,6 +185,19 @@
return False, Error(code=ErrorCode.INVALID_PARAMETERS,
reason="device-invalid")
+ def update_pm_config(self, device, pm_configs, **kwargs):
+ d = Device()
+ if device:
+ device.Unpack(d)
+ else:
+ return False, Error(code=ErrorCode.INVALID_PARAMETERS,
+ reason="device-invalid")
+ pm = PmConfigs()
+ if pm_configs:
+ pm_configs.Unpack(pm)
+
+ return (True, self.adapter.update_pm_config(d, pm))
+
def download_image(self, device, request, **kwargs):
d = Device()
if device: