Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
XenServer hosts.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Networks that VIFs are attached to.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Physical block device.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Physical Network Interface.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Pool of hosts.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Storage Repository.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Virtual block device.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Virtual disk image.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
VLAN.
Bases: nova.virt.xenapi.client.objects.XenAPISessionObject
Virtual Machine.
Bases: object
Wrapper to make calling and mocking the session easier
The XenAPI protocol is an XML RPC API that is based around the XenAPI database, and operations you can do on each of the objects stored in the database, such as VM, SR, VDI, etc.
For more details see the XenAPI docs: http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/
Most, objects like VM, SR, VDI, etc, share a common set of methods: * vm_ref = session.VM.create(vm_rec) * vm_ref = session.VM.get_by_uuid(uuid) * session.VM.destroy(vm_ref) * vm_refs = session.VM.get_all()
Each object also has specific messages, or functions, such as: * session.VM.clean_reboot(vm_ref)
Each object has fields, like “VBDs” that can be fetched like this: * vbd_refs = session.VM.get_VBDs(vm_ref)
You can get all the fields by fetching the full record. However please note this is much more expensive than just fetching the field you require: * vm_rec = session.VM.get_record(vm_ref)
When searching for particular objects, you may be tempted to use get_all(), but this often leads to races as objects get deleted under your feet. It is preferable to use the undocumented: * vms = session.VM.get_all_records_where( ‘field “is_control_domain”=”true”’)