This patch simply changes the logic for discriminating which
extensions have already been loaded using the extension alias
rather than the module name.
This will avoid failures already observed in unit tests occurring
if two extension modules happen to have the same module file name
even if they're unrelated.
This change cannot be unit-tested as the neutron unit test
framework is currently lacking a mechanism to mock and validate
extension loading from the file system.
Closes-Bug: #
1417180
Change-Id: Ia214a7c5b1127dbbec3c81023fdbc48d7fadf18f
mod_name)
continue
mod = imp.load_source(mod_name, ext_path)
- loaded.append(mod_name)
ext_name = mod_name[0].upper() + mod_name[1:]
new_ext_class = getattr(mod, ext_name, None)
if not new_ext_class:
continue
new_ext = new_ext_class()
self.add_extension(new_ext)
+ loaded.append(new_ext_class.get_alias())
except Exception as exception:
LOG.warn(_LW("Extension file %(f)s wasn't loaded due to "
"%(exception)s"),