@bottle.route(url_base + '/<tenant_id>/datacenters/<datacenter_id>', method='POST')
def http_associate_datacenters(tenant_id, datacenter_id):
    '''associate an existing datacenter to a this tenant. '''
    #parse input data
    http_content,_ = format_in( datacenter_associate_schema )
    r = af.remove_extra_items(http_content, datacenter_associate_schema)
    if r != None: print "http_associate_datacenters: Warning: remove extra items ", r
    result, data = nfvo.associate_datacenter_to_tenant(mydb, tenant_id, datacenter_id, 
                                http_content['datacenter'].get('vim_tenant'),
                                http_content['datacenter'].get('vim_tenant_name'),
                                http_content['datacenter'].get('vim_username'),
                                http_content['datacenter'].get('vim_password')
                     )
    if 0 < result:
        print "http_associate_datacenters error %d %s" % (-result, data)
        bottle.abort(-result, data)
    else:
        print "http_associate_datacenters data" , data 
        return http_get_datacenter_id(tenant_id, data)
dataset/ETHPy150Open nfvlabs/openmano/openmano/httpserver.py/http_associate_datacenters/swapped operands of `<`