Commit ff4705e7 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Titouan Soulard

slapos_slap_tool: Move to use getSoftwareInstallationFromUrl method

parent c6dbe253
...@@ -344,7 +344,7 @@ class SlapTool(BaseTool): ...@@ -344,7 +344,7 @@ class SlapTool(BaseTool):
# Be sure to prevent accessing information to disallowed users # Be sure to prevent accessing information to disallowed users
compute_node = _assertACI(compute_node) compute_node = _assertACI(compute_node)
try: try:
software_installation = compute_node._getSoftwareInstallationFromUrl(url) software_installation = compute_node.getSoftwareInstallationFromUrl(url)
except NotFound: except NotFound:
data_dict = self._getAccessStatus(None) data_dict = self._getAccessStatus(None)
else: else:
...@@ -823,7 +823,7 @@ class SlapTool(BaseTool): ...@@ -823,7 +823,7 @@ class SlapTool(BaseTool):
Log the software release status Log the software release status
""" """
compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id) compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id)
software_installation = compute_node._getSoftwareInstallationFromUrl(url) software_installation = compute_node.getSoftwareInstallationFromUrl(url)
software_installation.setBuildingStatus( software_installation.setBuildingStatus(
'software release %s' % url, "building") 'software release %s' % url, "building")
...@@ -833,7 +833,7 @@ class SlapTool(BaseTool): ...@@ -833,7 +833,7 @@ class SlapTool(BaseTool):
Log the software release status Log the software release status
""" """
compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id) compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id)
software_installation = compute_node._getSoftwareInstallationFromUrl(url) software_installation = compute_node.getSoftwareInstallationFromUrl(url)
software_installation.setAccessStatus( software_installation.setAccessStatus(
'software release %s available' % url, "available") 'software release %s available' % url, "available")
...@@ -843,7 +843,7 @@ class SlapTool(BaseTool): ...@@ -843,7 +843,7 @@ class SlapTool(BaseTool):
Reports that Software Release is destroyed Reports that Software Release is destroyed
""" """
compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id) compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id)
software_installation = compute_node._getSoftwareInstallationFromUrl(url) software_installation = compute_node.getSoftwareInstallationFromUrl(url)
if software_installation.getSlapState() != 'destroy_requested': if software_installation.getSlapState() != 'destroy_requested':
raise NotFound raise NotFound
if self.getPortalObject().portal_workflow.isTransitionPossible(software_installation, if self.getPortalObject().portal_workflow.isTransitionPossible(software_installation,
...@@ -1117,7 +1117,7 @@ class SlapTool(BaseTool): ...@@ -1117,7 +1117,7 @@ class SlapTool(BaseTool):
Log the compute_node status Log the compute_node status
""" """
compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id) compute_node = self.getPortalObject().portal_catalog.getComputeNodeObject(compute_node_id)
software_installation = compute_node._getSoftwareInstallationFromUrl(url) software_installation = compute_node.getSoftwareInstallationFromUrl(url)
software_installation.setErrorStatus('while installing %s' % url) software_installation.setErrorStatus('while installing %s' % url)
InitializeClass(SlapTool) InitializeClass(SlapTool)
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