'Allocates a floating IP to the tenant.
You must provide a pool name or id for which you would like to
allocate a floating IP.
:returns: FloatingIp object corresponding to an allocated floating IP'

@profiler.trace
def allocate(self, pool, tenant_id=None, **params):

    if (not tenant_id):
        tenant_id = self.request.user.project_id
    create_dict = {'floating_network_id': pool, 'tenant_id': tenant_id}
    if ('subnet_id' in params):
        create_dict['subnet_id'] = params['subnet_id']
    if ('floating_ip_address' in params):
        create_dict['floating_ip_address'] = params['floating_ip_address']
    fip = self.client.create_floatingip({'floatingip': create_dict}).get('floatingip')
    self._set_instance_info(fip)
    return FloatingIp(fip)
