X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fopenvim.git;a=blobdiff_plain;f=osm_openvim%2Fovim.py;h=fb345525f9d9861a4b651c12f30592ea0e4ce6c0;hp=c9990497ee241bf294ccd22000a85e6ce04d4509;hb=7fa5a659f844ad98a1cd85f2467c31fac93d5509;hpb=49f2e85904dcbde6e6fa49a90c28c231b5ba6296 diff --git a/osm_openvim/ovim.py b/osm_openvim/ovim.py index c999049..fb34552 100755 --- a/osm_openvim/ovim.py +++ b/osm_openvim/ovim.py @@ -378,19 +378,12 @@ class ovim(): module = temp_dict['of_controller'] if module not in ovim.of_module: - for base in ("", "osm_openvim.", "lib_osm_openvim."): - try: - pkg = __import__(base + module) - if base: - of_conn_module = getattr(pkg, module) - else: - of_conn_module = pkg - ovim.of_module[module] = of_conn_module - self.logger.debug("Module load from {}".format(base + module)) - break - except Exception as e: - self.logger.warning("Module {} not found {}".format(base + module, e)) - else: + try: + pkg = __import__("osm_openvim." + module) + of_conn_module = getattr(pkg, module) + ovim.of_module[module] = of_conn_module + self.logger.debug("Module load from {}".format("osm_openvim." + module)) + except Exception as e: self.logger.error("Cannot open openflow controller module of type '%s'", module) raise ovimException("Cannot open openflow controller of type module '{}'" "Revise it is installed".format(module),