1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-28 11:42:03 +03:00

samba-tool viusalize: mark RODCs in distance matrix

RODCs should not be replicating out, which means they look alarming
when they are working properly. We label them as RODCs to reminds users
that no outbound replication is expected.

This results in slightly rejigged output formatting.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall
2018-03-08 14:29:40 +13:00
committed by Andrew Bartlett
parent bdc0681eae
commit 9f52c19b80
3 changed files with 43 additions and 10 deletions

View File

@ -513,7 +513,8 @@ def distance_matrix(vertices, edges,
colour=None,
shorten_names=False,
generate_key=False,
grouping_function=None):
grouping_function=None,
row_comments=None):
lines = []
write = lines.append
@ -525,8 +526,10 @@ def distance_matrix(vertices, edges,
diagonal = '·'
#missing = '🕱'
missing = '-'
right_arrow = ''
else:
vertical, horizontal, corner, diagonal, missing = '|-,0-'
right_arrow = '<-'
colours = COLOUR_SETS[colour]
@ -607,6 +610,9 @@ def distance_matrix(vertices, edges,
link = '+'
row.append('%s%s%s' % (ct, link, c_reset))
if row_comments is not None and row_comments[i]:
row.append('%s %s %s' % (c_reset, right_arrow, row_comments[i]))
write('%s%*s%s %s%s' % (c, vlen, v, c_reset,
''.join(row), c_reset))