**** CubicPower OpenStack Study ****
def load_transfer_modules():
module_dictionary = {}
ex = stevedore.extension.ExtensionManager('nova.image.download.modules')
for module_name in ex.names():
mgr = stevedore.driver.DriverManager(
namespace='nova.image.download.modules',
name=module_name,
invoke_on_load=False)
schemes_list = mgr.driver.get_schemes()
for scheme in schemes_list:
if scheme in module_dictionary:
msg = _('%(scheme)s is registered as a module twice. '
'%(module_name)s is not being used.')
LOG.error(msg)
else:
module_dictionary[scheme] = mgr.driver
return module_dictionary