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


Python VistAMenuUtil.exitFileManMenu方法代码示例

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


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

示例1: createAllPackageMapping

# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import exitFileManMenu [as 别名]
 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,代码行数:27,代码来源:VistAPackageInfoFetcher.py

示例2: getInstallationStatus

# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import exitFileManMenu [as 别名]
 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,代码行数:35,代码来源:VistAPackageInfoFetcher.py

示例3: addPackagePatchHistory

# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import exitFileManMenu [as 别名]
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,代码行数:37,代码来源:DefaultKIDSBuildInstaller.py

示例4: getAllPatchInstalledAfterByTime

# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import exitFileManMenu [as 别名]
 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,代码行数:57,代码来源:VistAPackageInfoFetcher.py

示例5: getInstallationStatus

# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import exitFileManMenu [as 别名]
 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,代码行数:45,代码来源:VistAPackageInfoFetcher.py

示例6: inhibitLogons

# 需要导入模块: from VistAMenuUtil import VistAMenuUtil [as 别名]
# 或者: from VistAMenuUtil.VistAMenuUtil import exitFileManMenu [as 别名]
def inhibitLogons(testClient, flag=True):
  from VistAMenuUtil import VistAMenuUtil
  from VistATaskmanUtil import getBoxVolPair
  volumeSet = getBoxVolPair(testClient).split(':')[0]
  menuUtil = VistAMenuUtil(duz=1)
  menuUtil.gotoFileManEditEnterEntryMenu(testClient)
  conn = testClient.getConnection()
  conn.send('14.5\r') # 14.5 is the VOLUME SET File
  conn.expect('EDIT WHICH FIELD: ')
  conn.send('1\r') # field Inhibit Logons?
  conn.expect('THEN EDIT FIELD: ')
  conn.send('\r')
  conn.expect('Select VOLUME SET: ')
  conn.send('%s\r' % volumeSet)
  conn.expect('INHIBIT LOGONS\?: ')
  if flag:
    conn.send('YES\r')
  else:
    conn.send('NO\r')
  conn.expect('Select VOLUME SET: ')
  conn.send('\r')
  menuUtil.exitFileManMenu(testClient)
开发者ID:MikeLHenderson,项目名称:VistA,代码行数:24,代码来源:VistAInitFileMan.py


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