cinder.volume.drivers.datacore.utils
Module¶Utilities and helper functions.
build_network_address
(host, port)¶Combines the specified host name or IP address with the specified port.
Parameters: |
|
---|---|
Returns: | The host name or IP address and port combination; IPv6 addresses are enclosed in the square brackets |
get_distinct_by
(key, source)¶Finds distinct items for the key and returns the result in a list.
Parameters: |
|
---|---|
Returns: | The list of distinct by the key value items |
get_first
(predicate, source)¶Searches for an item that matches the conditions.
Parameters: |
|
---|---|
Returns: | The first item that matches the conditions defined by the specified predicate, if found; otherwise StopIteration is raised |
get_first_or_default
(predicate, source, default)¶Searches for an item that matches the conditions.
Parameters: |
|
---|---|
Returns: | The first item that matches the conditions defined by the specified predicate, if found; otherwise the default value |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.