Skip to content

Commit

Permalink
Add a DUZ argument to autoInstallers
Browse files Browse the repository at this point in the history
Add a DUZ argument which will allow the user to specify the DUZ used
when the command is started.  This is needed for the VeHU instance where
the 17 user does not exist.

Change-Id: Ie3167c69c12672591e9a3e10475c341fbb1bcd80
  • Loading branch information
josephsnyder committed Dec 20, 2018
1 parent 13880dc commit 37a5cac
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Scripts/PatchIncrInstallExtractCommit.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def _parseJSONConfig(self, config):
testClientConfig = self._config['VistA_Connection']
self._instance = testClientConfig.get('instance',DEFAULT_INSTANCE)
self._useSudo = testClientConfig.get('useSudo', False)
self._duz = testClientConfig.get('duz', "17")
def _createTestClient(self):
testClientConfig = self._config['VistA_Connection']
system = testClientConfig['system']
Expand Down Expand Up @@ -172,6 +173,7 @@ def run(self):
with testClient:
with testClient2:
patchApply = PatchSequenceApply(testClient, patchLogDir,testClient2)
patchApply._duz= self._duz
outPatchList = patchApply.generatePatchSequence(inputPatchDir)
if not outPatchList:
logger.info("No Patch needs to apply")
Expand Down
1 change: 1 addition & 0 deletions Scripts/PatchIncrInstallExtractCommit.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"VistA_Connection":
{
"system": 1,
"duz": "17",
"instance": "instance name",
"namespace": "namespace",
"username": "cacheusername",
Expand Down
9 changes: 7 additions & 2 deletions Scripts/PatchSequenceApply.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,16 @@ def __installPatch__(self, patchInfo):
seqNo, logFileName,
multiBuildsList,
files=associateFiles,
globals=associatedGlobals)
globals=associatedGlobals,
duz = self._duz)

else:
kidsInstaller = KIDSInstallerFactory.createKIDSInstaller(
kidsPath, installName, seqNo, logFileName,
multiBuildsList,
files=associateFiles,
globals=associatedGlobals)
globals=associatedGlobals,
duz = self._duz)
logger.info("Applying Patch %s" % patchInfo)
assert kidsInstaller
return kidsInstaller.runInstallation(self._testClient, self._testClient2)
Expand Down Expand Up @@ -406,6 +408,8 @@ def main():
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)
Expand All @@ -420,6 +424,7 @@ def main():
initConsoleLogging()
with testClient as vistAClient:
patchSeqApply = PatchSequenceApply(vistAClient, outputDir)
patchSeqApply._duz = result.duz
assert testClient2
with testClient2 as vistAClient2:
patchSeqApply._testClient2 = vistAClient2
Expand Down

0 comments on commit 37a5cac

Please sign in to comment.