#NEWLINE# def GetVMs( content ) : #NEWLINE# #INDENT# print ( 'Getting all VMs ...' ) #NEWLINE# vm_view = content . viewManager . CreateContainerView ( obj . rootFolder , [ vim . VirtualMachine ] , True ) #NEWLINE# obj = [ vm for vm in vm_view . view ] #NEWLINE# vm_view . Destroy ( ) #NEWLINE# return obj