traffic_replay: Split out random group membership generation logic
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 16 Oct 2018 23:54:03 +0000 (12:54 +1300)
committerTim Beale <timbeale@samba.org>
Sun, 4 Nov 2018 22:55:16 +0000 (23:55 +0100)
commit18740ec0dd5c0ed59fa03b2d9d0d34ea11436b00
tree0e2f77b49b4176edafb33c7e65a3894f369dab67
parente3e84b0f6dc4964f0ac9576051cc88422e548020
traffic_replay: Split out random group membership generation logic

This doesn't change functionality at all. It just moves the probability
calculations out into separate functions.

We want to tweak the logic/implementation behind this code, but the
rest of assign_groups() doesn't really care how the underlying
probabilities are worked out, so long as it gets a suitably random
user/group membership each time round the loop.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/emulate/traffic.py