def iter(context, resource, **kwargs):
    """List all resources"""
    data = utils.sanitize_kwargs(**kwargs)
    id = data.pop('id', None)
    subresource = data.pop('subresource', None)
    data['limit'] = data.get('limit', 20)

    if subresource:
        uri = '%s/%s/%s/%s' % (context.dci_cs_api, resource, id, subresource)
        resource = subresource
    else:
        uri = '%s/%s' % (context.dci_cs_api, resource)

    data['offset'] = 0
    while True:
        j = context.session.get(uri, timeout=HTTP_TIMEOUT, params=data).json()
        if len(j[resource]):
            for i in j[resource]:
                yield i
        else:
            break
        data['offset'] += data['limit']
List all resources