diff --git a/doc/source/users/index.rst b/doc/source/users/index.rst index 6d589dcad..21a4ec2fe 100644 --- a/doc/source/users/index.rst +++ b/doc/source/users/index.rst @@ -117,6 +117,7 @@ can be customized. identity_base identity_v2 identity_v3 + module_loader resource service_filter utils diff --git a/doc/source/users/module_loader.rst b/doc/source/users/module_loader.rst new file mode 100644 index 000000000..042eba3c8 --- /dev/null +++ b/doc/source/users/module_loader.rst @@ -0,0 +1,10 @@ +ModuleLoader +============ +.. automodule:: openstack.module_loader + + +ModuleLoader object +-------------------- + +.. autoclass:: openstack.module_loader.ModuleLoader + :members: diff --git a/openstack/module_loader.py b/openstack/module_loader.py index 1fb646341..12073d8f2 100644 --- a/openstack/module_loader.py +++ b/openstack/module_loader.py @@ -11,7 +11,7 @@ # under the License. """ -Load various modules for authorization and services. +Load various modules for authorization and eventually services. """ from stevedore import extension @@ -21,12 +21,14 @@ from openstack import exceptions class ModuleLoader(object): def __init__(self): + """Create a module loader.""" self.auth_mgr = extension.ExtensionManager( namespace="openstack.auth.plugin", invoke_on_load=False, ) def get_auth_plugin(self, plugin_name): + """Get an authentication plugin by name.""" if not plugin_name: plugin_name = 'identity' try: @@ -36,4 +38,5 @@ class ModuleLoader(object): raise exceptions.NoMatchingPlugin(msg) def list_auth_plugins(self): + """Get a list of all the authentication plugins.""" return self.auth_mgr.names()