Commit a48728ba authored by Robert Schmidt's avatar Robert Schmidt

CI: Push_Image_to_Local_Registry(): harmonize code

- pass parameter directly instead of indirectly via class
- harmonize to svr_id to harmonize parameter with parameters in the next
  commit (and towards a future harmonization of directly taking node
  names instead of "IDs")
parent 3e51fcdf
......@@ -334,7 +334,6 @@ class Containerize():
self.cliOptions = ''
self.imageToCopy = ''
self.registrySvrId = ''
self.testSvrId = ''
self.imageToPull = []
#checkers from xml
......@@ -725,8 +724,8 @@ class Containerize():
HTML.CreateHtmlTabFooter(False)
return False
def Push_Image_to_Local_Registry(self, HTML):
lIpAddr, lSourcePath = self.GetCredentials(self.registrySvrId)
def Push_Image_to_Local_Registry(self, HTML, svr_id):
lIpAddr, lSourcePath = self.GetCredentials(svr_id)
logging.debug('Pushing images from server: ' + lIpAddr)
ssh = cls_cmd.getConnection(lIpAddr)
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
......
......@@ -370,10 +370,8 @@ def ExecuteActionWithParam(action):
success = SCA.CppCheckAnalysis(HTML)
elif action == 'Push_Local_Registry':
string_field = test.findtext('registry_svr_id')
if (string_field is not None):
CONTAINERS.registrySvrId = string_field
success = CONTAINERS.Push_Image_to_Local_Registry(HTML)
svr_id = test.findtext('svr_id')
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id)
elif action == 'Pull_Local_Registry':
string_field = test.findtext('test_svr_id')
......
......@@ -49,7 +49,7 @@
<testCase id="000010">
<class>Push_Local_Registry</class>
<desc>Push Images to Local Registry</desc>
<registry_svr_id>0</registry_svr_id>
<svr_id>0</svr_id>
</testCase>
</testCaseList>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment