traffic_replay: Move machine account creation
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 5 Nov 2018 21:52:38 +0000 (10:52 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 7 Nov 2018 16:55:08 +0000 (17:55 +0100)
commit85b6d8898993c45726dd6c1afc2536ab79ba5a3c
tree89bc2ccc7ecdbdbbb886f37e6befa39500c924db
parentfd089c37a118e58d09fc04c16fdc3eee9d62d3d2
traffic_replay: Move machine account creation

I was assuming that generate_users_and_groups() only gets called in the
--generate-users-only case. However, it also gets called in the default
traffic replay case.

This patch reworks the code so that the number of machine accounts to
create gets passed in, and the 'create 25% more computers than users'
assumption only applies to the --generate-users-only case.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/emulate/traffic.py
script/traffic_replay