Commit b6e6fdc4 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: _makeComplexComputeNode need a project

parent da72a8ef
......@@ -362,7 +362,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self.tic()
return self.computer_network
def _makeComplexComputeNode(self, person=None, with_slave=False):
def _makeComplexComputeNode(self, project, person=None, with_slave=False):
for i in range(1, 5):
id_ = 'partition%s' % i
p = self.compute_node.newContent(portal_type='Compute Partition',
......@@ -380,7 +380,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string=self.generateNewSoftwareReleaseUrl(),
aggregate=self.compute_node.getRelativeUrl(),
reference='TESTSOFTINST-%s' % self.generateNewId(),
title='Start requested for %s' % self.compute_node.getTitle()
title='Start requested for %s' % self.compute_node.getTitle(),
follow_up_value=project
)
self.start_requested_software_installation.validate()
self.start_requested_software_installation.requestStart()
......@@ -391,7 +392,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string=self.generateNewSoftwareReleaseUrl(),
aggregate=self.compute_node.getRelativeUrl(),
reference='TESTSOFTINST-%s' % self.generateNewId(),
title='Destroy requested for %s' % self.compute_node.getTitle()
title='Destroy requested for %s' % self.compute_node.getTitle(),
follow_up_value=project
)
self.destroy_requested_software_installation.validate()
self.destroy_requested_software_installation.requestStart()
......@@ -403,7 +405,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
url_string=self.generateNewSoftwareReleaseUrl(),
aggregate=self.compute_node.getRelativeUrl(),
reference='TESTSOFTINST-%s' % self.generateNewId(),
title='Destroyed for %s' % self.compute_node.getTitle()
title='Destroyed for %s' % self.compute_node.getTitle(),
follow_up_value=project
)
self.destroyed_software_installation.validate()
self.destroyed_software_installation.requestStart()
......@@ -422,6 +425,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
destination_section_value=person,
follow_up_value=project
)
kw = dict(
software_release=\
......@@ -431,7 +435,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml=self.generateSafeXml(),
shared=False,
software_title=instance_tree.getTitle(),
state='started'
state='started',
project_reference=project.getReference()
)
instance_tree.requestStart(**kw)
instance_tree.requestInstance(**kw)
......@@ -447,6 +452,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
destination_section_value=person,
follow_up_value=project
)
slave_kw = dict(
software_release=kw['software_release'],
......@@ -455,7 +461,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml=self.generateSafeXml(),
shared=True,
software_title=instance_tree.getTitle(),
state='started'
state='started',
project_reference=project.getReference()
)
instance_tree.requestStart(**slave_kw)
instance_tree.requestInstance(**slave_kw)
......@@ -470,6 +477,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
destination_section_value=person,
follow_up_value=project
)
kw = dict(
software_release=\
......@@ -479,7 +487,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml=self.generateSafeXml(),
shared=False,
software_title=instance_tree.getTitle(),
state='stopped'
state='stopped',
project_reference=project.getReference()
)
instance_tree.requestStop(**kw)
instance_tree.requestInstance(**kw)
......@@ -495,6 +504,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
instance_tree.edit(
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
follow_up_value=project
)
kw = dict(
software_release=\
......@@ -504,7 +514,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml=self.generateSafeXml(),
shared=False,
software_title=instance_tree.getTitle(),
state='stopped'
state='stopped',
project_reference=project.getReference()
)
instance_tree.requestStop(**kw)
instance_tree.requestInstance(**kw)
......@@ -524,6 +535,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
instance_tree.edit(
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
follow_up_value=project
)
kw = dict(
software_release=\
......@@ -533,7 +545,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
sla_xml=self.generateSafeXml(),
shared=False,
software_title=instance_tree.getTitle(),
state='stopped'
state='stopped',
project_reference=project.getReference()
)
instance_tree.requestStop(**kw)
instance_tree.requestInstance(**kw)
......
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