VOL-1145: deepcopy flow change data
Change-Id: I5890b33db0f68cce70f20a8959b3cde1a71884ac
diff --git a/voltha/core/device_agent.py b/voltha/core/device_agent.py
index d0247bd..5d7a8a2 100644
--- a/voltha/core/device_agent.py
+++ b/voltha/core/device_agent.py
@@ -19,6 +19,7 @@
between the Device object and its adapter.
"""
import structlog
+from copy import deepcopy
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks, returnValue
@@ -474,9 +475,10 @@
if self.device_type.accepts_add_remove_flow_updates:
try:
+ flow_changes = deepcopy(self.flow_changes)
yield self.adapter_agent.update_flows_incrementally(
device=self.last_data,
- flow_changes=self.flow_changes,
+ flow_changes=flow_changes,
group_changes=FlowGroupChanges()
)
except Exception as e: