summaryrefslogtreecommitdiffstats
path: root/testapi/testapi-client/testapiclient/utils/__init__.py
blob: ebb891f14c0db1962f85d39e52ee3cc6689a08be (plain)
1
2
3
4
5
6
7
8
def get_item_properties(item, fields):
    """Return a tuple containing the item properties.

    :param item: a single item resource (e.g. Server, Project, etc)
    :param fields: tuple of strings with the desired field names
    """

    return tuple([item.get(field, '') for field in fields])