Skip to content

Commit

Permalink
fix mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
saklar13 committed Feb 27, 2019
1 parent 94041b9 commit 87acbad
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apcon_cli4/command_actions/autoload_actions.py
Expand Up @@ -129,9 +129,14 @@ def port_table(self):
src_port, connection_type, dst_port = match.groups()
map_type = map_types_dict.get(connection_type)

if map_type == 'bidi' or map_type == 'uni' and src_port == port:
incoming_port = Address(0, map_info.split()[-1][:1], dst_port)
port_info_dict["mapped_to"] = incoming_port
if map_type == 'uni' and dst_port == port:
mapped_port = Address(0, map_info.split()[-1][:1], src_port)
elif map_type == 'bidi':
mapped_port = Address(0, map_info.split()[-1][:1], dst_port)
else:
continue

port_info_dict["mapped_to"] = mapped_port

port_dict[Address(0, port[:1], port)] = port_info_dict
return port_dict

0 comments on commit 87acbad

Please sign in to comment.