congressclient.common.utils
Module¶congressclient.common.utils.
env
(*vars, **kwargs)¶Search for the first defined of possibly many env vars
Returns the first environment variable defined in vars, or returns the default defined in kwargs.
congressclient.common.utils.
format_dict
(data)¶Return a formatted string.
Parameters: | data – a dict |
---|---|
Return type: | a string formatted to {a:b, c:d} |
congressclient.common.utils.
format_list
(data)¶Return a formatted strings
Parameters: | data – a list of strings |
---|---|
Return type: | a string formatted to a,b,c |
congressclient.common.utils.
format_long_dict_list
(data)¶Return a formatted string.
Parameters: | data – a list of dicts |
---|---|
Return type: | a string formatted to {a:b, c:d}, {e:f, g:h} |
congressclient.common.utils.
get_client_class
(api_name, version, version_map)¶Returns the client class for the requested API version
Parameters: |
|
---|---|
Return type: | a client class for the requested API version |
congressclient.common.utils.
get_dict_properties
(item, fields, mixed_case_fields=[], formatters={})¶Return a tuple containing the item properties.
Parameters: |
|
---|
congressclient.common.utils.
get_resource_id_from_name
(name, results)¶congressclient.common.utils.
import_class
(import_str)¶Returns a class from a string including module and class
Parameters: | import_str – a string representation of the class name |
---|---|
Return type: | the requested class |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.