@bottle.route(url_base + '/<tenant_id>/scenarios', method='GET')
def http_get_scenarios(tenant_id):
    '''get scenarios list'''
    #check valid tenant_id
    if tenant_id != "any" and not nfvo.check_tenant(mydb, tenant_id): 
        print "httpserver.http_get_scenarios() tenant '%s' not found" % tenant_id
        bottle.abort(HTTP_Not_Found, "Tenant '%s' not found" % tenant_id)
        return
    #obtain data
    s,w,l=filter_query_string(bottle.request.query, None, ('uuid', 'name', 'description', 'tenant_id', 'created_at', 'public'))
    where_or={}
    if tenant_id != "any":
        where_or["tenant_id"] = tenant_id
        where_or["public"] = True
    result, data = mydb.get_table(SELECT=s, WHERE=w, WHERE_OR=where_or, WHERE_AND_OR="AND", LIMIT=l, FROM='scenarios')
    if 0 < result:
        print "http_get_scenarios error %d %s" % (-result, data)
        bottle.abort(-result, data)
    else:
        convert_datetime2str(data)
        af.convert_str2boolean(data, ('public',) )
        scenarios={'scenarios':data}
        #print json.dumps(scenarios, indent=4)
        return format_out(scenarios)
dataset/ETHPy150Open nfvlabs/openmano/openmano/httpserver.py/http_get_scenarios/swapped operands of `<`