cinder.api.api_utils module

add_visible_admin_metadata(volume)

Add user-visible admin metadata to regular metadata.

Extracts the admin metadata keys that are to be made visible to non-administrators, and adds them to the regular metadata structure for the passed-in volume.

is_none_string(val)

Check if a string represents a None value.

remove_invalid_filter_options(context, filters, allowed_search_options)

Remove search options that are not valid for non-admin API/context.

validate_integer(value, name, min_value=None, max_value=None)

Make sure that value is a valid integer, potentially within range.

Parameters
  • value – the value of the integer

  • name – the name of the integer

  • min_length – the min_length of the integer

  • max_length – the max_length of the integer

Returns

integer

walk_class_hierarchy(clazz, encountered=None)

Walk class hierarchy, yielding most derived classes first.