def parse_service_instance(service_instance):
 content = service_instance.RetrieveContent()
 object_view = content.viewManager.CreateContainerView(content.rootFolder, [], True)
 for obj in object_view.view:
  print obj
  if isinstance(obj, vim.VirtualMachine):
   vm.print_vm_info(obj)
 object_view.Destroy()
 return

def parse_service_instance ( service_instance ) : content = service_instance . RetrieveContent ( ) object_view = content . viewManager . CreateContainerView ( content . rootFolder , [ ] , True ) for obj in object_view . view : print obj if isinstance ( obj , vim . VirtualMachine ) : vm . print_vm_info ( obj ) object_view . Destroy ( ) return
print some basic knowledge about your environment as a hello world equivalent for pyvmomi .