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