Commit b75a487b authored by Romain Courteaud's avatar Romain Courteaud

slapos_slap_tool: project reference is required for compute node

parent 0827d289
...@@ -483,20 +483,20 @@ class SlapTool(BaseTool): ...@@ -483,20 +483,20 @@ class SlapTool(BaseTool):
return self._supplySupply(url, computer_id, state) return self._supplySupply(url, computer_id, state)
@convertToREST @convertToREST
def _requestComputeNode(self, compute_node_title): def _requestComputeNode(self, compute_node_title, project_reference):
portal = self.getPortalObject() portal = self.getPortalObject()
person = portal.portal_membership.getAuthenticatedMember().getUserValue() person = portal.portal_membership.getAuthenticatedMember().getUserValue()
person.requestComputeNode(compute_node_title=compute_node_title) person.requestComputeNode(compute_node_title=compute_node_title, project_reference=project_reference)
compute_node = ComputeNode(self.REQUEST.get('compute_node_reference').decode("UTF-8")) compute_node = ComputeNode(self.REQUEST.get('compute_node_reference').decode("UTF-8"))
return dumps(compute_node) return dumps(compute_node)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'requestComputer') 'requestComputer')
def requestComputer(self, computer_title): def requestComputer(self, computer_title, project_reference):
""" """
Request Compute Node Request Compute Node
""" """
return self._requestComputeNode(computer_title) return self._requestComputeNode(computer_title, project_reference)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'buildingSoftwareRelease') 'buildingSoftwareRelease')
......
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