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_all_types_by_group(context, group_id)¶
- Get all volume_types in a group. 
- 
get_by_name_or_id(context, identity)¶
- Retrieves volume type by id or name 
- 
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)¶
- Get all qos specs for given volume type. 
- 
is_encrypted(context, volume_type_id)¶
- 
is_public_volume_type(context, volume_type_id)¶
- Return is_public boolean value of volume type 
- 
notify_about_volume_type_access_usage(*args, **kwargs)¶
- Notify about successful usage type-access-(add/remove) command. - Parameters: - context – security context
- volume_type_id – volume type uuid
- project_id – tenant uuid
- event_suffix – name of called operation access-(add/remove)
- host – hostname
 
- 
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), {...}} }
- 
volume_types_encryption_changed(context, vol_type_id1, vol_type_id2)¶
- Return whether encryptions of two volume types are same.