The karbor.utils Module

The karbor.utils Module

Utilities and helper functions.

karbor.utils.check_filters(filters)
karbor.utils.find_config(config_path)

Find a configuration file using the given hint.

Parameters:config_path – Full or relative path to the config.
Returns:Full path of the config, if it exists.
Raises:karbor.exception.ConfigNotFound
karbor.utils.get_auth_uri(v3=True)
karbor.utils.get_bool_param(param_string, params)
karbor.utils.is_valid_boolstr(val)

Check if the provided string is a valid bool string or not.

karbor.utils.load_class(namespace, plugin_name)
karbor.utils.load_plugin(namespace, plugin_name, *args, **kwargs)
karbor.utils.remove_invalid_filter_options(context, filters, allowed_search_options)

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

karbor.utils.service_is_up(service)

Check whether a service is up based on last heartbeat.

karbor.utils.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

karbor.utils.walk_class_hierarchy(clazz, encountered=None)

Walk class hierarchy, yielding most derived classes first.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.