def validate_action_parameters(action_ref, inputs):
    input_set = set(inputs.keys())

    # Get the list of action and runner parameters.
    parameters = action_db_util.get_action_parameters_specs(action_ref)

    # Check required parameters that have no default defined.
    required = set([param for param, meta in six.iteritems(parameters)
                    if meta.get('required', False) and 'default' not in meta])

    requires = sorted(required.difference(input_set))

    # Check unexpected parameters:
    unexpected = sorted(input_set.difference(set(parameters.keys())))

    return requires, unexpected
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/models/utils/action_param_utils.py/validate_action_parameters/original