Skip to content

Commit

Permalink
[acl_loader] fix show acl table (sonic-net#329)
Browse files Browse the repository at this point in the history
* sonic-utilities: Format show vlan config output

* Format the output of show vlan config

Signed-off-by: chenhu <chenhu@didichuxing.com>

* [acl_loader] fix show acl table ports

Signed-off-by: chenhu <chenhu@didiglobal.com>

* [acl_loader] sort show acl table ports

Signed-off-by: chenhu <chenhu@didiglobal.com>
  • Loading branch information
richard28530 authored and lguohan committed Oct 8, 2018
1 parent 54ebfc8 commit 7a51a85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acl_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ def show_table(self, table_name):
if not val["ports"]:
data.append([key, val["type"], "", val["policy_desc"]])
else:
ports = natsorted(val["ports"])
ports = val["ports"].split(",")
ports.sort(key=lambda name:int(name.strip('Ethernet')))
data.append([key, val["type"], ports[0], val["policy_desc"]])

if len(ports) > 1:
Expand Down

0 comments on commit 7a51a85

Please sign in to comment.