mirror of
https://github.com/samba-team/samba.git
synced 2025-07-23 20:59:10 +03:00
samba-tool visualize ntdsconn: properly sort/group vertices
The vertex is now a tuple, with the RODC state added. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
c3ad137eb6
commit
04a773f30f
@ -188,6 +188,12 @@ def get_dnstr_site(dn):
|
|||||||
return dn
|
return dn
|
||||||
|
|
||||||
|
|
||||||
|
def get_dnstrlist_site(t):
|
||||||
|
"""Helper function for sorting and grouping lists of (DN, ...) tuples
|
||||||
|
by site, if possible."""
|
||||||
|
return get_dnstr_site(t[0])
|
||||||
|
|
||||||
|
|
||||||
def colour_hash(x):
|
def colour_hash(x):
|
||||||
"""Generate a randomish but consistent darkish colour based on the
|
"""Generate a randomish but consistent darkish colour based on the
|
||||||
given object."""
|
given object."""
|
||||||
@ -586,13 +592,12 @@ class cmd_ntdsconn(GraphCommand):
|
|||||||
for e in source_denies:
|
for e in source_denies:
|
||||||
epilog.append(' %s -> %s\n' % e)
|
epilog.append(' %s -> %s\n' % e)
|
||||||
|
|
||||||
|
|
||||||
s = distance_matrix(vertices, graph_edges,
|
s = distance_matrix(vertices, graph_edges,
|
||||||
utf8=utf8,
|
utf8=utf8,
|
||||||
colour=color_scheme,
|
colour=color_scheme,
|
||||||
shorten_names=shorten_names,
|
shorten_names=shorten_names,
|
||||||
generate_key=key,
|
generate_key=key,
|
||||||
grouping_function=get_dnstr_site,
|
grouping_function=get_dnstrlist_site,
|
||||||
row_comments=rodc_status)
|
row_comments=rodc_status)
|
||||||
|
|
||||||
epilog = ''.join(epilog)
|
epilog = ''.join(epilog)
|
||||||
|
Reference in New Issue
Block a user