当前位置: 首页>>代码示例>>Python>>正文


Python VistAMenuUtil.VistAMenuUtil类代码示例

本文整理汇总了Python中VistAMenuUtil.VistAMenuUtil的典型用法代码示例。如果您正苦于以下问题:Python VistAMenuUtil类的具体用法?Python VistAMenuUtil怎么用?Python VistAMenuUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了VistAMenuUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: addPackagePatchHistory

def addPackagePatchHistory(packageName, version, seqNo, patchNo, vistAClient, inputDuz):
    logger.info("Adding %s, %s, %s, %s to Package Patch history" % (packageName, version, seqNo, patchNo))
    connection = vistAClient.getConnection()
    menuUtil = VistAMenuUtil(duz=1)
    menuUtil.gotoFileManEditEnterEntryMenu(vistAClient)
    connection.send("9.4\r")  # package file
    connection.expect("EDIT WHICH FIELD: ")
    connection.send("VERSION\r")
    connection.expect("EDIT WHICH VERSION SUB-FIELD: ")
    connection.send("PATCH APPLICATION HISTORY\r")
    connection.expect("EDIT WHICH PATCH APPLICATION HISTORY SUB-FIELD: ")
    connection.send("ALL\r")
    connection.expect("THEN EDIT VERSION SUB-FIELD: ")
    connection.send("\r")
    connection.expect("THEN EDIT FIELD: ")
    connection.send("\r")
    connection.expect("Select PACKAGE NAME: ")
    connection.send("%s\r" % packageName)
    connection.expect("Select VERSION: %s//" % version)
    connection.send("\r")
    connection.expect("Select PATCH APPLICATION HISTORY: ")
    connection.send("%s SEQ #%s\r" % (patchNo, seqNo))
    connection.expect("Are you adding .*\? No//")
    connection.send("YES\r")
    connection.expect("DATE APPLIED: ")
    connection.send("T\r")
    connection.expect("APPLIED BY: ")
    connection.send("`%s\r" % inputDuz)
    connection.expect("DESCRIPTION:")
    connection.send("\r")
    connection.expect("Select PATCH APPLICATION HISTORY: ")
    connection.send("\r")
    connection.expect("Select PACKAGE NAME: ")
    connection.send("\r")
    menuUtil.exitFileManMenu(vistAClient)
开发者ID:OSEHRA,项目名称:VistA,代码行数:35,代码来源:DefaultKIDSBuildInstaller.py

示例2: getInstallationStatus

 def getInstallationStatus(self, installName):
   connection = self._testClient.getConnection()
   result = -1 # default is not installed
   menuUtil = VistAMenuUtil(duz=1)
   menuUtil.gotoFileManInquireFileEntryMenu(self._testClient)
   connection.send("9.7\r") # Package file with fileman #9.7
   connection.expect("Select INSTALL NAME:")
   connection.send("%s\r" % installName)
   while True:
     index = connection.expect(["Select INSTALL NAME: ",
                                "ANOTHER ONE: ",
                                "CHOOSE 1-[0-9]+: "])
     if index == 0:
       connection.send("\r")
       break
     elif index == 1:
       txtToSearch = connection.before.replace("\r\n","")
       logger.debug(txtToSearch)
       result = indexOfInstallStatus(txtToSearch)
       connection.send("^\r")
       break
     # handle if the install has multiple install status
     elif index == 2:
       linesToSearch = connection.before.split("\r\n")
       for line in linesToSearch: # only care the the first line
         line = line.strip("\r\n ")
         if not re.search("^1 ", line): continue
         result = indexOfInstallStatus(line)
         break
       connection.send("^\r")
       continue
   menuUtil.exitFileManMenu(self._testClient)
   return result
开发者ID:cashmoneyhunny,项目名称:VistA,代码行数:33,代码来源:VistAPackageInfoFetcher.py

示例3: preInstallationWork

  def preInstallationWork(self, vistATestClient, **kargs):
    """ ignore the multi-build patch for now """
    if self._multiBuildList is not None:
      return
    globalFiles = self.__getGlobalFileList__()
    if globalFiles is None or len(globalFiles) == 0:
      return
    globalImport = VistAGlobalImport()
    for glbFile in globalFiles:
      logger.info("Import global file %s" % (glbFile))
      fileSize = os.path.getsize(glbFile)
      importTimeout = DEFAULT_GLOBAL_IMPORT_TIMEOUT
      importTimeout += int(fileSize/GLOBAL_IMPORT_BYTE_PER_SEC)
      globalImport.importGlobal(vistATestClient, glbFile, timeout=importTimeout)

    """ Requires the installer account to have the ZTMQ security key"""
    menuUtil = VistAMenuUtil(duz=17)
    menuUtil.gotoSystemMenu(vistAClient)
    connection.send("Allocation of Security\r")
    connection.expect("Allocate key")
    connection.send("ZTMQ\r\r")
    connection.expect("Holder of key")
    connection.send(" \r\r")
    connection.expect("Do you wish to proceed")
    connection.send("Y\r")
开发者ID:OSEHRA-Sandbox,项目名称:VistA,代码行数:25,代码来源:LA_5.2_88.py

示例4: createAllPackageMapping

 def createAllPackageMapping(self):
   self._packageMapping.clear()
   connection = self._testClient.getConnection()
   result = None
   menuUtil = VistAMenuUtil(duz=1) # set duz as 1
   menuUtil.gotoFileManPrintFileEntryMenu(self._testClient)
   # print file entry
   connection.send("9.4\r") # Package file with fileman #9.4
   connection.expect("SORT BY:")
   connection.send("\r")
   connection.expect("START WITH")
   connection.send("\r")
   connection.expect("FIRST PRINT FIELD:")
   connection.send(".01\r") # fileman field# .01 is NAME
   connection.expect("THEN PRINT FIELD:")
   connection.send("1\r") # fileman field# 1 is the PREFIX
   connection.expect("THEN PRINT FIELD:")
   connection.send("\r")
   connection.expect("PACKAGE LIST//")
   connection.send("\r")
   connection.expect("DEVICE:")
   connection.send(";132;99999\r")
   connection.expect("Select OPTION: ")
   self.__parseAllPackages__(connection.before)
   menuUtil.exitFileManMenu(self._testClient, waitOption=False)
开发者ID:cashmoneyhunny,项目名称:VistA,代码行数:25,代码来源:VistAPackageInfoFetcher.py

示例5: verifyTaskmanSiteParameter

 def verifyTaskmanSiteParameter(self, vistAClient, autoFix=True):
   retValue = True
   connection = vistAClient.getConnection()
   menuUtil = VistAMenuUtil(duz=1)
   boxVolPair = getBoxVolPair(vistAClient)
   logger.debug("Box:Vol Pair is [%s] " % boxVolPair)
   menuUtil.gotoTaskmanEditParamMenu(vistAClient)
   connection.send("Site Parameters Edit\r")
   connection.expect("Select TASKMAN SITE PARAMETERS BOX-VOLUME PAIR: ")
   connection.send("?\r")
   connection.expect("Answer with TASKMAN SITE PARAMETERS BOX-VOLUME PAIR.*?:")
   connection.expect("You may enter a new TASKMAN SITE PARAMETERS")
   curBoxVol = connection.before.strip(' \r\n')
   curBoxVol = [x.strip(' ') for x in curBoxVol.split('\r\n')]
   logger.debug("Box:Vol Pair is [%s] " % curBoxVol)
   if boxVolPair not in curBoxVol :
     logger.error("taskman site parameter mismatch, current:[%s], correct:[%s]" %
                   (curBoxVol, boxVolPair))
     if autoFix:
       self.__fixTaskmanSiteParameter__(connection, curBoxVol[0], boxVolPair)
     else:
       retValue = False
   connection.expect("Select TASKMAN SITE PARAMETERS BOX-VOLUME PAIR: ")
   connection.send('\r')
   menuUtil.exitTaskmanEditParamMenu(vistAClient)
   return retValue
开发者ID:A7medKotb,项目名称:VistA,代码行数:26,代码来源:VistATaskmanUtil.py

示例6: removeTaskmanFromWait

 def removeTaskmanFromWait(self, vistAClient):
   connection = vistAClient.getConnection()
   menuUtil = VistAMenuUtil(duz=1)
   menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
   connection.send("Remove Taskman from WAIT State\r")
   menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
   logger.info("Wait 10 seconds for Taskman to start")
   time.sleep(10)
开发者ID:A7medKotb,项目名称:VistA,代码行数:8,代码来源:VistATaskmanUtil.py

示例7: __gotoKIDSMainMenu__

 def __gotoKIDSMainMenu__(self, vistATestClient):
   menuUtil = VistAMenuUtil(self._duz)
   connection = vistATestClient.getConnection()
   connection.send('S ^PS(56,1961,0)="MAGNESIUM/ZALCITABINE (DIDEOXYCYTIDINE,ddC)^255^3150^2^1^10624"\r')
   connection.expect(vistATestClient.getPrompt())
   connection.send('S ^PS(56,531,0)="LOMEFLOXACIN/MAGNESIUM^3183^255^2^1^28817^3141031"\r')
   connection.expect(vistATestClient.getPrompt())
   connection.send('S ^PS(56,513,0)="ENOXACIN/MAGNESIUM^2779^255^2^1^37112^3141031"\r')
   menuUtil.gotoKidsMainMenu(vistATestClient)
开发者ID:OSEHRA-Sandbox,项目名称:VistA,代码行数:9,代码来源:PSN_4.0_533.py

示例8: getTaskmanStatus

 def getTaskmanStatus(self, vistAClient):
   connection = vistAClient.getConnection()
   menuUtil = VistAMenuUtil(duz=1)
   menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
   connection.send("MTM\r") #  Monitor Taskman
   curStatus = self.__getTaskmanStatus__(connection)
   connection.send("^\r")
   menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
   return curStatus
开发者ID:A7medKotb,项目名称:VistA,代码行数:9,代码来源:VistATaskmanUtil.py

示例9: stopMailManBackgroundFiler

 def stopMailManBackgroundFiler(self, vistAClient):
   connection = vistAClient.getConnection()
   menuUtil = VistAMenuUtil(duz=1)
   menuUtil.gotoMailmanLocalDeliveryMgrMenu(vistAClient)
   connection.send("STOP background filer\r")
   connection.expect("Are you sure you want the Background Filers to stop delivering mail\? ")
   connection.send("YES\r")
   menuUtil.exitMailmanLocalDeliveryMgrMenu(vistAClient)
   logger.info("Wait 30 seconds for Mailman backgroud filer to stop")
   time.sleep(30)
开发者ID:A7medKotb,项目名称:VistA,代码行数:10,代码来源:VistATaskmanUtil.py

示例10: stopHL7BackgroundFiler

 def stopHL7BackgroundFiler(self, vistAClient):
   connection = vistAClient.getConnection()
   menuUtil = VistAMenuUtil(duz=1)
   menuUtil.gotoHL7FilerLinkMgrMenu(vistAClient)
   connection.send("Stop All Messaging Background Processes\r")
   connection.expect("Okay to shut down all Links and Filers\? ")
   connection.send("Yes\r")
   menuUtil.exitHL7FilerLinkMgrMenu(vistAClient)
   logger.info("Wait 30 seconds for HL7 backgroud filer to stop")
   time.sleep(30)
开发者ID:A7medKotb,项目名称:VistA,代码行数:10,代码来源:VistATaskmanUtil.py

示例11: getAllPatchInstalledAfterByTime

 def getAllPatchInstalledAfterByTime(self, dateTime):
   """ This will search install file to find out all patches installed
       after specific time
   """
   connection = self._testClient.getConnection()
   menuUtil = VistAMenuUtil(duz=1)
   menuUtil.gotoFileManSearchFileEntryMenu(self._testClient)
   connection.send("9.7\r") # INSTALL file #
   connection.expect("-A- SEARCH FOR INSTALL FIELD: ")
   connection.send("17\r") # field # for INSTALL COMPLETE TIME
   connection.expect("-A- CONDITION: ")
   connection.send("GREATER THAN\r")
   connection.expect("-A- GREATER THAN DATE: ")
   connection.send("%s\r" % dateTime)
   connection.expect("-B- SEARCH FOR INSTALL FIELD: ")
   connection.send("\r")
   connection.expect("IF: A// ")
   connection.send("\r")
   connection.expect("STORE RESULTS OF SEARCH IN TEMPLATE: ")
   connection.send("\r")
   connection.expect([re.compile("SORT BY: ", re.I),
                      re.compile("SORT BY: NAME// ", re.I)])
   connection.send("17\r") # sort by INSTALL COMPLETE TIME
   connection.expect([re.compile("START WITH INSTALL COMPLETE TIME: ", re.I),
                      re.compile("START WITH INSTALL COMPLETE TIME: FIRST// ",re.I)])
   connection.send("\r")
   connection.expect(re.compile("WITHIN INSTALL COMPLETE TIME, SORT BY: ", re.I))
   connection.send("\r")
   connection.expect(re.compile("FIRST PRINT FIELD: ", re.I))
   connection.send("NAME\r")
   connection.expect(re.compile("THEN PRINT FIELD: ", re.I))
   connection.send("17\r")
   connection.expect(re.compile("THEN PRINT FIELD: ", re.I))
   connection.send("\r")
   connection.expect(re.compile("Heading \(S/C\): INSTALL SEARCH// ", re.I))
   connection.send("\r") # use default heading
   connection.expect("DEVICE:")
   connection.send(";132;99999\r")
   connection.expect("[0-9]+ MATCH(ES)? FOUND\.")
   result = connection.before.split("\r\n")
   output = []
   resultStart = False
   DATETIME_INDENT = 52
   for line in result:
     line = line.strip()
     if len(line) == 0:
       continue
     if resultStart:
       output.append((line[:DATETIME_INDENT].rstrip(),
                      parsePatchInstallDatetime(line[DATETIME_INDENT:])))
       continue
     if re.search('^-+$',line):
       resultStart = True
   menuUtil.exitFileManMenu(self._testClient)
   return output
开发者ID:OSEHRA,项目名称:VistA,代码行数:55,代码来源:VistAPackageInfoFetcher.py

示例12: __gotoKIDSMainMenu__

 def __gotoKIDSMainMenu__(self, vistATestClient):
   menuUtil = VistAMenuUtil(self._duz)
   connection = vistATestClient.getConnection()
   connection.send("D STOP^ZTMKU\r")
   connection.expect("Are you sure")
   connection.send("Y\r")
   connection.expect("Should active")
   connection.send("Y\r")
   connection.expect("Should active")
   connection.send("Y\r")
   time.sleep(30)
   menuUtil.gotoKidsMainMenu(vistATestClient)
开发者ID:OSEHRA-Sandbox,项目名称:VistA,代码行数:12,代码来源:VA+FILEMAN+22.2.py

示例13: placeTaskmanToWait

 def placeTaskmanToWait(self, vistAClient, shutdownSubMgrs=True):
   connection = vistAClient.getConnection()
   menuUtil = VistAMenuUtil(duz=1)
   menuUtil.gotoTaskmanMgrUtilMenu(vistAClient)
   connection.send("Place Taskman in a WAIT State\r")
   connection.expect("Should active submanagers shut down after finishing their current tasks\? ")
   if shutdownSubMgrs:
     connection.send("YES\r")
   else:
     connection.send("NO\r")
   menuUtil.exitTaskmanMgrUtilMenu(vistAClient)
   logger.info("Wait 10 seconds for Taskman to wait state")
   time.sleep(10)
开发者ID:A7medKotb,项目名称:VistA,代码行数:13,代码来源:VistATaskmanUtil.py

示例14: getPersonNameByDuz

def getPersonNameByDuz(inputDuz, vistAClient):
  logger.info ("inputDuz is %s" % inputDuz)
  """ user Kernel User API """
  connection = vistAClient.getConnection()
  menuUtil = VistAMenuUtil(duz=1)
  menuUtil.gotoSystemMenu(vistAClient)
  connection.send('Prog\r')
  connection.expect('Select Programmer Options')
  connection.send('^\r')
  menuUtil.exitSystemMenu(vistAClient)
  vistAClient.waitForPrompt()
  connection.send('W $$NAME^XUSER(%s)\r' % inputDuz)
  connection.expect('\)') # get rid of the echo
  vistAClient.waitForPrompt()
  result = connection.before.strip(' \r\n')
  connection.send('\r')
  return result
开发者ID:Ohumunnati,项目名称:VistA,代码行数:17,代码来源:DefaultKIDSBuildInstaller.py

示例15: getInstallationStatus

 def getInstallationStatus(self, installName):
   connection = self._testClient.getConnection()
   result = -1 # default is not installed
   if not self.isPatchInstalled(installName):
       menuUtil = VistAMenuUtil(duz=1)
       menuUtil.gotoFileManSearchFileEntryMenu(self._testClient)
       connection.send("9.7\r") # Package file with fileman #9.7
       connection.expect("SEARCH FOR")
       connection.send("NAME\r")
       connection.expect("CONDITION:")
       connection.send("EQUALS\r")
       connection.expect("EQUALS")
       connection.send("%s\r" % installName)
       connection.expect("SEARCH FOR")
       connection.send("\r")
       connection.expect("IF:")
       connection.send("\r")
       connection.expect("IN TEMPLATE")
       connection.send("\r")
       connection.expect(re.compile("SORT BY: ", re.I))
       connection.send("\r")
       connection.expect("Start with")
       connection.send("\r")
       connection.expect("First Print")
       connection.send("STATUS\r")
       connection.expect("Then Print")
       connection.send("\r")
       connection.expect("Heading")
       connection.send("\r")
       connection.expect("DEVICE:")
       connection.send(";132;99999\r")
       connection.expect("Select OPTION: ")
       linesToSearch = connection.before.split("\r\n")
       for line in linesToSearch: # only care the the first line
         line = line.strip("\r\n ")
         tmpResult = indexOfInstallStatus(line)
         if tmpResult > result:
           result=tmpResult
       connection.send("?\r")
       menuUtil.exitFileManMenu(self._testClient)
       return result
   else:
       return 3
开发者ID:OSEHRA,项目名称:VistA,代码行数:43,代码来源:VistAPackageInfoFetcher.py


注:本文中的VistAMenuUtil.VistAMenuUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。