X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=NG-RO%2Fosm_ng_ro%2Fns_thread.py;h=5df74c5c75763d4cfb7d9acb6077ede5f4946bdf;hb=686720bb2f845cd70af053e3b13ffb0a37f53691;hp=94af5a17836364606f551e73682296e13a6dcfcd;hpb=884862293ce112b057813f5811ac4f6adbb5f8c2;p=osm%2FRO.git diff --git a/NG-RO/osm_ng_ro/ns_thread.py b/NG-RO/osm_ng_ro/ns_thread.py index 94af5a17..5df74c5c 100644 --- a/NG-RO/osm_ng_ro/ns_thread.py +++ b/NG-RO/osm_ng_ro/ns_thread.py @@ -32,7 +32,7 @@ import yaml from copy import deepcopy from http import HTTPStatus from os import mkdir -from pkg_resources import iter_entry_points +from importlib_metadata import entry_points from shutil import rmtree from unittest.mock import Mock @@ -596,7 +596,7 @@ class VimInteractionImage(VimInteractionBase): ) elif len(vim_images) > 1: raise NsWorkerException( - "More than one network found with this criteria: '{}'".format( + "More than one image found with this criteria: '{}'".format( task["find_params"] ) ) @@ -1229,8 +1229,8 @@ class NsWorker(threading.Thread): return self.plugins[name] try: - for v in iter_entry_points("osm_ro{}.plugins".format(type), name): - self.plugins[name] = v.load() + for ep in entry_points(group="osm_ro{}.plugins".format(type), name=name): + self.plugins[name] = ep.load() except Exception as e: raise NsWorkerException("Cannot load plugin osm_{}: {}".format(name, e))