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:
+3
-7
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user