code: def main():
     
  
     args = GetArgs()
     if args.password:
        password = args.password
     else:
        password = getpass.getpass(prompt='Enter password for host %s and '
                                          'user %s: ' % (args.host,args.user))
  
     context = None
     if hasattr(ssl, '_create_unverified_context'):
        context = ssl._create_unverified_context()
     si = SmartConnect(host=args.host,
                       user=args.user,
                       pwd=password,
                       port=int(args.port),
                       sslContext=context)
     if not si:
         print("Could not connect to the specified host using specified "
               "username and password")
         return -1
  
     atexit.register(Disconnect, si)
  
     content = si.RetrieveContent()
     for child in content.rootFolder.childEntity:
        if hasattr(child, 'vmFolder'):
           datacenter = child
           vmFolder = datacenter.vmFolder
           vmList = vmFolder.childEntity
           for vm in vmList:
              PrintVmInfo(vm)
     return 0
docs: Simple command-line program for listing the virtual machines on a system.