def _alloc_id(tenant, alloc, cell=None):
    """Constructs allocation id from tenant, name and optional cell."""
    if cell:
        return '%s/%s/%s' % (tenant, alloc, cell)
    else:
        return '%s/%s' % (tenant, alloc)