Fixing status handling when ONU is disabled
Change-Id: Icf29df5fd8c3556d7d5f1d1d2d3b674796b0e25a
diff --git a/VERSION b/VERSION
index 6d7de6e..516e6a4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.2
+1.0.3-dev
diff --git a/xos/synchronizer/event_steps/dhcp_event.py b/xos/synchronizer/event_steps/dhcp_event.py
index eec273d..b41f803 100644
--- a/xos/synchronizer/event_steps/dhcp_event.py
+++ b/xos/synchronizer/event_steps/dhcp_event.py
@@ -43,13 +43,14 @@
subscriber = RCORDSubscriber.objects.get(onu_device=onu_sn)
- self.log.debug("dhcp.events: Got event for subscriber", subscriber=subscriber, event_value=value, onu_sn=onu_sn)
+ self.log.info("dhcp.events: Got event for subscriber", subscriber=subscriber, event_value=value, onu_sn=onu_sn)
# NOTE it will be better to update the SI and use the model policy to update the subscriber,
# if this fails for any reason the event is lost
if subscriber.ip_address != value["ipAddress"] or \
subscriber.mac_address != value["macAddress"]:
+ # FIXME apparently it's always saving
subscriber.ip_address = value["ipAddress"]
subscriber.mac_address = value["macAddress"]
subscriber.save()
diff --git a/xos/synchronizer/model_policies/model_policy_att_workflow_driver_serviceinstance.py b/xos/synchronizer/model_policies/model_policy_att_workflow_driver_serviceinstance.py
index fb8a9d6..8513d41 100644
--- a/xos/synchronizer/model_policies/model_policy_att_workflow_driver_serviceinstance.py
+++ b/xos/synchronizer/model_policies/model_policy_att_workflow_driver_serviceinstance.py
@@ -44,6 +44,9 @@
# we validate the ONU state only if it is enabled or awaiting,
# if it's disabled it means someone has disabled it
self.validate_onu_state(si)
+ else:
+ # just clean the status
+ si.status_message = ""
# handling the subscriber status
subscriber = self.get_subscriber(si.serial_number)