cinder.volume.configuration module

cinder.volume.configuration module

Configuration support for all drivers.

This module allows support for setting configurations either from default or from a particular FLAGS group, to be able to set multiple configurations for a given set of values.

For instance, two lvm configurations can be set by naming them in groups as

[lvm1] volume_group=lvm-group-1 …

[lvm2] volume_group=lvm-group-2 …

And the configuration group name will be passed in so that all calls to configuration.volume_group within that instance will be mapped to the proper named group.

This class also ensures the implementation’s configuration is grafted into the option group. This is due to the way cfg works. All cfg options must be defined and registered in the group in which they are used.

class BackendGroupConfiguration(volume_opts, config_group=None)

Bases: object

append_config_values(volume_opts)
get(key, default=None)
safe_get(value)
set_default(opt_name, default)
class Configuration(volume_opts, config_group=None)

Bases: object

append_config_values(volume_opts)
safe_get(value)
class DefaultGroupConfiguration

Bases: object

Get config options from only DEFAULT.

append_config_values(volume_opts)
safe_get(value)
Creative Commons Attribution 3.0 License

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