'Creates a bulk request for any kind of resource.'

def _create_bulk(self, fmt, number, resource, data, name='test', **kwargs):

    objects = []
    collection = ('%ss' % resource)
    for i in range(number):
        obj = copy.deepcopy(data)
        obj[resource]['name'] = ('%s_%s' % (name, i))
        if (('override' in kwargs) and (i in kwargs['override'])):
            obj[resource].update(kwargs['override'][i])
        objects.append(obj)
    req_data = {collection: objects}
    req = self.new_create_request(collection, req_data, fmt)
    if (('set_context' in kwargs) and (kwargs['set_context'] is True) and ('tenant_id' in kwargs)):
        req.environ['neutron.context'] = context.Context('', kwargs['tenant_id'])
    elif ('context' in kwargs):
        req.environ['neutron.context'] = kwargs['context']
    return req.get_response(self.api)
