Skip to content

Commit 9ecd11e

Browse files
author
marcus.vinicius
committed
Revert "Insert a try except to avoid break while removing an unexisting flow"
This reverts commit fa25369.
1 parent eb870e1 commit 9ecd11e

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

networkapi/plugins/SDN/ODL/Generic.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -88,31 +88,19 @@ def del_flow(self, flow_id=0, nodes_ids=[]):
8888
def update_all_flows(self, data, flow_type=FlowTypes.ACL):
8989
current_flows = self.get_flows()
9090

91-
if flow_type == FlowTypes.ACL:
92-
builder = AclFlowBuilder(data, self.environment, version=self.version)
93-
new_flows_set = builder.build()
94-
9591
for node in current_flows.keys():
9692
log.info("Starting update all flows for node %s"%node)
9793

98-
#if flow_type == FlowTypes.ACL:
99-
# builder = AclFlowBuilder(data, self.environment, version=self.version)
100-
# new_flows_set = builder.build()
94+
if flow_type == FlowTypes.ACL:
95+
builder = AclFlowBuilder(data, self.environment, version=self.version)
96+
new_flows_set = builder.build()
10197

10298
#Makes a diff
10399
operations = self._diff_flows(current_flows[node], new_flows_set)
104100

105101
try:
106102
for flow in operations["delete"]:
107-
108-
try:
109-
self.del_flow(flow_id=flow['id'], nodes_ids=[node])
110-
111-
except Exception as err:
112-
message = self._parse_errors(err.response.json())
113-
log.error("ERROR while removing a flow. It does not Exist: %s" % message)
114-
raise exceptions.CommandErrorException(msg=message)
115-
103+
self.del_flow(flow_id=flow['id'], nodes_ids=[node])
116104

117105
for flow in operations["insert"]:
118106
self._flow(flow_id=flow['id'],

0 commit comments

Comments
 (0)