Skip to content

fix precedence in portstat CLI #2874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/portstat
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ class Portstat(object):
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
if multi_asic.is_multi_asic() or device_info.is_chassis() and not use_json:
if (multi_asic.is_multi_asic() or device_info.is_chassis()) and not use_json:
print("\nReminder: Please execute 'show interface counters -d all' to include internal links\n")

def cnstat_intf_diff_print(self, cnstat_new_dict, cnstat_old_dict, intf_list):
Expand Down Expand Up @@ -556,7 +556,7 @@ class Portstat(object):
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
if multi_asic.is_multi_asic() or device_info.is_chassis() and not use_json:
if (multi_asic.is_multi_asic() or device_info.is_chassis()) and not use_json:
print("\nReminder: Please execute 'show interface counters -d all' to include internal links\n")

def main():
Expand Down
1 change: 0 additions & 1 deletion tests/portstat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@
Reminder: Please execute 'show interface counters -d all' to include internal links
"""


intf_invalid_asic_error = """ValueError: Unknown Namespace asic99"""

intf_counters_detailed = """\
Expand Down