CI: Clean_Test_Server_Images(): harmonize code
- pass parameter directly instead of indirectly via class - harmonize to svr_id to read through common code in the next commits - pass images to express which images will be deleted - refactor function to use "with" for cls_cmd, and return success (or not)
This commit is contained in:
+3
-4
@@ -379,10 +379,9 @@ def ExecuteActionWithParam(action):
|
||||
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images)
|
||||
|
||||
elif action == 'Clean_Test_Server_Images':
|
||||
string_field = test.findtext('test_svr_id')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.testSvrId = string_field
|
||||
success = CONTAINERS.Clean_Test_Server_Images(HTML)
|
||||
svr_id = test.findtext('svr_id')
|
||||
images = test.findtext('images').split()
|
||||
success = CONTAINERS.Clean_Test_Server_Images(HTML, svr_id, images)
|
||||
|
||||
elif action == 'Custom_Command':
|
||||
node = test.findtext('node')
|
||||
|
||||
Reference in New Issue
Block a user