def _get_template_params(template, param_values):
    """Return all required parameter values for the specified template.
    :param dict template: Template JSON object.
    :param dict param_values: User provided parameter values.
    """
    param_keys = {}
    try:
        for param, values in template['parameters'].items():
            if 'type' not in values:
                raise ValueError('Parameter {} does not have type defined'.
                    format(param))
            try:
                value = param_values[param]
                if isinstance(value, dict) and value.get('value') != None:
                    param_keys[param] = value.get('value')
                else:
                    param_keys[param] = value
            except KeyError:
                param_keys[param] = values.get('defaultValue')
    except KeyError:
        pass
    return param_keys
