Hi there, nice script! Here is a suggestion for improvement:
I noticed that XenAPI sessions are setup using session.login_with_password, but they don't seem to be logged out off at the end (session.logout). This means that each time you run the script, you leak a session.
A session logout does not happen automatically when breaking the connection with the server, because sessions can be reused across connections (a session is just an authentication token).
Sessions are a limited resource in xapi, so it is best logout your session as soon as it is no longer needed.
Hi there, nice script! Here is a suggestion for improvement:
I noticed that XenAPI sessions are setup using
session.login_with_password
, but they don't seem to be logged out off at the end (session.logout
). This means that each time you run the script, you leak a session.A session logout does not happen automatically when breaking the connection with the server, because sessions can be reused across connections (a session is just an authentication token).
Sessions are a limited resource in xapi, so it is best logout your session as soon as it is no longer needed.