osc_lib.api.utils Module¶API Utilities Library
osc_lib.api.utils.simple_filter(data=None, attr=None, value=None, property_field=None)¶Filter a list of dicts
| Parameters: |
|
|---|---|
| Returns: | Returns the filtered list |
| Rtype list: |
This simple filter (one attribute, one exact-match value) searches a
list of dicts to select items. It first searches the item dict for a
matching attr then does an exact-match on the value. If
property_field is given, it will look inside that field (if it
exists and is a dict) for a matching value.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.