@bottle.route(url_base + '/<tenant_id>/datacenters/<datacenter_id>/netmaps', method='DELETE')
@bottle.route(url_base + '/<tenant_id>/datacenters/<datacenter_id>/netmaps/<netmap_id>', method='DELETE')
def http_delnetmap_datacenter_id(tenant_id, datacenter_id, netmap_id=None):
    '''get datacenter networks, can use both uuid or name'''
    #obtain data
    result, datacenter_dict = mydb.get_table_by_uuid_name('datacenters', datacenter_id, "datacenter") 
    if result < 0:
        print (result, datacenter_dict) % "http_delnetmap_datacenter_id error %d %s"
        bottle.abort(-result, datacenter_dict)
    where_= {"datacenter_id":datacenter_dict['uuid']}
    if netmap_id:
        if af.check_valid_uuid(netmap_id):
            where_["uuid"] = netmap_id
        else:
            where_["name"] = netmap_id
    #change_keys_http2db(content, http2db_tenant, reverse=True)
    result, content =mydb.delete_row_by_dict(FROM='datacenter_nets', WHERE= where_) 
    if result < 0:
        print "http_delnetmap_datacenter_id error %d %s" % (result, content)
        bottle.abort(-result, content)
    elif result == 0 and netmap_id :
        bottle.abort(HTTP_Not_Found, "No netmap found with " + " and ".join(map(lambda x: str(x[0])+": "+str(x[1]), where_.iteritems())) )
    if netmap_id:
        return format_out({"result": "netmap %s deleted" % netmap_id})
    else:
        return format_out({"result": "%d netmap deleted" % result})
dataset/ETHPy150Open nfvlabs/openmano/openmano/httpserver.py/http_delnetmap_datacenter_id/swapped operands of `%`