Commit d3e2bd6c authored by Romain Courteaud's avatar Romain Courteaud

slapos_slap_tool: project reference is required for compute node

parent 7224f978
......@@ -439,20 +439,20 @@ class SlapTool(BaseTool):
return self._supplySupply(url, computer_id, state)
@convertToREST
def _requestComputeNode(self, compute_node_title):
def _requestComputeNode(self, compute_node_title, project_reference):
portal = self.getPortalObject()
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"))
return dumps(compute_node)
security.declareProtected(Permissions.AccessContentsInformation,
'requestComputer')
def requestComputer(self, computer_title):
def requestComputer(self, computer_title, project_reference):
"""
Request Compute Node
"""
return self._requestComputeNode(computer_title)
return self._requestComputeNode(computer_title, project_reference)
security.declareProtected(Permissions.AccessContentsInformation,
'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