cinderlib.cinderlib module

setup(file_locks_path=None, root_helper='sudo', suppress_requests_ssl_warnings=True, disable_logs=True, non_uuid_ids=False, output_all_backend_info=False, project_id=None, user_id=None, persistence_config=None, fail_on_missing_backend=True, host=None, **cinder_config_params)
class Backend(volume_backend_name, **driver_cfg)[source]

Bases: object

Representation of a Cinder Driver.

User facing attributes are:

  • __init__

  • json

  • jsons

  • load

  • stats

  • create_volume

  • global_setup

  • validate_connector

backends = {}
property config
create_volume(size, name='', description='', bootable=False, **kwargs)[source]
property dump
property dumps
global_initialization = False
classmethod global_setup(file_locks_path=None, root_helper='sudo', suppress_requests_ssl_warnings=True, disable_logs=True, non_uuid_ids=False, output_all_backend_info=False, project_id=None, user_id=None, persistence_config=None, fail_on_missing_backend=True, host=None, **cinder_config_params)[source]
property id
property json
property jsons
static list_supported_drivers(output_version=1)[source]

Returns dictionary with driver classes names as keys.

The output of the method changes from version to version, so we can pass the output_version parameter to specify which version we are expecting.

Version 1: Original output intended for human consumption, where all

dictionary values are strings.

Version 2: Improved version intended for automated consumption.
  • type is now a dictionary with detailed information

  • Values retain their types, so we’ll no longer get ‘None’

    or ‘False’.

classmethod load(json_src, save=False)[source]
classmethod load_backend(backend_data)[source]
property pool_names
refresh()[source]
classmethod set_persistence(persistence_config)[source]
stats(refresh=False)[source]
validate_connector(connector_dict)[source]

Raise exception if missing info for volume’s connect call.

property volumes
volumes_filtered(volume_id=None, volume_name=None)[source]