CI: PullClusterImage(): harmonize code

- reuse cls_containerize.Containerize.PullImage()
- pass parameter directly instead of indirectly via class
- always read node name and use this instead of "sometimes" looking it
  up from a class member. With "sometimes" I mean that if no node name
  is given, it will take it from self.eNBIPAddress, which is confusing
  at best if we can give the node name directly
- consistently put the node name in the xml file
This commit is contained in:
Robert Schmidt
2024-11-25 15:33:41 +01:00
parent dee9ce26db
commit 74317e805d
9 changed files with 41 additions and 58 deletions
+3 -7
View File
@@ -397,13 +397,9 @@ def ExecuteActionWithParam(action):
success = cls_oaicitest.Custom_Script(HTML, node, script, command_fail)
elif action == 'Pull_Cluster_Image':
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
success = CLUSTER.PullClusterImage(HTML)
images = test.findtext('images').split()
node = test.findtext('node')
success = CLUSTER.PullClusterImage(HTML, node, images)
else:
logging.warning(f"unknown action {action}, skip step")