Commit a1dd7144 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: project on compute node

parent bf0656b1
......@@ -329,15 +329,16 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
def _makeSlaveTree(self, project, requested_template_id='template_slave_instance'):
return self._makeTree(project, requested_template_id=requested_template_id)
def _makeComputeNode(self, owner=None, allocation_scope='open'):
def _makeComputeNode(self, project, allocation_scope='open'):
self.compute_node = self.portal.compute_node_module.template_compute_node\
.Base_createCloneDocument(batch_mode=1)
reference = 'TESTCOMP-%s' % self.generateNewId()
self.compute_node.edit(
allocation_scope=allocation_scope,
reference=reference,
title=reference
)
allocation_scope=allocation_scope,
reference=reference,
title=reference,
follow_up_value=project
)
# The edit above will update capacity scope due the interaction workflow
# The line above force capacity scope to be open, keeping the previous
# behaviour.
......@@ -352,11 +353,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self.partition.validate()
self.tic()
if owner is not None:
self.compute_node.edit(
source_administration_value=owner,
)
return self.compute_node, self.partition
def _makeComputerNetwork(self):
......
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