From: sousaedu Date: Tue, 9 Feb 2021 14:30:01 +0000 (+0100) Subject: Fixing bug 1437 X-Git-Tag: branch-sol006v331-start~15 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=commitdiff_plain;h=e493e9b91720e5116e00b4c06cf66c767bccce2f;ds=sidebyside 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 --- diff --git a/Dockerfile-local b/Dockerfile-local index 92e4b032..72b28cec 100644 --- a/Dockerfile-local +++ b/Dockerfile-local @@ -20,6 +20,7 @@ LABEL authors="Alfonso Tierno" 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 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3-neutronclient pyt && 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 @@ ENV OSMRO_MESSAGE_PORT 9092 # 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 768f2050..485f15db 100644 --- a/NG-RO/osm_ng_ro/ro_main.py +++ b/NG-RO/osm_ng_ro/ro_main.py @@ -621,18 +621,18 @@ def _start_service(): 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 @@ def _start_service(): 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 ac371ec6..e72a0822 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 @@ class AristaSdnConnector(SdnConnectorBase): __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 @@ class AristaSdnConnector(SdnConnectorBase): 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 423ceff3..dc717e57 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 DpbRestInterface(): 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 c99627c3..0e16cfcd 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 SdnAPIActions(Enum): 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 d4c7e3f4..4829386d 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 @@ class OfConnFloodLight(OpenflowConn): 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 3303a4d0..2c7910b4 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 @@ class SdnConnectorFloodLightOf(SdnConnectorOpenFlow): 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 9b67fc17..8ea422d0 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 @@ class WimconnectorIETFL2VPN(SdnConnectorBase): 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 151bf6ca..6c2f72b0 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 @@ class UnderlayApi: 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 43bfb870..a1cc3ded 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 @@ class JuniperContrail(SdnConnectorBase): 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 @@ class JuniperContrail(SdnConnectorBase): 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 @@ if __name__ == '__main__': 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 355ec7ac..7cf7ee26 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 @@ class OfConnOdl(OpenflowConn): 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 190372a8..0b139218 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 @@ class SdnConnectorOdlOf(SdnConnectorOpenFlow): 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 ef32be27..a29b4082 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 @@ class OfConnOnos(OpenflowConn): 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 c5e081a5..fa820d2b 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 @@ class SdnConnectorOnosOf(SdnConnectorOpenFlow): 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 ced63d28..372de665 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 @@ class OnosVpls(SdnConnectorBase): """ 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 @@ class OnosVpls(SdnConnectorBase): 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 ee024d43..11442922 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 @@ class vimconnector(vimconn.VimConnector): 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 3752f294..f2b18052 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 @@ class vimconnector(vimconn.VimConnector): 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 21f1b9f1..e851fd33 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 @@ Support config dict: """ +import logging import uuid import socket import struct @@ -70,6 +71,7 @@ class vimconnector(vimconn.VimConnector): 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 a84b6654..a646036d 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 @@ vimconnector implements all the methods to interact with OpenNebula using the XM __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 @@ class vimconnector(vimconn.VimConnector): 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 0645e545..bd3955ac 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 @@ class vimconnector(vimconn.VimConnector): 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 @@ class vimconnector(vimconn.VimConnector): # ###### 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 0c240036..8fb02ccb 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 @@ class vimconnector(vimconn.VimConnector): 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 b698f4cc..34fed525 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 @@ class vimconnector(vimconn.VimConnector): 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 f60deea2..f46c6cfc 100644 --- a/RO-plugin/osm_ro_plugin/openflow_conn.py +++ b/RO-plugin/osm_ro_plugin/openflow_conn.py @@ -86,7 +86,7 @@ class OpenflowConn: 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 @@ class SdnConnectorOpenFlow(SdnConnectorBase): 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 a2d189ae..687d4ab9 100644 --- a/RO-plugin/osm_ro_plugin/sdn_dummy.py +++ b/RO-plugin/osm_ro_plugin/sdn_dummy.py @@ -44,7 +44,7 @@ class SdnDummyConnector(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.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 b7b1faa0..ccf16b11 100644 --- a/RO-plugin/osm_ro_plugin/sdnconn.py +++ b/RO-plugin/osm_ro_plugin/sdnconn.py @@ -92,7 +92,7 @@ class SdnConnectorBase(object): 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 e90d213b..22379b60 100644 --- a/RO-plugin/osm_ro_plugin/vim_dummy.py +++ b/RO-plugin/osm_ro_plugin/vim_dummy.py @@ -41,7 +41,7 @@ class VimDummyConnector(vimconn.VimConnector): 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 dd60e464..c71e8214 100644 --- a/RO-plugin/osm_ro_plugin/vimconn.py +++ b/RO-plugin/osm_ro_plugin/vimconn.py @@ -150,7 +150,7 @@ class VimConnector(): 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