# keystoneauth1.loading.cli module

keystoneauth1.loading.cli.load_from_argparse_arguments(namespace: Namespace, **kwargs: Any) → plugin.BaseAuthPluginT | None

  Retrieve the created plugin from the completed argparse results.

  Loads and creates the auth plugin from the information parsed from the command line by argparse.

  Parameters:

    namespace (Namespace) – The result from CLI parsing.

  Returns:

    An auth plugin, or None if a name is not provided.

  Return type:

    `keystoneauth1.plugin.BaseAuthPlugin`

  Raises:

    keystoneauth1.exceptions.auth_plugins.NoMatchingPlugin – if a plugin cannot be created.

keystoneauth1.loading.cli.register_argparse_arguments(parser: ArgumentParser, argv: list[str], default: Any = None) → BaseLoader[plugin.BaseAuthPluginT] | None

  Register CLI options needed to create a plugin.

  The function inspects the provided arguments so that it can also register the options required for that specific plugin if available.

  Parameters:

    - parser (argparse.ArgumentParser) – the parser to attach argparse options to.

    - argv (list) – the arguments provided to the appliation.

    - default (str/class) – a default plugin name or a plugin object to use if one isn’t specified by the CLI. default: None.

  Returns:

    The plugin class that will be loaded or None if not provided.

  Return type:

    `keystoneauth1.loader.BaseLoader`

  Raises:

    keystoneauth1.exceptions.auth_plugins.NoMatchingPlugin – if a plugin cannot be created.

this page last updated: 2026-07-14 15:48:40

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug