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")
This commit is contained in:
@@ -334,7 +334,6 @@ class Containerize():
|
|||||||
self.cliOptions = ''
|
self.cliOptions = ''
|
||||||
|
|
||||||
self.imageToCopy = ''
|
self.imageToCopy = ''
|
||||||
self.registrySvrId = ''
|
|
||||||
self.testSvrId = ''
|
self.testSvrId = ''
|
||||||
self.imageToPull = []
|
self.imageToPull = []
|
||||||
#checkers from xml
|
#checkers from xml
|
||||||
@@ -725,8 +724,8 @@ class Containerize():
|
|||||||
HTML.CreateHtmlTabFooter(False)
|
HTML.CreateHtmlTabFooter(False)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def Push_Image_to_Local_Registry(self, HTML):
|
def Push_Image_to_Local_Registry(self, HTML, svr_id):
|
||||||
lIpAddr, lSourcePath = self.GetCredentials(self.registrySvrId)
|
lIpAddr, lSourcePath = self.GetCredentials(svr_id)
|
||||||
logging.debug('Pushing images from server: ' + lIpAddr)
|
logging.debug('Pushing images from server: ' + lIpAddr)
|
||||||
ssh = cls_cmd.getConnection(lIpAddr)
|
ssh = cls_cmd.getConnection(lIpAddr)
|
||||||
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
|
imagePrefix = 'porcepix.sboai.cs.eurecom.fr'
|
||||||
|
|||||||
+2
-4
@@ -370,10 +370,8 @@ def ExecuteActionWithParam(action):
|
|||||||
success = SCA.CppCheckAnalysis(HTML)
|
success = SCA.CppCheckAnalysis(HTML)
|
||||||
|
|
||||||
elif action == 'Push_Local_Registry':
|
elif action == 'Push_Local_Registry':
|
||||||
string_field = test.findtext('registry_svr_id')
|
svr_id = test.findtext('svr_id')
|
||||||
if (string_field is not None):
|
success = CONTAINERS.Push_Image_to_Local_Registry(HTML, svr_id)
|
||||||
CONTAINERS.registrySvrId = string_field
|
|
||||||
success = CONTAINERS.Push_Image_to_Local_Registry(HTML)
|
|
||||||
|
|
||||||
elif action == 'Pull_Local_Registry':
|
elif action == 'Pull_Local_Registry':
|
||||||
string_field = test.findtext('test_svr_id')
|
string_field = test.findtext('test_svr_id')
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<testCase id="000010">
|
<testCase id="000010">
|
||||||
<class>Push_Local_Registry</class>
|
<class>Push_Local_Registry</class>
|
||||||
<desc>Push Images to Local Registry</desc>
|
<desc>Push Images to Local Registry</desc>
|
||||||
<registry_svr_id>0</registry_svr_id>
|
<svr_id>0</svr_id>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
</testCaseList>
|
</testCaseList>
|
||||||
|
|||||||
Reference in New Issue
Block a user