docs: def add3390(rh):
      """
      Adds a 3390 (ECKD) disk to a virtual machine's directory entry.
  
      Input:
         Request Handle with the following properties:
            function    - 'CHANGEVM'
            subfunction - 'ADD3390'
            userid      - userid of the virtual machine
            parms['diskPool']   - Disk pool
            parms['diskSize']   - size of the disk in cylinders or bytes.
            parms['fileSystem'] - Linux filesystem to install on the disk.
            parms['mode']       - Disk access mode
            parms['multiPW']    - Multi-write password
            parms['readPW']     - Read password
            parms['vaddr']      - Virtual address
            parms['writePW']    - Write password
  
      Output:
         Request Handle updated with the results.
         Return code - 0: ok, non-zero: error
      """
  
      rh.printSysLog("Enter changeVM.add3390")
      results, cyl = generalUtils.cvtToCyl(rh, rh.parms['diskSize'])
      if results['overallRC'] != 0:
          # message already sent.  Only need to update the final results.
          rh.updateResults(results)
  
      if results['overallRC'] == 0:
          parms = [
              "-T", rh.userid,
              "-v", rh.parms['vaddr'],
              "-t", "3390",
              "-a", "AUTOG",
              "-r", rh.parms['diskPool'],
              "-u", "1",
              "-z", cyl,
              "-f", "1"]
          hideList = []
  
          if 'mode' in rh.parms:
              parms.extend(["-m", rh.parms['mode']])
          else:
              parms.extend(["-m", 'W'])
          if 'readPW' in rh.parms:
              parms.extend(["-R", rh.parms['readPW']])
              hideList.append(len(parms) - 1)
          if 'writePW' in rh.parms:
              parms.extend(["-W", rh.parms['writePW']])
              hideList.append(len(parms) - 1)
          if 'multiPW' in rh.parms:
              parms.extend(["-M", rh.parms['multiPW']])
              hideList.append(len(parms) - 1)
  
          results = invokeSMCLI(rh,
                                "Image_Disk_Create_DM",
                                parms,
                                hideInLog=hideList)
  
          if results['overallRC'] != 0:
              # SMAPI API failed.
              rh.printLn("ES", results['response'])
              rh.updateResults(results)  # Use results returned by invokeSMCLI
  
      if (results['overallRC'] == 0 and 'fileSystem' in rh.parms):
          results = installFS(
              rh,
              rh.parms['vaddr'],
              rh.parms['mode'],
              rh.parms['fileSystem'],
              "3390")
  
      if results['overallRC'] == 0:
          results = isLoggedOn(rh, rh.userid)
          if results['overallRC'] != 0:
              # Cannot determine if VM is logged on or off.
              # We have partially failed.  Pass back the results.
              rh.updateResults(results)
          elif results['rs'] == 0:
              # Add the disk to the active configuration.
              parms = [
                  "-T", rh.userid,
                  "-v", rh.parms['vaddr'],
                  "-m", rh.parms['mode']]
  
              results = invokeSMCLI(rh, "Image_Disk_Create", parms)
              if results['overallRC'] == 0:
                  rh.printLn("N", "Added dasd " + rh.parms['vaddr'] +
                      " to the active configuration.")
              else:
                  # SMAPI API failed.
                  rh.printLn("ES", results['response'])
                  rh.updateResults(results)    # Use results from invokeSMCLI
  
      rh.printSysLog("Exit changeVM.add3390, rc: " +
                     str(rh.results['overallRC']))
  
      return rh.results['overallRC']