Deploy_Run_PhySim(): pass node name

harmonize with other code that takes a "node" parameter.
This commit is contained in:
Robert Schmidt
2025-08-11 12:29:46 +02:00
parent af58cf2441
commit d3837cd3b0
4 changed files with 8 additions and 8 deletions

View File

@@ -421,17 +421,17 @@ class Cluster:
return status
def deploy_oc_physim(self, ctx, HTML, oc_release, svr_id):
def deploy_oc_physim(self, ctx, HTML, oc_release, node):
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version)
raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {self.ranBranch} ranCommitID {self.ranCommitID}')
image_tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
logging.debug(f'Running physims from server: {svr_id}')
logging.debug(f'Running physims from server: {node}')
script = "scripts/oc-deploy-physims.sh"
options = f"oaicicd-core-for-ci-ran {oc_release} {image_tag} {self.eNBSourceCodePath}"
ret = cls_cmd.runScript(svr_id, script, 600, options)
ret = cls_cmd.runScript(node, script, 600, options)
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
with cls_cmd.getConnection(svr_id) as ssh:
with cls_cmd.getConnection(node) as ssh:
details_json = archiveArtifact(ssh, ctx, f'{self.eNBSourceCodePath}/ci-scripts/{oc_release}-tests.json')
result_junit = archiveArtifact(ssh, ctx, f'{self.eNBSourceCodePath}/ci-scripts/{oc_release}-run.xml')
archiveArtifact(ssh, ctx, f'{self.eNBSourceCodePath}/ci-scripts/physim_log.txt')

View File

@@ -296,8 +296,8 @@ def ExecuteActionWithParam(action, ctx):
elif action == 'Deploy_Run_PhySim':
oc_release = test.findtext('oc_release')
svr_id = test.findtext('svr_id') or None
success = CLUSTER.deploy_oc_physim(ctx, HTML, oc_release, svr_id)
node = test.findtext('node') or None
success = CLUSTER.deploy_oc_physim(ctx, HTML, oc_release, node)
elif action == 'DeployCoreNetwork' or action == 'UndeployCoreNetwork':
cn_id = test.findtext('cn_id')

View File

@@ -40,7 +40,7 @@
<class>Deploy_Run_PhySim</class>
<desc>Deploy and run physical simulator on openshift</desc>
<oc_release>physims-4g</oc_release>
<svr_id>avra</svr_id>
<node>avra</node>
</testCase>
</testCaseList>

View File

@@ -40,7 +40,7 @@
<class>Deploy_Run_PhySim</class>
<desc>Deploy and run physical simulator on openshift</desc>
<oc_release>physims-5g</oc_release>
<svr_id>avra</svr_id>
<node>avra</node>
</testCase>
</testCaseList>