def load_role_definitions(self):
        """
        Load all the role definitions.

        :rtype: ``dict``
        """
        LOG.info('Loading role definitions from "%s"' % (self._role_definitions_path))
        file_paths = self._get_role_definitions_file_paths()

        result = {}
        for file_path in file_paths:
            LOG.debug('Loading role definition from: %s' % (file_path))
            role_definition_api = self.load_role_definition_from_file(file_path=file_path)
            role_name = role_definition_api.name
            enabled = getattr(role_definition_api, 'enabled', True)

            if role_name in result:
                raise ValueError('Duplicate definition file found for role "%s"' % (role_name))

            if not enabled:
                LOG.debug('Skipping disabled role "%s"' % (role_name))
                continue

            result[role_name] = role_definition_api

        return result
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/rbac/loader.py/RBACDefinitionsLoader.load_role_definitions/original