keystoneauth1.loading.session module¶
- class keystoneauth1.loading.session.Any(*args, **kwargs)
Bases:
objectSpecial type indicating an unconstrained type.
Any is assignable to every type.
Any assumed to have all methods and attributes.
All values are assignable to Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any cannot be used with instance checks.
- __annotations_cache__ = {}
- __dict__ = mappingproxy({'__module__': 'typing', '__firstlineno__': 588, '__doc__': 'Special type indicating an unconstrained type.\n\n- Any is assignable to every type.\n- Any assumed to have all methods and attributes.\n- All values are assignable to Any.\n\nNote that all the above statements are true from the point of view of\nstatic type checkers. At runtime, Any cannot be used with instance\nchecks.\n', '__new__': <staticmethod(<function Any.__new__>)>, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'Any' objects>, '__weakref__': <attribute '__weakref__' of 'Any' objects>, '__annotations_cache__': {}})
- __doc__ = 'Special type indicating an unconstrained type.\n\n- Any is assignable to every type.\n- Any assumed to have all methods and attributes.\n- All values are assignable to Any.\n\nNote that all the above statements are true from the point of view of\nstatic type checkers. At runtime, Any cannot be used with instance\nchecks.\n'
- __firstlineno__ = 588
- __module__ = 'typing'
- static __new__(cls, *args, **kwargs)
- __static_attributes__ = ()
- __weakref__
list of weak references to the object
- class keystoneauth1.loading.session.Session
Bases:
_BaseLoader[Session]- __abstractmethods__ = frozenset({})
- __annotations_cache__ = {}
- __doc__ = None
- __firstlineno__ = 49
- __module__ = 'keystoneauth1.loading.session'
- __orig_bases__ = (keystoneauth1.loading.base._BaseLoader[keystoneauth1.session.Session],)
- __parameters__ = ()
- __static_attributes__ = ()
- _abc_impl = <_abc._abc_data object>
- static get_conf_options(deprecated_opts: dict[str, list[cfg.DeprecatedOpt]] | None = None) list[cfg.Opt]
Get oslo_config options that are needed for a
Session.These may be useful without being registered for config file generation or to manipulate the options before registering them yourself.
- The options that are set are:
- cafile:
The certificate authority filename.
- certfile:
The client certificate file to present.
- keyfile:
The key for the client certificate.
- insecure:
Whether to ignore SSL verification.
- timeout:
The max time to wait for HTTP connections.
- collect-timing:
Whether to collect API timing information.
- split-loggers:
Whether to log requests to multiple loggers.
- tls-ciphers:
OpenSSL cipher string for TLS.
- tls-min-version:
Minimum TLS version to require.
- Parameters:
deprecated_opts –
Deprecated options that should be included in the definition of new options. This should be a dict from the name of the new option to a list of oslo.DeprecatedOpts that correspond to the new option. (optional)
For example, to support the
ca_fileoption pointing to the newcafileoption name:old_opt = oslo_cfg.DeprecatedOpt('ca_file', 'old_group') deprecated_opts = {'cafile': [old_opt]}
- Returns:
A list of oslo_config options.
- get_options() list[opts.Opt]
Return the list of parameters associated with the auth plugin.
This list may be used to generate CLI or config arguments.
- Returns:
A list of Param objects describing available plugin parameters.
- load_from_argparse_arguments(namespace: Namespace, **kwargs: Any) Session
- load_from_conf_options(conf: cfg.ConfigOpts, group: str | cfg.OptGroup, **kwargs: Any) Session
Create a session object from an oslo_config object.
The options must have been previously registered with register_conf_options.
- Parameters:
conf – config object to register with.
group – The ini group to register options in.
kwargs – Additional parameters to pass to session construction.
- Returns:
A new session object.
- load_from_options(insecure: bool = False, verify: bool | str | None = None, cacert: str | None = None, cert: str | None = None, key: str | None = None, **kwargs: Any) Session
Create a session with individual certificate parameters.
Some parameters used to create a session don’t lend themselves to be loaded from config/CLI etc. Create a session by converting those parameters into session __init__ parameters.
- property plugin_class: type[Session]
- classmethod register_argparse_arguments(parser: ArgumentParser) None
- classmethod register_conf_options(conf: cfg.ConfigOpts, group: str | cfg.OptGroup, deprecated_opts: dict[str, list[cfg.DeprecatedOpt]] | None = None) list[cfg.Opt]
Register the oslo_config options that are needed for a session.
- The options that are set are:
- cafile:
The certificate authority filename.
- certfile:
The client certificate file to present.
- keyfile:
The key for the client certificate.
- insecure:
Whether to ignore SSL verification.
- timeout:
The max time to wait for HTTP connections.
- collect-timing:
Whether to collect API timing information.
- split-loggers:
Whether to log requests to multiple loggers.
- tls-ciphers:
OpenSSL cipher string for TLS.
- tls-min-version:
Minimum TLS version to require.
- Parameters:
conf – config object to register with.
group – The ini group to register options in.
deprecated_opts –
Deprecated options that should be included in the definition of new options. This should be a dict from the name of the new option to a list of oslo.DeprecatedOpts that correspond to the new option. (optional)
For example, to support the
ca_fileoption pointing to the newcafileoption name:old_opt = oslo_cfg.DeprecatedOpt('ca_file', 'old_group') deprecated_opts = {'cafile': [old_opt]}
- Returns:
The list of options that was registered.
- keystoneauth1.loading.session._positive_non_zero_float(argument_value: str | None) float | None
- keystoneauth1.loading.session.get_conf_options(deprecated_opts: dict[str, list[cfg.DeprecatedOpt]] | None = None) list[cfg.Opt]
- keystoneauth1.loading.session.load_from_argparse_arguments(namespace: Namespace, **kwargs: Any) Session
- keystoneauth1.loading.session.load_from_conf_options(conf: cfg.ConfigOpts, group: str | cfg.OptGroup, **kwargs: Any) Session
- keystoneauth1.loading.session.register_argparse_arguments(parser: ArgumentParser) None
- keystoneauth1.loading.session.register_conf_options(conf: cfg.ConfigOpts, group: str | cfg.OptGroup, deprecated_opts: dict[str, list[cfg.DeprecatedOpt]] | None = None) list[cfg.Opt]