Commit b6da6ee4 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: _makeComplexComputeNode need a project

parent 6051413e
...@@ -370,7 +370,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -370,7 +370,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',
...@@ -388,7 +388,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -388,7 +388,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()
...@@ -399,7 +400,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -399,7 +400,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()
...@@ -411,7 +413,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -411,7 +413,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()
...@@ -430,6 +433,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -430,6 +433,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=\
...@@ -439,7 +443,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -439,7 +443,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)
...@@ -455,6 +460,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -455,6 +460,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'],
...@@ -463,7 +469,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -463,7 +469,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)
...@@ -478,6 +485,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -478,6 +485,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=\
...@@ -487,7 +495,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -487,7 +495,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)
...@@ -503,6 +512,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -503,6 +512,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=\
...@@ -512,7 +522,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -512,7 +522,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)
...@@ -532,6 +543,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -532,6 +543,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=\
...@@ -541,7 +553,8 @@ class SlapOSTestCaseMixin(testSlapOSMixin): ...@@ -541,7 +553,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