traffic replay: Store the instance id in the replay context
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 18 Jul 2019 01:39:20 +0000 (13:39 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 24 Jul 2019 02:24:27 +0000 (02:24 +0000)
Store the traffic runner instance id in the replay context.  Will be
used in subsequent commits.

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

index c511fef6557e3a2492c6d909e4a1b1663ac26316..b2175d3e4bf7137154e518b5ca83c11ed0fd3f83 100644 (file)
@@ -363,7 +363,8 @@ class ReplayContext(object):
                  ou=None,
                  base_dn=None,
                  domain=os.environ.get("DOMAIN"),
-                 domain_sid=None):
+                 domain_sid=None,
+                 instance_id=None):
         self.server                   = server
         self.netlogon_connection      = None
         self.creds                    = creds
@@ -379,6 +380,7 @@ class ReplayContext(object):
         self.global_tempdir           = tempdir
         self.domain_sid               = domain_sid
         self.realm                    = lp.get('realm')
+        self.instance_id              = instance_id
 
         # Bad password attempt controls
         self.badpassword_frequency    = badpassword_frequency
index 0d74c876d127b8823b8e10bb9483b87bf58b1653..d29f0a9839c05fd000a1d1c33e6f715c7e7981f4 100755 (executable)
@@ -416,7 +416,8 @@ def main():
                    ou=traffic.ou_name(ldb, opts.instance_id),
                    tempdir=tempdir,
                    stop_on_any_error=opts.stop_on_any_error,
-                   domain_sid=ldb.get_domain_sid())
+                   domain_sid=ldb.get_domain_sid(),
+                   instance_id=opts.instance_id)
 
     if opts.timing_data == '-':
         timing_dest = sys.stdout