traffic_replay: Store total conversations on the replay context
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 13 Jun 2019 04:04:46 +0000 (16:04 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 24 Jul 2019 02:24:27 +0000 (02:24 +0000)
This is useful info to know, and will be used in subsequent commits.

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

index 7f720c98671bb4d48182bd8ea2d113db07ccf007..c511fef6557e3a2492c6d909e4a1b1663ac26316 100644 (file)
@@ -355,6 +355,7 @@ class ReplayContext(object):
                  server=None,
                  lp=None,
                  creds=None,
+                 total_conversations=None,
                  badpassword_frequency=None,
                  prefer_kerberos=None,
                  tempdir=None,
@@ -389,6 +390,7 @@ class ReplayContext(object):
         self.last_drsuapi_bad         = False
         self.last_netlogon_bad        = False
         self.last_samlogon_bad        = False
+        self.total_conversations      = total_conversations
         self.generate_ldap_search_tables()
 
     def generate_ldap_search_tables(self):
@@ -1607,6 +1609,7 @@ def replay(conversation_seq,
     context = ReplayContext(server=host,
                             creds=creds,
                             lp=lp,
+                            total_conversations=len(conversation_seq),
                             **kwargs)
 
     if len(accounts) < len(conversation_seq):