Fixing bug 1437
This patchset fixes bug 1437. There will need to be done extra
changes to make logging better.
Change-Id: I2b0e477093eba798c6cd4ce7bcc105ee78b610ed
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
diff --git a/Dockerfile-local b/Dockerfile-local
index 92e4b03..72b28ce 100644
--- a/Dockerfile-local
+++ b/Dockerfile-local
@@ -20,6 +20,7 @@
RUN apt-get update && apt-get install -y git python3 python3-pip \
&& python3 -m pip install --upgrade pip \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install libssl-dev libmysqlclient-dev mysql-client \
+ build-essential libffi-dev cargo \
&& DEBIAN_FRONTEND=noninteractive python3 -m pip install -U networking-l2gw \
&& DEBIAN_FRONTEND=noninteractive python3 -m pip install -U progressbar pyvmomi pyvcloud==19.1.1 \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install genisoimage
@@ -32,7 +33,7 @@
&& mv /tmp/libzenohc.so /usr/local/lib/libzenohc.so \
&& DEBIAN_FRONTEND=noninteractive python3 -m pip install -U jsonrpclib-pelix cvprac "azure==4.0.0" boto \
pyone "oca @ git+https://github.com/python-oca/python-oca#egg=oca" \
- pyangbind sphinx zenoh==0.3.0 yaks==0.3.0.post1 fog05-sdk==0.2.0 fog05==0.2.0
+ pyangbind sphinx zenoh==0.3.0 yaks==0.3.0.post1 fog05-sdk==0.2.0 fog05==0.2.0 "cryptography>=2.5"
# DEBIAN_FRONTEND=noninteractive apt-get -y install python-openstacksdk python-openstackclient && \
@@ -83,7 +84,7 @@
# logs
ENV OSMRO_LOG_LEVEL DEBUG
-CMD python3 -m osm_ng_ro.ro_main
+CMD ["python3", "-u", "-m", "osm_ng_ro.ro_main"]
# HEALTHCHECK --start-period=30s --interval=10s --timeout=5s --retries=12 \
# CMD curl --silent --fail http://localhost:9090/ro || exit 1
diff --git a/NG-RO/osm_ng_ro/ro_main.py b/NG-RO/osm_ng_ro/ro_main.py
index 768f205..485f15d 100644
--- a/NG-RO/osm_ng_ro/ro_main.py
+++ b/NG-RO/osm_ng_ro/ro_main.py
@@ -621,18 +621,18 @@
logger_server = logging.getLogger("cherrypy.error")
logger_access = logging.getLogger("cherrypy.access")
logger_cherry = logging.getLogger("cherrypy")
- logger_nbi = logging.getLogger("ro")
+ logger = logging.getLogger("ro")
if "log.file" in engine_config["global"]:
file_handler = logging.handlers.RotatingFileHandler(engine_config["global"]["log.file"],
maxBytes=100e6, backupCount=9, delay=0)
file_handler.setFormatter(log_formatter_simple)
logger_cherry.addHandler(file_handler)
- logger_nbi.addHandler(file_handler)
+ logger.addHandler(file_handler)
# log always to standard output
for format_, logger in {"ro.server %(filename)s:%(lineno)s": logger_server,
"ro.access %(filename)s:%(lineno)s": logger_access,
- "%(name)s %(filename)s:%(lineno)s": logger_nbi
+ "%(name)s %(filename)s:%(lineno)s": logger
}.items():
log_format_cherry = "%(asctime)s %(levelname)s {} %(message)s".format(format_)
log_formatter_cherry = logging.Formatter(log_format_cherry, datefmt='%Y-%m-%dT%H:%M:%S')
@@ -642,7 +642,7 @@
if engine_config["global"].get("log.level"):
logger_cherry.setLevel(engine_config["global"]["log.level"])
- logger_nbi.setLevel(engine_config["global"]["log.level"])
+ logger.setLevel(engine_config["global"]["log.level"])
# logging other modules
for k1, logname in {"message": "ro.msg", "database": "ro.db", "storage": "ro.fs"}.items():
engine_config[k1]["logger_name"] = logname
diff --git a/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py
index ac371ec..e72a082 100644
--- a/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py
+++ b/RO-SDN-arista_cloudvision/osm_rosdn_arista_cloudvision/wimconn_arista.py
@@ -103,7 +103,7 @@
__ELINE_num_connection_points = 2
__supported_service_types = ["ELINE", "ELAN"]
__supported_encapsulation_types = ["dot1q"]
- __WIM_LOGGER = 'openmano.sdnconn.arista'
+ __WIM_LOGGER = 'ro.sdn.arista'
__SERVICE_ENDPOINT_MAPPING = 'service_endpoint_mapping'
__ENCAPSULATION_TYPE_PARAM = "service_endpoint_encapsulation_type"
__ENCAPSULATION_INFO_PARAM = "service_endpoint_encapsulation_info"
@@ -156,7 +156,7 @@
datacenter_id vim_account vim_account
id: (internal, do not use)
wim_id: (internal, do not use)
- :param logger (logging.Logger): optional logger object. If none is passed 'openmano.sdn.sdnconn' is used.
+ :param logger (logging.Logger): optional logger object. If none is passed 'ro.sdn.sdnconn' is used.
"""
self.__regex = re.compile(
r'^(?:http|ftp)s?://' # http:// or https://
diff --git a/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py b/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py
index 423ceff..dc717e5 100755
--- a/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py
+++ b/RO-SDN-dpb/osm_rosdn_dpb/wimconn_dpb.py
@@ -205,7 +205,7 @@
class DpbConnector(SdnConnectorBase):
""" Use the DPB to establish multipoint connections """
- __LOGGER_NAME = "openmano.rosdnconn.dpb"
+ __LOGGER_NAME = "ro.sdn.dpb"
__SUPPORTED_SERV_TYPES = ["ELAN (L2)", "ELINE (L2)"]
__SUPPORTED_CONNECTION_TYPES = ["REST", "SSH"]
__SUPPORTED_SSH_AUTH_TYPES = ["KEY", "PASS"]
diff --git a/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py b/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py
index c99627c..0e16cfc 100644
--- a/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py
+++ b/RO-SDN-dynpac/osm_rosdn_dynpac/wimconn_dynpac.py
@@ -58,7 +58,7 @@
class DynpacConnector(SdnConnectorBase):
__supported_service_types = ["ELINE (L2)", "ELINE"]
__supported_encapsulation_types = ["dot1q"]
- __WIM_LOGGER = 'openmano.sdnconn.dynpac'
+ __WIM_LOGGER = 'ro.sdn.dynpac'
__ENCAPSULATION_TYPE_PARAM = "service_endpoint_encapsulation_type"
__ENCAPSULATION_INFO_PARAM = "service_endpoint_encapsulation_info"
__BACKUP_PARAM = "backup"
diff --git a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py
index d4c7e3f..4829386 100644
--- a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py
+++ b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/floodlight_of.py
@@ -76,7 +76,7 @@
self.ofi2pp = {} # From OpenFlow Index to Physical Port
self.headers = {'content-type': 'application/json', 'Accept': 'application/json'}
self.version = None
- self.logger = logging.getLogger('SDN.floodlightOF')
+ self.logger = logging.getLogger('ro.sdn.floodlightof')
self.logger.setLevel(params.get("of_debug", "ERROR"))
self._set_version(params.get("of_version"))
diff --git a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py
index 3303a4d..2c7910b 100644
--- a/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py
+++ b/RO-SDN-floodlight_openflow/osm_rosdn_floodlightof/sdnconn_floodlightof.py
@@ -29,7 +29,7 @@
def __init__(self, wim, wim_account, config=None, logger=None):
"""Creates a connectivity based on pro-active openflow rules
"""
- self.logger = logging.getLogger('openmano.sdnconn.floodlightof')
+ self.logger = logging.getLogger('ro.sdn.floodlightof')
super().__init__(wim, wim_account, config, logger)
of_params = {
"of_url": wim["wim_url"],
diff --git a/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py b/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py
index 9b67fc1..8ea422d 100644
--- a/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py
+++ b/RO-SDN-ietfl2vpn/osm_rosdn_ietfl2vpn/wimconn_ietfl2vpn.py
@@ -46,7 +46,7 @@
wim (dict): WIM record, as stored in the database
wim_account (dict): WIM account record, as stored in the database
"""
- self.logger = logging.getLogger('openmano.sdnconn.ietfl2vpn')
+ self.logger = logging.getLogger('ro.sdn.ietfl2vpn')
super().__init__(wim, wim_account, config, logger)
self.headers = {'Content-Type': 'application/json'}
self.mappings = {m['service_endpoint_id']: m
diff --git a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py
index 151bf6c..6c2f72b 100644
--- a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py
+++ b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_api.py
@@ -29,7 +29,7 @@
def __init__(self, url, config=None, user=None, password=None, logger=None):
- self.logger = logger or logging.getLogger("openmano.sdnconn.junipercontrail.sdnapi")
+ self.logger = logger or logging.getLogger("ro.sdn.junipercontrail.sdnapi")
self.controller_url = url
if not url:
diff --git a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py
index 43bfb87..a1cc3de 100644
--- a/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py
+++ b/RO-SDN-juniper_contrail/osm_rosdn_juniper_contrail/sdn_assist_juniper_contrail.py
@@ -39,7 +39,7 @@
tutorial_with_rest.html
- https://github.com/tonyliu0592/contrail-toolbox/blob/master/sriov/sriov
"""
- _WIM_LOGGER = "openmano.sdnconn.junipercontrail"
+ _WIM_LOGGER = "ro.sdn.junipercontrail"
def __init__(self, wim, wim_account, config=None, logger=None):
"""
@@ -62,7 +62,7 @@
datacenter_id vim_account vim_account
id: (internal, do not use)
wim_id: (internal, do not use)
- :param logger (logging.Logger): optional logger object. If none is passed 'openmano.sdn.sdnconn' is used.
+ :param logger (logging.Logger): optional logger object. If none is passed 'ro.sdn.sdnconn' is used.
"""
self.logger = logger or logging.getLogger(self._WIM_LOGGER)
self.logger.debug('wim: {}, wim_account: {}, config: {}'.format(wim, wim_account, config))
@@ -680,7 +680,7 @@
log_formatter = logging.Formatter(log_format, datefmt='%Y-%m-%dT%H:%M:%S')
handler = logging.StreamHandler()
handler.setFormatter(log_formatter)
- logger = logging.getLogger('openmano.sdnconn.junipercontrail')
+ logger = logging.getLogger('ro.sdn.junipercontrail')
# logger.setLevel(level=logging.ERROR)
# logger.setLevel(level=logging.INFO)
logger.setLevel(level=logging.DEBUG)
diff --git a/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py b/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py
index 355ec7a..7cf7ee2 100644
--- a/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py
+++ b/RO-SDN-odl_openflow/osm_rosdn_odlof/odl_of.py
@@ -82,7 +82,7 @@
self.auth = self.auth.decode()
self.headers['authorization'] = 'Basic ' + self.auth
- self.logger = logging.getLogger('openmano.sdnconn.onosof')
+ self.logger = logging.getLogger('ro.sdn.onosof')
# self.logger.setLevel(getattr(logging, params.get("of_debug", "ERROR")))
self.logger.debug("odlof plugin initialized")
diff --git a/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py b/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py
index 190372a..0b13921 100644
--- a/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py
+++ b/RO-SDN-odl_openflow/osm_rosdn_odlof/sdnconn_odlof.py
@@ -29,7 +29,7 @@
def __init__(self, wim, wim_account, config=None, logger=None):
"""Creates a connectivity based on pro-active openflow rules
"""
- self.logger = logging.getLogger('openmano.sdnconn.odlof')
+ self.logger = logging.getLogger('ro.sdn.odlof')
super().__init__(wim, wim_account, config, logger)
of_params = {
"of_url": wim["wim_url"],
diff --git a/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py b/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py
index ef32be2..a29b408 100644
--- a/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py
+++ b/RO-SDN-onos_openflow/osm_rosdn_onosof/onos_of.py
@@ -86,7 +86,7 @@
self.auth = self.auth.decode()
self.headers['authorization'] = 'Basic ' + self.auth
- self.logger = logging.getLogger('openmano.sdnconn.onosof')
+ self.logger = logging.getLogger('ro.sdn.onosof')
# self.logger.setLevel( getattr(logging, params.get("of_debug", "ERROR")) )
self.logger.debug("onosof plugin initialized")
self.ip_address = None
diff --git a/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py b/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py
index c5e081a..fa820d2 100644
--- a/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py
+++ b/RO-SDN-onos_openflow/osm_rosdn_onosof/sdnconn_onosof.py
@@ -29,7 +29,7 @@
def __init__(self, wim, wim_account, config=None, logger=None):
"""Creates a connectivity based on pro-active openflow rules
"""
- self.logger = logging.getLogger('openmano.sdnconn.onosof')
+ self.logger = logging.getLogger('ro.sdn.onosof')
super().__init__(wim, wim_account, config, logger)
of_params = {
"of_url": wim["wim_url"],
diff --git a/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py b/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py
index ced63d2..372de66 100644
--- a/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py
+++ b/RO-SDN-onos_vpls/osm_rosdn_onos_vpls/sdn_assist_onos_vpls.py
@@ -34,7 +34,7 @@
"""
https://wiki.onosproject.org/display/ONOS/VPLS+User+Guide
"""
- _WIM_LOGGER = "openmano.sdnconn.onosvpls"
+ _WIM_LOGGER = "ro.sdn.onosvpls"
def __init__(self, wim, wim_account, config=None, logger=None):
self.logger = logger or logging.getLogger(self._WIM_LOGGER)
@@ -373,7 +373,7 @@
if __name__ == '__main__':
- logger = logging.getLogger('openmano.sdn.onos_vpls')
+ logger = logging.getLogger('ro.sdn.onos_vpls')
logging.basicConfig()
logger.setLevel(getattr(logging, "DEBUG"))
# wim_url = "http://10.95.172.251:8181"
diff --git a/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py b/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py
index ee024d4..1144292 100644
--- a/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py
+++ b/RO-VIM-aws/osm_rovim_aws/vimconn_aws.py
@@ -119,7 +119,7 @@
elif isinstance(flavor_data, dict):
self.flavor_info = flavor_data
- self.logger = logging.getLogger('openmano.vim.aws')
+ self.logger = logging.getLogger('ro.vim.aws')
if log_level:
self.logger.setLevel(getattr(logging, log_level))
diff --git a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py
index 3752f29..f2b1805 100755
--- a/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py
+++ b/RO-VIM-azure/osm_rovim_azure/vimconn_azure.py
@@ -93,7 +93,7 @@
self.vnet_address_space = None
# LOGGER
- self.logger = logging.getLogger('openmano.vim.azure')
+ self.logger = logging.getLogger('ro.vim.azure')
if log_level:
logging.basicConfig()
self.logger.setLevel(getattr(logging, log_level))
diff --git a/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py b/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py
index 21f1b9f..e851fd3 100644
--- a/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py
+++ b/RO-VIM-fos/osm_rovim_fos/vimconn_fos.py
@@ -32,6 +32,7 @@
"""
+import logging
import uuid
import socket
import struct
@@ -70,6 +71,7 @@
vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level,
config, persistent_info)
+ self.logger = logging.getLogger('ro.vim.fos')
self.logger.debug('vimconn_fos init with config: {}'.format(config))
self.arch = config.get('arch', 'x86_64')
self.hv = config.get('hypervisor', 'LXD')
diff --git a/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py b/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py
index a84b665..a646036 100644
--- a/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py
+++ b/RO-VIM-opennebula/osm_rovim_opennebula/vimconn_opennebula.py
@@ -28,7 +28,9 @@
__author__ = "Jose Maria Carmona Perez,Juan Antonio Hernando Labajo, Emilio Abraham Garrido Garcia,Alberto Florez " \
"Pages, Andres Pozo Munoz, Santiago Perez Marin, Onlife Networks Telefonica I+D Product Innovation "
__date__ = "$13-dec-2017 11:09:29$"
+
from osm_ro_plugin import vimconn
+import logging
import requests
# import logging
import oca
@@ -63,6 +65,8 @@
vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level,
config)
+ self.logger = logging.getLogger('ro.vim.openstack')
+
def _new_one_connection(self):
return pyone.OneServer(self.url, session=self.user + ':' + self.passwd)
diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
index 0645e54..bd3955a 100644
--- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
+++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py
@@ -152,7 +152,7 @@
logging.getLogger('urllib3').setLevel(logging.WARNING)
logging.getLogger('keystoneauth').setLevel(logging.WARNING)
logging.getLogger('novaclient').setLevel(logging.WARNING)
- self.logger = logging.getLogger('openmano.vim.openstack')
+ self.logger = logging.getLogger('ro.vim.openstack')
# allow security_groups to be a list or a single string
if isinstance(self.config.get('security_groups'), str):
@@ -161,7 +161,7 @@
# ###### VIO Specific Changes #########
if self.vim_type == "VIO":
- self.logger = logging.getLogger('openmano.vim.vio')
+ self.logger = logging.getLogger('ro.vim.vio')
if log_level:
self.logger.setLevel(getattr(logging, log_level))
diff --git a/RO-VIM-openvim/osm_rovim_openvim/vimconn_openvim.py b/RO-VIM-openvim/osm_rovim_openvim/vimconn_openvim.py
index 0c24003..8fb02cc 100644
--- a/RO-VIM-openvim/osm_rovim_openvim/vimconn_openvim.py
+++ b/RO-VIM-openvim/osm_rovim_openvim/vimconn_openvim.py
@@ -330,7 +330,7 @@
vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level, config)
self.tenant = None
self.headers_req = {'content-type': 'application/json'}
- self.logger = logging.getLogger('openmano.vim.openvim')
+ self.logger = logging.getLogger('ro.vim.openvim')
self.persistent_info = persistent_info
if tenant_id:
self.tenant = tenant_id
diff --git a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py
index b698f4c..34fed52 100644
--- a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py
+++ b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py
@@ -151,7 +151,7 @@
vimconn.VimConnector.__init__(self, uuid, name, tenant_id, tenant_name, url,
url_admin, user, passwd, log_level, config)
- self.logger = logging.getLogger('openmano.vim.vmware')
+ self.logger = logging.getLogger('ro.vim.vmware')
self.logger.setLevel(10)
self.persistent_info = persistent_info
diff --git a/RO-plugin/osm_ro_plugin/openflow_conn.py b/RO-plugin/osm_ro_plugin/openflow_conn.py
index f60deea..f46c6cf 100644
--- a/RO-plugin/osm_ro_plugin/openflow_conn.py
+++ b/RO-plugin/osm_ro_plugin/openflow_conn.py
@@ -86,7 +86,7 @@
self.name = "openflow_conector"
self.pp2ofi = {} # From Physical Port to OpenFlow Index
self.ofi2pp = {} # From OpenFlow Index to Physical Port
- self.logger = logging.getLogger('openmano.sdn.openflow_conn')
+ self.logger = logging.getLogger('ro.sdn.openflow_conn')
def get_of_switches(self):
""""
@@ -160,7 +160,7 @@
flow_fields = ('priority', 'vlan', 'ingress_port', 'actions', 'dst_mac', 'src_mac', 'net_id')
def __init__(self, wim, wim_account, config=None, logger=None, of_connector=None):
- self.logger = logger or logging.getLogger('openmano.sdn.openflow_conn')
+ self.logger = logger or logging.getLogger('ro.sdn.openflow_conn')
self.of_connector = of_connector
config = config or {}
self.of_controller_nets_with_same_vlan = config.get("of_controller_nets_with_same_vlan", False)
diff --git a/RO-plugin/osm_ro_plugin/sdn_dummy.py b/RO-plugin/osm_ro_plugin/sdn_dummy.py
index a2d189a..687d4ab 100644
--- a/RO-plugin/osm_ro_plugin/sdn_dummy.py
+++ b/RO-plugin/osm_ro_plugin/sdn_dummy.py
@@ -44,7 +44,7 @@
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.dummy')
+ self.logger = logger or logging.getLogger('ro.sdn.dummy')
super(SdnDummyConnector, self).__init__(wim, wim_account, config, self.logger)
self.logger.debug("__init: wim='{}' wim_account='{}'".format(wim, wim_account))
self.connections = {}
diff --git a/RO-plugin/osm_ro_plugin/sdnconn.py b/RO-plugin/osm_ro_plugin/sdnconn.py
index b7b1faa..ccf16b1 100644
--- a/RO-plugin/osm_ro_plugin/sdnconn.py
+++ b/RO-plugin/osm_ro_plugin/sdnconn.py
@@ -92,7 +92,7 @@
wim_id: (internal, do not use)
:param logger (logging.Logger): optional logger object. If none is passed 'openmano.sdn.sdnconn' is used.
"""
- self.logger = logger or logging.getLogger('openmano.sdnconn')
+ self.logger = logger or logging.getLogger('ro.sdn')
self.wim = wim
self.wim_account = wim_account
diff --git a/RO-plugin/osm_ro_plugin/vim_dummy.py b/RO-plugin/osm_ro_plugin/vim_dummy.py
index e90d213..22379b6 100644
--- a/RO-plugin/osm_ro_plugin/vim_dummy.py
+++ b/RO-plugin/osm_ro_plugin/vim_dummy.py
@@ -41,7 +41,7 @@
config={}, persistent_info={}):
super().__init__(uuid, name, tenant_id, tenant_name, url, url_admin, user, passwd, log_level,
config, persistent_info)
- self.logger = logging.getLogger('openmano.vim.dummy')
+ self.logger = logging.getLogger('ro.vim.dummy')
if log_level:
self.logger.setLevel(getattr(logging, log_level))
self.nets = {
diff --git a/RO-plugin/osm_ro_plugin/vimconn.py b/RO-plugin/osm_ro_plugin/vimconn.py
index dd60e46..c71e821 100644
--- a/RO-plugin/osm_ro_plugin/vimconn.py
+++ b/RO-plugin/osm_ro_plugin/vimconn.py
@@ -150,7 +150,7 @@
self.passwd = passwd
self.config = config or {}
self.availability_zone = None
- self.logger = logging.getLogger('openmano.vim')
+ self.logger = logging.getLogger('ro.vim')
if log_level:
self.logger.setLevel(getattr(logging, log_level))
if not self.url_admin: # try to use normal url