#NEWLINE# def list_vms( session ) : #NEWLINE# #INDENT# vms = session . call_xenapi ( 'VM.get_all_records_where' , ( 'field "is_control_domain"="false" and field "is_a_template"="false" and field "resident_on"="%s"' % session . host_ref ) ) #NEWLINE# for vm_ref in vms . keys ( ) : #NEWLINE# #INDENT# ( yield ( vm_ref , vms [ vm_ref ] ) )