def common_filters(marker=None, limit=None, sort_key=None, sort_dir=None,
                   fields=None):
    filters = []
    if isinstance(limit, int) and limit > 0:
        filters.append('limit=%s' % limit)
    if marker is not None:
        filters.append('marker=%s' % marker)
    if sort_key is not None:
        filters.append('sort_key=%s' % sort_key)
    if sort_dir is not None:
        filters.append('sort_dir=%s' % sort_dir)
    if fields is not None:
        filters.append('fields=%s' % ','.join(fields))
    return filters
Return first index of value.
dataset/ETHPy150Open openstack/python-ironicclient/ironicclient/common/utils.py/common_filters--crossover with--dataset/ETHPy150Open iamteem/redisco/redisco/containers.py/List.index