HI everyone,
I had some test python script to do API authentication, which worked fine in vManage 19.2, recently we got the vManage upgraded to 20.x, now what I've found is if I run the script consecutively within a short period of time, the first login will be successful, then all other login attempt will failed. But if I wait long enough (i.e., 5 minutes or longer) and run the script again, then it will be authenticated successfully again showing 'login successful'.
My script is as simple as the example given in the Devnet:
sess = requests.session()
login_response = sess.post(url=login_url, data=login_data, verify=False, proxies=https_proxy)
if b'<html>' in login_response.content:
print ("Login Failed")
else:
print ('Login successful!\n')
I'm suspecting now with v20.x logout action is enforced before a further login attempt otherwise it needs a longer time before the session it timed out? My sample code does not include session logout.
Has anyone tried on v20.x and had the similar experience?