X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=RO%2Fosm_ro%2Fwim%2Fwim_thread.py;h=7d57d5589996d427cb0afc4b9ceee3612db0a56c;hb=7a1f525e6e76418766f5aed3874ec7f54333091f;hp=3466193528eb1a9ecbb916faeac5f9df7aa47a62;hpb=ed3e4d4fc2819e425bb8b165e43fcbac259d3f1b;p=osm%2FRO.git diff --git a/RO/osm_ro/wim/wim_thread.py b/RO/osm_ro/wim/wim_thread.py index 34661935..7d57d558 100644 --- a/RO/osm_ro/wim/wim_thread.py +++ b/RO/osm_ro/wim/wim_thread.py @@ -59,9 +59,9 @@ from .errors import ( InvalidParameters as Invalid, UndefinedAction, ) -from .failing_connector import FailingConnector -from .sdnconn import SdnConnectorError -from .wimconn_fake import FakeConnector +from osm_ro_plugin.sdn_failing import SdnFailingConnector +from osm_ro_plugin.sdnconn import SdnConnectorError +from osm_ro_plugin.sdn_dummy import SdnDummyConnector ACTIONS = { 'instance_wim_nets': wan_link_actions.ACTIONS @@ -69,7 +69,7 @@ ACTIONS = { CONNECTORS = { # "odl": wimconn_odl.OdlConnector, - "fake": FakeConnector, + "dummy": SdnDummyConnector, # Add extra connectors here not managed via plugins } @@ -110,8 +110,8 @@ class WimThread(threading.Thread): wim_account['name'], wim_account['uuid']) super(WimThread, self).__init__(name=name) self.plugins = plugins - if "rosdn_fake" not in self.plugins: - self.plugins["rosdn_fake"] = FakeConnector + if "rosdn_dummy" not in self.plugins: + self.plugins["rosdn_dummy"] = SdnDummyConnector self.name = name self.connector = None @@ -183,7 +183,7 @@ class WimThread(threading.Thread): error_msg_extra = ('Any task targeting WIM account {} ({}) will fail.' .format(account_id, self.wim_account.get('name'))) self.logger.warning(error_msg_extra) - return FailingConnector(error_msg + '\n' + error_msg_extra) + return SdnFailingConnector(error_msg + '\n' + error_msg_extra) @contextmanager def avoid_exceptions(self): @@ -388,7 +388,7 @@ class WimThread(threading.Thread): self.process_list('refresh')): sleep(self.WAITING_TIME) - if isinstance(self.connector, FailingConnector): + if isinstance(self.connector, SdnFailingConnector): # Wait sometime to try instantiating the connector # again and restart # Increase the recovery time if restarting is not