CI: Pull_Image_from_Registry(): harmonize code
- pass parameter directly instead of indirectly via class - call it simply "images", to harmonize with clean-function later - harmonize to svr_id as in the previous commit - rewrite function to use with-statement with cls_cmd - optionally pass a tag to use (which will be used in a test, and can be used to pull flexric) - Introduce Pull_Image() which does the actual pulling, can pull from any registry, and will be reused in the case of pulling from cluster.
This commit is contained in:
+3
-8
@@ -374,14 +374,9 @@ def ExecuteActionWithParam(action):
|
||||
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id)
|
||||
|
||||
elif action == 'Pull_Local_Registry':
|
||||
string_field = test.findtext('test_svr_id')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.testSvrId = string_field
|
||||
CONTAINERS.imageToPull.clear()
|
||||
string_field = test.findtext('images_to_pull')
|
||||
if (string_field is not None):
|
||||
CONTAINERS.imageToPull = string_field.split()
|
||||
success = CONTAINERS.Pull_Image_from_Local_Registry(HTML)
|
||||
svr_id = test.findtext('svr_id')
|
||||
images = test.findtext('images').split()
|
||||
success = CONTAINERS.Pull_Image_from_Registry(HTML, svr_id, images)
|
||||
|
||||
elif action == 'Clean_Test_Server_Images':
|
||||
string_field = test.findtext('test_svr_id')
|
||||
|
||||
Reference in New Issue
Block a user