From 08cfe043bcce0c20728b09865f192f9c61d864e7 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Fri, 21 Feb 2020 12:02:11 +0100 Subject: [PATCH] Renamed FakeWimconnector to DummyWimconnector Change-Id: I0e32bfd988a89d85cae56e85136773f1afd5cc32 Signed-off-by: garciadeblas --- RO/osm_ro/nfvo.py | 6 +++--- RO/osm_ro/wim/schemas.py | 4 ++-- RO/osm_ro/wim/wim_thread.py | 8 ++++---- RO/osm_ro/wim/{wimconn_fake.py => wimconn_dummy.py} | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) rename RO/osm_ro/wim/{wimconn_fake.py => wimconn_dummy.py} (97%) diff --git a/RO/osm_ro/nfvo.py b/RO/osm_ro/nfvo.py index 82096cd1..96e0a7a0 100644 --- a/RO/osm_ro/nfvo.py +++ b/RO/osm_ro/nfvo.py @@ -64,7 +64,7 @@ from pkg_resources import iter_entry_points # WIM from .wim import sdnconn -from .wim.wimconn_fake import FakeConnector +from .wim.wimconn_dummy import DummyConnector from .wim.failing_connector import FailingConnector from .http_tools import errors as httperrors from .wim.engine import WimEngine @@ -195,8 +195,8 @@ def start_service(mydb, persistence=None, wim=None): try: worker_id = get_process_id() - if "rosdn_fake" not in plugins: - plugins["rosdn_fake"] = FakeConnector + if "rosdn_dummy" not in plugins: + plugins["rosdn_dummy"] = DummyConnector # starts ovim library ovim = Sdn(db, plugins) diff --git a/RO/osm_ro/wim/schemas.py b/RO/osm_ro/wim/schemas.py index a887b65a..f20d418f 100644 --- a/RO/osm_ro/wim/schemas.py +++ b/RO/osm_ro/wim/schemas.py @@ -39,7 +39,7 @@ from ..openmano_schemas import ( ) # WIM ------------------------------------------------------------------------- -wim_types = ["tapi", "onos", "onos_vpls", "odl", "dynpac", "fake"] +wim_types = ["tapi", "onos", "onos_vpls", "odl", "dynpac", "dummy"] dpid_type = { "type": "string", @@ -96,7 +96,7 @@ wim_schema_properties = { "description": description_schema, "type": { "type": "string", - # "enum": ["tapi", "onos", "odl", "dynpac", "fake"] + # "enum": ["tapi", "onos", "odl", "dynpac", "dummy"] }, "wim_url": description_schema, "config": { diff --git a/RO/osm_ro/wim/wim_thread.py b/RO/osm_ro/wim/wim_thread.py index 34661935..bf35837e 100644 --- a/RO/osm_ro/wim/wim_thread.py +++ b/RO/osm_ro/wim/wim_thread.py @@ -61,7 +61,7 @@ from .errors import ( ) from .failing_connector import FailingConnector from .sdnconn import SdnConnectorError -from .wimconn_fake import FakeConnector +from .wimconn_dummy import DummyConnector ACTIONS = { 'instance_wim_nets': wan_link_actions.ACTIONS @@ -69,7 +69,7 @@ ACTIONS = { CONNECTORS = { # "odl": wimconn_odl.OdlConnector, - "fake": FakeConnector, + "dummy": DummyConnector, # 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"] = DummyConnector self.name = name self.connector = None diff --git a/RO/osm_ro/wim/wimconn_fake.py b/RO/osm_ro/wim/wimconn_dummy.py similarity index 97% rename from RO/osm_ro/wim/wimconn_fake.py rename to RO/osm_ro/wim/wimconn_dummy.py index 168996d7..3e15b645 100644 --- a/RO/osm_ro/wim/wimconn_fake.py +++ b/RO/osm_ro/wim/wimconn_dummy.py @@ -27,7 +27,7 @@ from http import HTTPStatus __author__ = "Alfonso Tierno " -class FakeConnector(SdnConnectorBase): +class DummyConnector(SdnConnectorBase): """Abstract base class for all the WIM connectors Arguments: @@ -44,8 +44,8 @@ class FakeConnector(SdnConnectorBase): An extra property, ``service_endpoint_mapping`` is created from ``config``. """ def __init__(self, wim, wim_account, config=None, logger=None): - self.logger = logger or logging.getLogger('openmano.sdnconn.fake') - super(FakeConnector, self).__init__(wim, wim_account, config, self.logger) + self.logger = logger or logging.getLogger('openmano.sdnconn.dummy') + super(DummyConnector, self).__init__(wim, wim_account, config, self.logger) self.logger.debug("__init: wim='{}' wim_account='{}'".format(wim, wim_account)) self.connections = {} self.counter = 0 -- 2.25.1