[SEBA-981] DTWorkflowDriver Service Instances status message remains same as ONU not found in whitelist after pushing ONU Whitelist with wrong PON port
Change-Id: I9804d055382d750fa3c6c6b9b4b2d0b0efbf5ecc
diff --git a/VERSION b/VERSION
index 38f77a6..e9307ca 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.1
+2.0.2
diff --git a/xos/synchronizer/model_policies/model_policy_dt_workflow_driver_whitelistentry.py b/xos/synchronizer/model_policies/model_policy_dt_workflow_driver_whitelistentry.py
index 9bd456c..94f9588 100755
--- a/xos/synchronizer/model_policies/model_policy_dt_workflow_driver_whitelistentry.py
+++ b/xos/synchronizer/model_policies/model_policy_dt_workflow_driver_whitelistentry.py
@@ -1,4 +1,3 @@
-
# Copyright 2020-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -43,6 +42,8 @@
si=si,
onu_state=si.admin_onu_state,
authentication_state=si.authentication_state)
+
+ si.status_message = message
si.save_changed_fields(always_update_timestamp=True)
def handle_update(self, whitelist):
diff --git a/xos/synchronizer/model_policies/test_model_policy_dt_workflow_driver_whitelistentry.py b/xos/synchronizer/model_policies/test_model_policy_dt_workflow_driver_whitelistentry.py
index 193845f..bb8a8e6 100755
--- a/xos/synchronizer/model_policies/test_model_policy_dt_workflow_driver_whitelistentry.py
+++ b/xos/synchronizer/model_policies/test_model_policy_dt_workflow_driver_whitelistentry.py
@@ -76,7 +76,7 @@
save_si.assert_called_once()
save_si.assert_called_with(
always_update_timestamp=True, update_fields=[
- 'admin_onu_state', 'serial_number', 'updated'])
+ 'admin_onu_state', 'serial_number', 'status_message', 'updated'])
def test_disable_onu(self):
si = DtWorkflowDriverServiceInstance(serial_number="BRCM333", owner_id=self.service.id, valid="invalid")
@@ -89,7 +89,7 @@
save_si.assert_called_once()
save_si.assert_called_with(
always_update_timestamp=True, update_fields=[
- 'admin_onu_state', 'serial_number', 'updated'])
+ 'admin_onu_state', 'serial_number', 'status_message', 'updated'])
def test_whitelist_update(self):
si = DtWorkflowDriverServiceInstance(serial_number="BRCM333", owner_id=self.service.id)