Skip to content

Commit 7a51a85

Browse files
richard28530lguohan
authored andcommitted
[acl_loader] fix show acl table (sonic-net#329)
* sonic-utilities: Format show vlan config output * Format the output of show vlan config Signed-off-by: chenhu <[email protected]> * [acl_loader] fix show acl table ports Signed-off-by: chenhu <[email protected]> * [acl_loader] sort show acl table ports Signed-off-by: chenhu <[email protected]>
1 parent 54ebfc8 commit 7a51a85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

acl_loader/main.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ def show_table(self, table_name):
498498
if not val["ports"]:
499499
data.append([key, val["type"], "", val["policy_desc"]])
500500
else:
501-
ports = natsorted(val["ports"])
501+
ports = val["ports"].split(",")
502+
ports.sort(key=lambda name:int(name.strip('Ethernet')))
502503
data.append([key, val["type"], ports[0], val["policy_desc"]])
503504

504505
if len(ports) > 1:

0 commit comments

Comments
 (0)