Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias identifier Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Index Num Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args defaults body Return Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad NameLoad body Expr Str Assign NameStore ListLoad Str Str FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Dict Assign AttributeStore NameLoad attr BoolOpOr AttributeLoad NameLoad attr Dict Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore NameLoad If NameLoad body Assign NameStore BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore CompareEq NameLoad Num Assign NameStore Dict Str Str Str Str Str UnaryOpNot NameLoad NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If CompareEq NameLoad Num body Assign NameStore NameLoad orelse If NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad Return TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A os N/A pwd N/A uuid oslo_config cfg eventlet.green subprocess st2common log logging st2actions.runners ActionRunner st2actions.runners ShellRunnerMixin st2common.models.system.action ShellCommandAction st2common.models.system.action ShellScriptAction st2common.constants.action LIVEACTION_STATUS_SUCCEEDED st2common.constants.action LIVEACTION_STATUS_FAILED st2common.constants.action LIVEACTION_STATUS_TIMED_OUT st2common.constants.runners LOCAL_RUNNER_DEFAULT_ACTION_TIMEOUT st2common.util.misc strip_shell_chars st2common.util.green.shell run_command st2common.util.shell kill_process N/A st2common.util.jsonify jsonify N/A __all__ N/A get_runner N/A LOG N/A N/A logging getLogger __name__ N/A DEFAULT_KWARG_OP -- N/A LOGGED_USER_USERNAME N/A N/A N/A pwd getpwuid N/A N/A os getuid N/A 0 N/A RUNNER_SUDO sudo N/A RUNNER_ON_BEHALF_USER user N/A RUNNER_COMMAND cmd N/A RUNNER_CWD cwd N/A RUNNER_ENV env N/A RUNNER_KWARG_OP kwarg_op N/A RUNNER_TIMEOUT timeout get_runner N/A N/A N/A N/A N/A N/A LocalShellRunner N/A str N/A N/A uuid uuid4 N/A LocalShellRunner N/A ActionRunner ShellRunnerMixin N/A N/A 
    Runner which executes actions locally using the user under which the action runner service is
    running or under the provided user.

    Note: The user under which the action runner service is running (stanley user by default) needs
    to have pasworless sudo access set up.
     N/A KEYS_TO_TRANSFORM N/A stdout stderr __init__ N/A N/A self runner_id N/A N/A N/A N/A N/A N/A super LocalShellRunner self __init__ runner_id runner_id N/A pre_run N/A N/A self N/A N/A N/A N/A self _sudo N/A N/A N/A self runner_parameters get RUNNER_SUDO False N/A N/A self _on_behalf_user N/A N/A N/A self context get RUNNER_ON_BEHALF_USER LOGGED_USER_USERNAME N/A N/A self _user N/A N/A N/A cfg CONF system_user user N/A N/A self _cwd N/A N/A N/A self runner_parameters get RUNNER_CWD None N/A N/A self _env N/A N/A N/A self runner_parameters get RUNNER_ENV N/A N/A N/A self _env N/A N/A self _env N/A N/A N/A self _kwarg_op N/A N/A N/A self runner_parameters get RUNNER_KWARG_OP DEFAULT_KWARG_OP N/A N/A self _timeout N/A N/A N/A self runner_parameters get RUNNER_TIMEOUT LOCAL_RUNNER_DEFAULT_ACTION_TIMEOUT N/A run N/A N/A self action_parameters N/A N/A N/A env_vars N/A self _env N/A N/A N/A self entry_point N/A N/A script_action False N/A command N/A N/A N/A self runner_parameters get RUNNER_COMMAND None N/A action N/A ShellCommandAction name N/A self action_name action_exec_id N/A str N/A self liveaction_id command command user N/A self _user env_vars env_vars sudo N/A self _sudo timeout N/A self _timeout N/A N/A script_action True N/A script_local_path_abs N/A self entry_point N/A N/A positional_args named_args N/A N/A self _get_script_args action_parameters N/A named_args N/A N/A self _transform_named_args named_args N/A action N/A ShellScriptAction name N/A self action_name action_exec_id N/A str N/A self liveaction_id script_local_path_abs script_local_path_abs named_args named_args positional_args positional_args user N/A self _user env_vars env_vars sudo N/A self _sudo timeout N/A self _timeout cwd N/A self _cwd N/A args N/A N/A action get_full_command_string N/A script_action N/A N/A args N/A chmod +x %s ; %s N/A script_local_path_abs args N/A env N/A N/A N/A os environ copy N/A N/A N/A env update env_vars N/A st2_env_vars N/A N/A self _get_common_action_env_variables N/A N/A N/A env update st2_env_vars N/A N/A N/A LOG info Executing action via LocalRunner: %s N/A self runner_id N/A N/A N/A LOG info N/A [Action info] name: %s, Id: %s, command: %s, user: %s, sudo: %s N/A N/A action name N/A action action_exec_id args N/A action user N/A action sudo N/A N/A exit_code stdout stderr timed_out N/A run_command cmd args stdin None stdout N/A subprocess PIPE stderr N/A subprocess PIPE shell True cwd N/A self _cwd env env timeout N/A self _timeout preexec_func N/A os setsid kill_func kill_process N/A error None N/A timed_out N/A N/A error N/A Action failed to complete in %s seconds N/A self _timeout N/A exit_code -9 N/A succeeded N/A exit_code 0 N/A result N/A failed succeeded return_code stdout stderr N/A succeeded succeeded exit_code N/A strip_shell_chars stdout N/A strip_shell_chars stderr N/A error N/A N/A N/A result N/A error error N/A N/A exit_code 0 N/A N/A status LIVEACTION_STATUS_SUCCEEDED N/A N/A timed_out N/A N/A status LIVEACTION_STATUS_TIMED_OUT N/A N/A status LIVEACTION_STATUS_FAILED N/A N/A status N/A N/A jsonify json_loads result N/A LocalShellRunner KEYS_TO_TRANSFORM None N/A N/A