Skip to content

Commit 638c0bb

Browse files
author
Leopoldo
committed
Removes the build acl action from loop to make the ACL writing faster
1 parent 0536f83 commit 638c0bb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

networkapi/plugins/SDN/ODL/Generic.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ def del_flow(self, flow_id=0, nodes_ids=[]):
9696
def update_all_flows(self, data, flow_type=FlowTypes.ACL):
9797
current_flows = self.get_flows()
9898

99+
if flow_type == FlowTypes.ACL:
100+
builder = AclFlowBuilder(data, self.environment, version=self.version)
101+
new_flows_set = builder.build()
102+
99103
for node in current_flows.keys():
100104
log.info("Starting update all flows for node %s"%node)
101105

102-
if flow_type == FlowTypes.ACL:
103-
builder = AclFlowBuilder(data, self.environment, version=self.version)
104-
new_flows_set = builder.build()
105-
106106
#Makes a diff
107107
operations = self._diff_flows(current_flows[node], new_flows_set)
108108

0 commit comments

Comments
 (0)