Skip to content

Commit

Permalink
Reformatted the output.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrimesix committed Sep 30, 2023
1 parent 2298426 commit 4d178ee
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ixdiagnose/plugins/nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ def nfs_client_count_by_type(client: MiddlewareClient, context: Any) -> str:
nfs4_ver_info = [x["info"]["minor version"] for x in nfs4_clnt_info]

title = 'Number of NFS clients'
output = f'{"=" * (len(title) + 5)}\n {title}\n{"=" * (len(title) + 5)}\n\n'
output += f'NFSv3: {len(num_nfs3)}\n'
output += f'NFSv4.2: {nfs4_ver_info.count(2)}\n'
output += f'NFSv4.1: {nfs4_ver_info.count(1)}\n'
output += f'NFSv4.0: {nfs4_ver_info.count(0)}\n'
sep = '-----------------------------'
output = f'{sep}\n{title:^29}\n{sep}\n\n'
output += f'{"NFSv3":^10}{"NFSv4.0":^10}{"NFSv4.1":^10}{"NFSv4.2":^10}\n'
output += f'{"-----":^10}{"-------":^10}{"-------":^10}{"-------":^10}\n'
output += f'{len(num_nfs3):^10}'
output += f'{nfs4_ver_info.count(0):^10}{nfs4_ver_info.count(1):^10}{nfs4_ver_info.count(2):^10}'

return output

Expand Down

0 comments on commit 4d178ee

Please sign in to comment.