def _check_ext(ext): try: next(n for n, v in available if n == ext.plugin.metadata.type_name and (v is None or v == ext.plugin.metadata.type_version)) except StopIteration: LOG.warn(_LW("Can't load artifact %s: not in" " available_plugins list") % ext.name) raise exception.ArtifactLoadError(name=ext.name) LOG.info( _LI("Artifact %s has been successfully loaded"), ext.name) return True
def _all_forbidden(ext): LOG.warn(_LW("Can't load artifact %s: load disabled in config") % ext.name) raise exception.ArtifactLoadError(name=ext.name)