Deploy_Run_PhySim(): pass node name

harmonize with other code that takes a "node" parameter.
This commit is contained in:
Robert Schmidt
2025-08-14 14:55:04 +02:00
parent af58cf2441
commit d3837cd3b0
4 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -421,17 +421,17 @@ class Cluster:
return status 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 == '': if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
raise ValueError(f'Insufficient Parameter: ranRepository {self.ranRepository} ranBranch {self.ranBranch} ranCommitID {self.ranCommitID}') 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) 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" script = "scripts/oc-deploy-physims.sh"
options = f"oaicicd-core-for-ci-ran {oc_release} {image_tag} {self.eNBSourceCodePath}" 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}') 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') 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') 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') archiveArtifact(ssh, ctx, f'{self.eNBSourceCodePath}/ci-scripts/physim_log.txt')
+2 -2
View File
@@ -296,8 +296,8 @@ def ExecuteActionWithParam(action, ctx):
elif action == 'Deploy_Run_PhySim': elif action == 'Deploy_Run_PhySim':
oc_release = test.findtext('oc_release') oc_release = test.findtext('oc_release')
svr_id = test.findtext('svr_id') or None node = test.findtext('node') or None
success = CLUSTER.deploy_oc_physim(ctx, HTML, oc_release, svr_id) success = CLUSTER.deploy_oc_physim(ctx, HTML, oc_release, node)
elif action == 'DeployCoreNetwork' or action == 'UndeployCoreNetwork': elif action == 'DeployCoreNetwork' or action == 'UndeployCoreNetwork':
cn_id = test.findtext('cn_id') cn_id = test.findtext('cn_id')
@@ -40,7 +40,7 @@
<class>Deploy_Run_PhySim</class> <class>Deploy_Run_PhySim</class>
<desc>Deploy and run physical simulator on openshift</desc> <desc>Deploy and run physical simulator on openshift</desc>
<oc_release>physims-4g</oc_release> <oc_release>physims-4g</oc_release>
<svr_id>avra</svr_id> <node>avra</node>
</testCase> </testCase>
</testCaseList> </testCaseList>
@@ -40,7 +40,7 @@
<class>Deploy_Run_PhySim</class> <class>Deploy_Run_PhySim</class>
<desc>Deploy and run physical simulator on openshift</desc> <desc>Deploy and run physical simulator on openshift</desc>
<oc_release>physims-5g</oc_release> <oc_release>physims-5g</oc_release>
<svr_id>avra</svr_id> <node>avra</node>
</testCase> </testCase>
</testCaseList> </testCaseList>