-
Type: Bug
-
Status: Resolved (View Workflow)
-
Priority: Medium
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: openomci
-
Labels:None
-
Story Points:1
-
Sprint:VOLTHA 2.0 Sprint 10, VOLTHA 2.0 Sprint 11
There is an error in the database.query call of voltha/extensions/omci/state_machines where the current device_id is not passed. This results in no previous bit map being found and newly_cleared/newly_raised alarms do not function properly.
This is due to the device_id not being passed to the expecting query function in alarm_db_extension. alarm_db_extension throws no errors since all the other args have defaults and the class_id is interpreted as the device id:
prev_entry = self._database.query(class_id, entity_id)
prev_bitmap = 0 if len(prev_entry) == 0 else long(prev_entry(key, '0'))
Should be:
prev_entry = self._database.query(self._device_id, class_id, entity_id)
prev_bitmap = 0 if len(prev_entry) == 0 else long(prev_entry(key, '0'))