[VOL-1037, VOL-1035] This commit consists of flow and groups
handling (from NBI to Adapters, including decomposition),
Change-Id: I4f6d9ecd3dee8a9b161708b20b0a68d030c0cb23
diff --git a/adapters/iadapter.py b/adapters/iadapter.py
index 8cdcd6e..0d32096 100644
--- a/adapters/iadapter.py
+++ b/adapters/iadapter.py
@@ -159,8 +159,9 @@
log.info('bulk-flow-update', device_id=device.id,
flows=flows, groups=groups)
assert len(groups.items) == 0
- handler = self.devices_handlers[device.id]
- return handler.update_flow_table(flows.items)
+ reactor.callLater(0, self.devices_handlers[device.id].update_flow_table, flows.items)
+ return device
+
def update_flows_incrementally(self, device, flow_changes, group_changes):
log.info('incremental-flow-update', device_id=device.id,
@@ -172,11 +173,12 @@
handler = self.devices_handlers[device.id]
# Remove flows
if len(flow_changes.to_remove.items) != 0:
- handler.remove_from_flow_table(flow_changes.to_remove.items)
+ reactor.callLater(0, handler.remove_from_flow_table, flow_changes.to_remove.items)
# Add flows
if len(flow_changes.to_add.items) != 0:
- handler.add_to_flow_table(flow_changes.to_add.items)
+ reactor.callLater(0, handler.add_to_flow_table, flow_changes.to_add.items)
+ return device
def update_pm_config(self, device, pm_config):
log.info("adapter-update-pm-config", device=device,