Skip to content

Commit

Permalink
bug fixes on port lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
OObasuyi committed Aug 24, 2022
1 parent 5111455 commit cd859e4
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions utilites.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,6 @@ def transform_acp(current_ruleset,self_instance):
else:
subset_rule['real_port'] = None


# dest_item = i.get('destinationPorts') if isinstance(i.get('destinationPorts'),list) else [i.get('destinationPorts')]
# for i in dest_item:
# #
# if i.get('destinationPorts')['objects'][0]['type'] == 'ProtocolPortObject':
# for port_item in self_instance.port_data:
# if port_item[0] == i.get('destinationPorts')['objects'][0]['name']:
# subset_rule['real_port'] = [f'{port_item[1]}:{port_item[2]}']
# elif i.get('destinationPorts')['objects'][0]['type'] == 'PortObjectGroup':
# for port_item in self_instance.port_group_object:
# if port_item[0] == i.get('destinationPorts')['objects'][0]['name']:
# # recurvsly look through the port objects for its names and get real port mapping from the port_data,
# subset_rule['real_port'] = [f'{port_item[1]}:{port_item[2]}' for port_list_item in port_item[1] for port_item in self_instance.port_data if port_item[0] == port_list_item[0]]

changed_ruleset.append(subset_rule)
current_ruleset = changed_ruleset
return pd.DataFrame(current_ruleset)
Expand Down

0 comments on commit cd859e4

Please sign in to comment.