Skip to content

Commit

Permalink
[ptf]: Update remote platform port map (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuotian Cheng authored and pavel-shirshov committed Aug 29, 2017
1 parent b707f68 commit 2a06cb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansible/roles/test/files/ptftests/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_ifaces():
ifaces.append(iface)

# Sort before return
return sorted(ifaces, key=lambda x: int(x.replace('eth', '')))
return ifaces


def platform_config_update(config):
Expand All @@ -33,6 +33,6 @@ def platform_config_update(config):
@param config The configuration dictionary to use/update
"""

remote_port_map = {(0, i) : v for i, v in enumerate(get_ifaces())}
remote_port_map = {(0, int(i.replace('eth', ''))) : i for i in get_ifaces()}
config["port_map"] = remote_port_map.copy()
config["caps_table_idx"] = 0

0 comments on commit 2a06cb6

Please sign in to comment.