def get_service_actions(service_dir, service_name, service_ver, config):
    """
    Gets the actions supported by a service

    Keyword arguments:
        service_dir -- top level service directory
        service_name -- name of service
        service_ver -- service version
        config -- dict to template action with
    """
    action_desc = _get_service_file(service_dir, service_name, service_ver,
            'actions', config=config)

    result = {}
    for k,v in action_desc.items():
        if '.' in k:
            raise ValueError('Key {} in {} v{} is invalid, no dots allowed'.format(
                k, service_name, service_ver))
        jsonschema.validate(v, _action_schema)

        if 'not_after' in v:
            # Prepend service name and dots to any not_after items
            not_after = []
            for subitem in v['not_after']:
                if '.' not in subitem:
                    not_after.append(service_name + '.' % subitem)
                else:
                    not_after.append(subitem)

            v['not_after'] = not_after


        # Prepend dot for the action name always
        result[service_name + '.' + k] = v

    return result
dataset/ETHPy150Open gosquadron/squadron/squadron/service.py/get_service_actions/operator `+` -> `%`