Created
May 20, 2014 22:33
-
-
Save rtomaszewski/31b0b70d063cd4c74fde to your computer and use it in GitHub Desktop.
Demo how to use XenServer XAPI form python (http://rtomaszewski.blogspot.co.uk/2014/05/how-to-install-ipython-on-xenserver-and.html)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XenAPI | |
s=XenAPI.Session('http://localhost/') | |
s.login_with_password('root', 'password') | |
s.xenapi.VM.get_all() | |
Out[30]: | |
['OpaqueRef:fed9f387-359c-5e34-04b3-7e9de0271e9b', | |
'OpaqueRef:f21c711b-5de7-fb1f-5320-ea4b8fbbdac2', | |
... | |
'OpaqueRef:0032adf3-04d3-6cf7-94fe-9d06af09bec7'] | |
s.xenapi.session.logout() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment