(redata)
return len(req.json()["DATA"])
Perform actual call
Perform actual call
Perform actual call
def get_current_linodes(redata):
    ''' Perform actual call '''
    url = 'https://api.linode.com/'
    params = {
        "api_action": "linode.list",
        "api_key": str(redata['data']['api_key'])
    }
    try:
        req = requests.post(url, timeout=10.0, data=params, verify=True)
    except:
        return False
    return len(req.json()["DATA"])
def get_current_linodes ( redata ) : url = 'https://api.linode.com/' params = { "api_action" : "linode.list" , "api_key" : str ( redata [ 'data' ] [ 'api_key' ] ) } try : req = requests . post ( url , timeout = 10.0 , data = params , verify = True ) except : return False return len ( req . json ( ) [ "DATA" ] )