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:
Robert Schmidt
2024-11-25 15:33:41 +01:00
parent a48728ba35
commit dee9ce26db
43 changed files with 123 additions and 130 deletions
+3 -8
View File
@@ -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')