The cinder.volume.qos_specs Module

The QoS Specs Implementation

associate_qos_with_type(context, specs_id, type_id)

Associate qos_specs with volume type.

Associate target qos specs with specific volume type. Would raise following exceptions:

VolumeTypeNotFound - if volume type doesn’t exist; QoSSpecsNotFound - if qos specs doesn’t exist; InvalidVolumeType - if volume type is already associated with

qos specs other than given one.

QoSSpecsAssociateFailed - if there was general DB error

Parameters:
  • specs_id – qos specs ID to associate with
  • type_id – volume type ID to associate with
create(context, name, specs=None)

Creates qos_specs.

:param specs dictionary that contains specifications for QoS
e.g. {‘consumer’: ‘front-end’,
‘total_iops_sec’: 1000, ‘total_bytes_sec’: 1024000}
delete(context, qos_specs_id, force=False)

Marks qos specs as deleted.

‘force’ parameter is a flag to determine whether should destroy should continue when there were entities associated with the qos specs. force=True indicates caller would like to mark qos specs as deleted even if there was entities associate with target qos specs. Trying to delete a qos specs still associated with entities will cause QoSSpecsInUse exception if force=False (default).

delete_keys(context, qos_specs_id, keys)

Marks specified key of target qos specs as deleted.

disassociate_all(context, specs_id)

Disassociate qos_specs from all entities.

disassociate_qos_specs(context, specs_id, type_id)

Disassociate qos_specs from volume type.

get_all_specs(context, inactive=False, search_opts=None)

Get all non-deleted qos specs.

Pass inactive=True as argument and deleted volume types would return as well.

get_associations(context, specs_id)

Get all associations of given qos specs.

get_qos_specs(ctxt, id)

Retrieves single qos specs by id.

get_qos_specs_by_name(context, name)

Retrieves single qos specs by name.

update(context, qos_specs_id, specs)

Update qos specs.

:param specs dictionary that contains key/value pairs for updating existing specs.

e.g. {‘consumer’: ‘front-end’,
‘total_iops_sec’: 500, ‘total_bytes_sec’: 512000,}

Previous topic

The cinder.volume.manager Module

Next topic

The cinder.volume.rpcapi Module

Project Source

This Page