本文整理汇总了Python中VistATestClient.VistATestClientFactory.createVistATestClientWithArgs方法的典型用法代码示例。如果您正苦于以下问题:Python VistATestClientFactory.createVistATestClientWithArgs方法的具体用法?Python VistATestClientFactory.createVistATestClientWithArgs怎么用?Python VistATestClientFactory.createVistATestClientWithArgs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VistATestClient.VistATestClientFactory
的用法示例。
在下文中一共展示了VistATestClientFactory.createVistATestClientWithArgs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='FOIA Patch Sequence Analyzer',
parents=[testClientParser])
parser.add_argument('-p', '--patchFileDir', required=True,
help='input file path to the folder that contains all the FOIA patches')
parser.add_argument('-l', '--logDir', required=True,
help='Output dirctory to store all log file information')
parser.add_argument('-i', '--install', default=False, action="store_true",
help = 'whether to install Patch or not')
group = parser.add_mutually_exclusive_group()
group.add_argument('-n', '--numOfPatch', default=1,
help="input All for all patches, "
"otherwise just enter number, default is 1")
group.add_argument('-u', '--upToPatch',
help="install patches up to specified install name")
group.add_argument('-o', '--onlyPatch',
help='install specified patch and required patches only'
', this option will ignore the CSV dependencies')
parser.add_argument('-d', '--duz', default=17, type=int,
help='installer\'s VistA instance\'s DUZ')
result = parser.parse_args();
print (result)
inputPatchDir = result.patchFileDir
assert os.path.exists(inputPatchDir)
outputDir = result.logDir
assert os.path.exists(outputDir)
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
testClient2 = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
initConsoleLogging()
with testClient as vistAClient:
patchSeqApply = PatchSequenceApply(vistAClient, outputDir)
patchSeqApply._duz = result.duz
assert testClient2
with testClient2 as vistAClient2:
patchSeqApply._testClient2 = vistAClient2
if result.upToPatch:
patchSeqApply.generatePatchSequence(inputPatchDir,
result.upToPatch, True)
else:
patchSeqApply.generatePatchSequence(inputPatchDir, result.onlyPatch)
if result.install:
if result.onlyPatch:
patchSeqApply.applyPatchSequenceByNumber("All")
elif result.upToPatch:
patchSeqApply.applyPatchSequenceByInstallName(result.upToPatch)
else:
patchSeqApply.applyPatchSequenceByNumber(result.numOfPatch)
示例2: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='FOIA Patch Sequence Analyzer',
parents=[testClientParser])
parser.add_argument('-p', '--patchFileDir', required=True,
help='input file path to the folder that contains all the FOIA patches')
parser.add_argument('-l', '--logDir', required=True,
help='Output dirctory to store all log file information')
parser.add_argument('-i', '--install', default=False, action="store_true",
help = 'whether to install KIDS Patch or not')
parser.add_argument('-n', '--numOfPatch', required=False, default=1,
help="input All for all patches, otherwise just enter number, default is 1")
result = parser.parse_args();
print (result)
inputPatchDir = result.patchFileDir
assert os.path.exists(inputPatchDir)
outputDir = result.logDir
assert os.path.exists(outputDir)
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
with testClient as vistAClient:
kidsPatchApply = KIDSPatchSequenceApply(vistAClient, outputDir)
kidsPatchApply.generateKIDSPatchSequence(inputPatchDir)
if result.install:
kidsPatchApply.applyKIDSPatchSequence(result.numOfPatch)
示例3: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='VistA Data Extractor',
parents=[testClientParser])
parser.add_argument('-o', '--outputDir', required=True,
help='output Dir to store global/routine export files')
parser.add_argument('-r', '--vistARepo', required=True,
help='path to the top directory of VistA-FOIA repository')
parser.add_argument('-l', '--logDir', required=True,
help='path to the top directory to store the log files')
parser.add_argument('-ro', '--routineOutDir', default=None,
help='path to the directory where GT. M stores routines')
result = parser.parse_args();
print (result)
outputDir = result.outputDir
assert os.path.exists(outputDir)
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
with testClient as vistAClient:
vistADataExtractor = VistADataExtractor(result.vistARepo,
outputDir,
result.logDir,
result.routineOutDir)
vistADataExtractor.extractData(testClient)
示例4: createTestClient
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def createTestClient():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description="Default KIDS Installer", parents=[testClientParser])
result = parser.parse_args()
print(result)
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
return testClient
示例5: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='VistA Routine Export',
parents=[testClientParser])
parser.add_argument('-o', '--outputFile',
help='Output File Name to store routine export information')
parser.add_argument('-a', '--allRoutines', action="store_true", default=False,
help='export all routines')
parser.add_argument('-r', '--routines', nargs='*',
help='only specified routine names')
parser.add_argument('-e', '--exclude', nargs='*', default=None,
help='exclude specified routine names')
result = parser.parse_args();
print (result)
outputFilename = result.outputFile
outputDir = os.path.dirname(outputFilename)
assert os.path.exists(outputDir)
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
with testClient as vistAClient:
logFilename = getTempLogFile(DEFAULT_OUTPUT_LOG_FILE_NAME)
print "Log File is %s" % logFilename
vistAClient.setLogFile(logFilename)
isAllRoutines = result.allRoutines
vistARoutineExport = VistARoutineExport()
if isAllRoutines:
vistARoutineExport.exportAllRoutines(vistAClient, outputFilename,
result.exclude)
else:
vistARoutineExport.exportRoutines(vistAClient, outputFilename,
result.routines,
result.exclude)
示例6: testMountDisMountLocalDb
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def testMountDisMountLocalDb():
from VistATestClient import createTestClientArgParser
from VistATestClient import VistATestClientFactory
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description="InterSystem Cache Mount Dismount Test", parents=[testClientParser])
parser.add_argument("-p", "--dirPath", required=True, help="Enter directory path for the local database")
parser.add_argument(
"-a",
"--action",
choices=["M", "D"],
required=True,
type=str,
help="M: mount the database, D: dismount the database. "
"Make sure InterSystem ^DATABASE routine is accessable via"
" specified namespace.",
)
result = parser.parse_args()
print result
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
with testClient:
if result.action == "D":
logging.info("Dismount LocalDB: %s" % result.dirPath)
dismountLocalDatabase(result.dirPath, testClient)
else:
logging.info("mount LocalDB: %s" % result.dirPath)
mountLocalDatabase(result.dirPath, testClient)
示例7: createTestClient
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def createTestClient():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description="VistA Patch Info Query", parents=[testClientParser])
result = parser.parse_args()
print (result)
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
return testClient
示例8: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='Default KIDS Installer',
parents=[testClientParser])
parser.add_argument('kidsFile', help='path to KIDS Build file')
parser.add_argument('-l', '--logFile', default=None, help='path to logFile')
parser.add_argument('-r', '--reinstall', default=False, action='store_true',
help='whether re-install the KIDS even it is already installed')
parser.add_argument('-g', '--globalFiles', default=None, nargs='*',
help='list of global files that need to import')
result = parser.parse_args();
print (result)
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
initConsoleLogging()
with testClient:
kidsFile = os.path.abspath(result.kidsFile)
from KIDSBuildParser import KIDSBuildParser
kidsParser = KIDSBuildParser(None)
kidsParser.unregisterSectionHandler(KIDSBuildParser.ROUTINE_SECTION)
kidsParser.parseKIDSBuild(kidsFile)
installNameList = kidsParser.installNameList
installName = installNameList[0]
multiBuildList = installNameList
if len(installNameList) == 1:
multiBuildList = None
defaultKidsInstall = DefaultKIDSBuildInstaller(kidsFile,
installName,
logFile=result.logFile,
multiBuildList=multiBuildList,
globals=result.globalFiles)
defaultKidsInstall.runInstallation(testClient, result.reinstall)
示例9: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='Default KIDS Installer',
parents=[testClientParser])
parser.add_argument('kidsFile', metavar='K', help='path to KIDS Build file')
parser.add_argument('installName', metavar='I', help='kids install name')
parser.add_argument('-l', '--logFile', default=None, help='path to logFile')
parser.add_argument('-r', '--reinstall', default=False, action='store_true',
help='whether re-install the KIDS even it is already installed')
parser.add_argument('-m', '--multiBuildList', default=None, nargs='*',
help='list of multibuild install names')
parser.add_argument('-g', '--globalFiles', default=None, nargs='*',
help='list of global files that need to import')
result = parser.parse_args();
print (result)
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
initConsoleLogging()
with testClient:
kidsFile = os.path.abspath(result.kidsFile)
defaultKidsInstall = DefaultKIDSPatchInstaller(kidsFile,
result.installName,
logFile=result.logFile,
multiBuildList=result.multiBuildList,
globals=result.globalFiles)
defaultKidsInstall.runInstallation(testClient, result.reinstall)
示例10: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description="VistA Routine Export", parents=[testClientParser])
parser.add_argument("-o", "--outputFile", help="Output File Name to store routine export information")
parser.add_argument("-a", "--allRoutines", action="store_true", default=False, help="export all routines")
parser.add_argument("-r", "--routines", nargs="*", help="only specified routine names")
parser.add_argument("-e", "--exclude", nargs="*", default=None, help="exclude specified routine names")
result = parser.parse_args()
print (result)
outputFilename = result.outputFile
outputDir = os.path.dirname(outputFilename)
assert os.path.exists(outputDir)
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
with testClient as vistAClient:
logFilename = getTempLogFile()
print "Log File is %s" % logFilename
vistAClient.setLogFile(logFilename)
isAllRoutines = result.allRoutines
vistARoutineExport = VistARoutineExport()
if isAllRoutines:
vistARoutineExport.exportAllRoutines(vistAClient, outputFilename, result.exclude)
else:
vistARoutineExport.exportRoutines(vistAClient, outputFilename, result.routines, result.exclude)
示例11: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='FOIA Patch Sequence Analyzer',
parents=[testClientParser])
parser.add_argument('-f', '--foiaBranch', required=True,
help='input the branch name from which the global files are downloaded')
parser.add_argument('-r', '--foiaRemote', required=False, default="https://raw.githubusercontent.com/OSEHRA-Sandbox/VistA-M/",
help='input the VistA-M repository from which the global files are downloaded, must be a link to the raw data.\
Default remote is: https://raw.githubusercontent.com/OSEHRA-Sandbox/VistA-M/ ')
parser.add_argument('-t', '--tmpDir', required=True,
help='input the filepath to a directory to download the necessary global files')
parser.add_argument('-g', '--gtmDir', required=False,
help='input the filepath to a directory where GT.M stores its routines')
parser.add_argument('-i', '--install', required=False, action="store_true",
help='Attempt to install global files with ^ZGI?')
parser.add_argument('-l', '--log', required=False,
help='File to which I would log VistA communication')
result = parser.parse_args();
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
initConsoleLogging()
if result.log: testClient.setLogFile(result.log)
with testClient as vistaClient:
update = updateMFSGlobals()
update.updateMFSGlobalFiles(vistaClient,result.foiaBranch, result.foiaRemote,result.tmpDir, result.gtmDir, result.install)
示例12: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='VistA M Component Extractor',
parents=[testClientParser])
parser.add_argument('-o', '--outputDir', required=True,
help='output Dir to store global/routine export files')
parser.add_argument('-r', '--vistARepo', required=True,
help='path to the top directory of VistA-M repository')
parser.add_argument('-l', '--logDir', required=True,
help='path to the top directory to store the log files')
parser.add_argument('-ro', '--routineOutDir', default=None,
help='path to the directory where GT. M stores routines')
parser.add_argument('-sx', '--serialize', default=False, action="store_true",
help = 'export the globals serially (Needed on on single-user Cache instace)')
result = parser.parse_args();
print (result)
outputDir = result.outputDir
assert os.path.exists(outputDir)
initConsoleLogging()
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
with testClient as vistAClient:
vistADataExtractor = VistADataExtractor(result.vistARepo,
outputDir,
result.logDir,
result.routineOutDir,
serialExport = result.serialize)
vistADataExtractor.extractData(testClient)
示例13: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='VistA Initialize FileMan Utilities',
parents=[testClientParser])
parser.add_argument('roFile', help="routine import file in ro format")
result = parser.parse_args();
print (result)
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
with testClient as vistAClient:
logFilename = getTempLogFile()
print "Log File is %s" % logFilename
initConsoleLogging()
vistAClient.setLogFile(logFilename)
installFileMan22_2(vistAClient, result.roFile)
示例14: main
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def main():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description="Default KIDS Installer", parents=[testClientParser])
parser.add_argument("kidsFile", help="path to KIDS Build file")
parser.add_argument("-l", "--logFile", default=None, help="path to logFile")
parser.add_argument(
"-r",
"--reinstall",
default=False,
action="store_true",
help="whether re-install the KIDS even it is already installed",
)
parser.add_argument(
"-t", "--tglobalprint", default=None, help="folder to hold a printout of Transport global information"
)
parser.add_argument("-g", "--globalFiles", default=None, nargs="*", help="list of global files that need to import")
parser.add_argument("-d", "--duz", default=DEFAULT_INSTALL_DUZ, type=int, help="installer's VistA instance's DUZ")
result = parser.parse_args()
print(result)
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
initConsoleLogging()
with testClient:
kidsFile = os.path.abspath(result.kidsFile)
from KIDSBuildParser import KIDSBuildParser
kidsParser = KIDSBuildParser(None)
kidsParser.unregisterSectionHandler(KIDSBuildParser.ROUTINE_SECTION)
kidsParser.parseKIDSBuild(kidsFile)
installNameList = kidsParser.installNameList
installName = installNameList[0]
multiBuildList = installNameList
if len(installNameList) == 1:
multiBuildList = None
defaultKidsInstall = DefaultKIDSBuildInstaller(
kidsFile,
installName,
logFile=result.logFile,
multiBuildList=multiBuildList,
duz=result.duz,
globals=result.globalFiles,
printTG=result.tglobalprint,
)
defaultKidsInstall.runInstallation(testClient, result.reinstall)
示例15: testMain
# 需要导入模块: from VistATestClient import VistATestClientFactory [as 别名]
# 或者: from VistATestClient.VistATestClientFactory import createVistATestClientWithArgs [as 别名]
def testMain():
testClientParser = createTestClientArgParser()
parser = argparse.ArgumentParser(description='VistA Global Import Tool',
parents=[testClientParser])
parser.add_argument('-i', '--inputFile', required=True,
help='input global file path to be imported to VistA')
result = parser.parse_args();
print (result)
inputFile = result.inputFile
assert os.path.exists(inputFile)
""" create the VistATestClient"""
testClient = VistATestClientFactory.createVistATestClientWithArgs(result)
assert testClient
with testClient as vistAClient:
logFilename = getTempLogFile()
print "Log File is %s" % logFilename
vistAClient.setLogFile(logFilename)
vistAGlobalImport = VistAGlobalImport()
vistAGlobalImport.importGlobal(vistAClient, inputFile)