Skip to content

Commit

Permalink
Changes from @fchareyron's suggested modifications
Browse files Browse the repository at this point in the history
These changes are hand picked from PR #17.

For #20 this fixes the bug where underlying `Agents` do not have their
`logdir` attribute set properly when passed to `pysipp.scenario`.

Also included is support for more command line flags including:
-oocsf, -users, -deadcall_wait and -trace_error_codes.

Closes #18
  • Loading branch information
Tyler Goodlet committed Jul 28, 2016
1 parent 7439ee4 commit f888d3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pysipp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def scenario(dirpath=None, logdir=None, proxyaddr=None, autolocalsocks=True,
if dirpath:
# deliver single scenario from dir
path, scen = next(
walk(dirpath, autolocalsocks=autolocalsocks, **scenkwargs)
walk(dirpath, autolocalsocks=autolocalsocks,
logdir=logdir, **scenkwargs)
)
else:
with plugin.register([netplug] if autolocalsocks else []):
Expand Down
4 changes: 4 additions & 0 deletions pysipp/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def todict(self):
# scenario config/ctl
'-sn {scen_name} ',
'-sf {scen_file} ',
'-oocsf {ooc_scen_file} ',
'-recv_timeout {recv_timeout} ',
'-timeout {timeout} ',
'-d {pause_duration} ',
Expand All @@ -209,6 +210,8 @@ def todict(self):
'-l {limit} ',
'-m {call_count} ',
'-rp {rate_period} ',
'-users {users} ',
'-deadcall_wait {deadcall_wait} ',
# data insertion
('-key {key_vals} ', DictField),
('-set {global_vars} ', DictField),
Expand All @@ -225,6 +228,7 @@ def todict(self):
('-aa {auto_answer}', BoolField),
('-trace_err {trace_error}', BoolField),
('-trace_calldebug {trace_calldebug}', BoolField),
('-trace_error_codes {trace_error_codes}', BoolField),
('-trace_msg {trace_message}', BoolField),
('-trace_logs {trace_log}', BoolField),
('-trace_screen {trace_screen}', BoolField),
Expand Down

1 comment on commit f888d3c

@fchareyron
Copy link

@fchareyron fchareyron commented on f888d3c Jul 29, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.