diff --git a/ci-scripts/cls_cluster.py b/ci-scripts/cls_cluster.py index 56c60f7551..24b0c8902e 100644 --- a/ci-scripts/cls_cluster.py +++ b/ci-scripts/cls_cluster.py @@ -82,6 +82,7 @@ class Cluster: self.ranTargetBranch = "" self.cmd = None self.imageToPull = '' + self.testSvrId = None def _recreate_entitlements(self): # recreating entitlements, don't care if deletion fails @@ -195,12 +196,13 @@ class Cluster: self.cmd.run(f'oc delete -f {filename}') def PullClusterImage(self, HTML, RAN): + if self.testSvrId == None: self.testSvrId = self.eNBIPAddress if self.imageToPull == '': HELP.GenericHelp(CONST.Version) - HELP.EPCSrvHelp(self.imageToPull) - sys.exit('Insufficient eNB Parameters') + sys.exit('Insufficient Parameter') + logging.debug(f'Pull OC image {self.imageToPull} to server {self.testSvrId}') self.testCase_id = HTML.testCase_id - cmd = cls_cmd.getConnection(self.eNBIPAddress) + cmd = cls_cmd.getConnection(self.testSvrId) succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE) if not succeeded: logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 97bc6fbef1..4fdde98774 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -431,10 +431,12 @@ def GetParametersFromXML(action): RAN.command = test.findtext('command') RAN.command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes'] elif action == 'Pull_Cluster_Image': - # CLUSTER.imageToPull.clear() string_field = test.findtext('images_to_pull') if (string_field is not None): CLUSTER.imageToPull = string_field.split() + string_field = test.findtext('test_svr_id') + if (string_field is not None): + CLUSTER.testSvrId = string_field else: logging.warning(f"unknown action {action} from option-parsing point-of-view")