summaryrefslogtreecommitdiff
path: root/python/samba/tests/samba_tool/visualize.py
AgeCommit message (Collapse)AuthorFilesLines
2018-08-24PEP8: fix E305: expected 2 blank lines after class or function definition, ↵Joe Guo1-0/+1
found 1 Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-05-31samba-tool visualise: --xdot option for instant graphviz visualisationDouglas Bagnall1-0/+45
This is a convenience for people who have xdot (and X11). Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-31samba-tool viusalize: mark RODCs in distance matrixDouglas Bagnall1-2/+4
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>
2018-05-31samba-tool visualize ntdsconn: add --importldif optionDouglas Bagnall1-0/+16
This visualizes the NTDSConnections in an LDIF file exported via `samba_kcc --exportldif`. This functionality is already available in a roundabout way -- you can use `samba_kcc --import_ldif`, and use the DB that generates. This just shortens the process. The ldif import/export feature is useful for analysing AD networks offsite without exposing too much sensitive data. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-05-31samba-tool visualize tests: reduce noise on stdoutDouglas Bagnall1-5/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-04-30samba-tool visualize: use correct DC in graph labelDouglas Bagnall1-5/+10
We have been using a random DC (depending to hash order, which was not random enough on Python 2.7 to affect the tests). Reported-by: Noel Power <noel.power@suse.com> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <noel.power@suse.com>
2018-01-16python: fix the build with python3.Günther Deschner1-3/+3
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13221 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-01-13samba-tool visualize for understanding AD DC behaviourDouglas Bagnall1-0/+466
To work out what is happening in a replication graph, it is sometimes helpful to use visualisations. We introduce a samba-tool subcommand to write Graphviz dot output and generate text-based heatmaps of the distance in hops between DCs. There are two subcommands, two graphical modes, and (roughly) two modes of operation with respect to the location of authority. `samba-tool visualize ntdsconn` looks at NTDS Connections. `samba-tool visualize reps` looks at repsTo and repsFrom objects. In '--distance' mode (default), the distances between DCs are shown in a matrix in the terminal. With '--color=yes', this is depicted as a heatmap. With '--utf8' it is a lttle prettier. In '--dot' mode, Graphviz dot output is generated. When viewed using dot or xdot, this shows the network as a graph with DCs as vertices and connections edges. Certain types of degenerate edges are shown in different colours or line-styles. Normally samba-tool talks to one database; with the '-r' (a.k.a. '--talk-to-remote') option attempts are made to contact all the DCs known to the first database. This is necessary to get sensible results from `samba-tool visualize reps` because the repsFrom/To objects are not replicated, and it can reveal replication issues in other modes. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>