The cinder.volume.volume_types Module

Built-in volume type properties.

add_volume_type_access(context, volume_type_id, project_id)

Add access to volume type for project_id.

create(context, name, extra_specs=None, is_public=True, projects=None, description=None)

Creates volume types.

destroy(context, id)

Marks volume types as deleted.

get_all_types(context, inactive=0, filters=None, marker=None, limit=None, sort_keys=None, sort_dirs=None, offset=None, list_result=False)

Get all non-deleted volume_types.

Pass true as argument if you want deleted volume types returned also.

get_default_volume_type()

Get the default volume type.

get_volume_type(ctxt, id, expected_fields=None)

Retrieves single volume type by id.

get_volume_type_by_name(context, name)

Retrieves single volume type by name.

get_volume_type_encryption(context, volume_type_id)
get_volume_type_extra_specs(volume_type_id, key=False)
get_volume_type_qos_specs(volume_type_id)
is_encrypted(context, volume_type_id)
is_public_volume_type(context, volume_type_id)

Return is_public boolean value of volume type

remove_volume_type_access(context, volume_type_id, project_id)

Remove access to volume type for project_id.

update(context, id, name, description, is_public=None)

Update volume type by id.

volume_types_diff(context, vol_type_id1, vol_type_id2)

Returns a ‘diff’ of two volume types and whether they are equal.

Returns a tuple of (diff, equal), where ‘equal’ is a boolean indicating whether there is any difference, and ‘diff’ is a dictionary with the following format: {‘extra_specs’: {‘key1’: (value_in_1st_vol_type, value_in_2nd_vol_type),

‘key2’: (value_in_1st_vol_type, value_in_2nd_vol_type), ...}
‘qos_specs’: {‘key1’: (value_in_1st_vol_type, value_in_2nd_vol_type),
‘key2’: (value_in_1st_vol_type, value_in_2nd_vol_type), ...}
‘encryption’: {‘cipher’: (value_in_1st_vol_type, value_in_2nd_vol_type),
{‘key_size’: (value_in_1st_vol_type, value_in_2nd_vol_type),
...}

Previous topic

The cinder.volume.utils Module

Next topic

The cinder.wsgi.common Module

Project Source

This Page