MCPcopy Create free account
hub / github.com/StackStorm/st2 / render_final_params

Function render_final_params

st2common/st2common/util/param.py:349–369  ·  view source on GitHub ↗

Renders missing parameters required for action to execute. Treats parameters from the dict as plain values instead of trying to render them again. Returns dicts for action and runner parameters.

(runner_parameters, action_parameters, params, action_context)

Source from the content-addressed store, hash-verified

347
348
349def render_final_params(runner_parameters, action_parameters, params, action_context):
350 """
351 Renders missing parameters required for action to execute. Treats parameters from the dict as
352 plain values instead of trying to render them again. Returns dicts for action and runner
353 parameters.
354 """
355 config = get_config(action_context.get("pack"), action_context.get("user"))
356
357 G = _create_graph(action_context, config)
358
359 # by that point, all params should already be resolved so any template should be treated value
360 [G.add_node(name, value=value) for name, value in six.iteritems(params)]
361 _process_defaults(G, [action_parameters, runner_parameters])
362 _validate(G)
363
364 context = _resolve_dependencies(G)
365 context = _cast_params_from(
366 context, context, [action_parameters, runner_parameters]
367 )
368
369 return _split_params(runner_parameters, action_parameters, context)
370
371
372def get_finalized_params(

Callers 1

get_finalized_paramsFunction · 0.85

Calls 8

get_configFunction · 0.90
_create_graphFunction · 0.85
_process_defaultsFunction · 0.85
_validateFunction · 0.85
_resolve_dependenciesFunction · 0.85
_cast_params_fromFunction · 0.85
_split_paramsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected