Commit ef0bbae2 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: drop template_software_instance

parent 8b8f240d
......@@ -137,12 +137,6 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self.portal.portal_activities.unsubscribe()
self.new_id = self.generateNewId()
instance_template = self.portal.software_instance_module.template_software_instance
if len(instance_template.objectValues()):
instance_template.manage_delObjects(
ids=[i.getId() for i in instance_template.objectValues()])
def beforeDumpExpectedConfiguration(self):
"""Overwrite this function on project context to tweak production focus tests"""
pass
......@@ -279,7 +273,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
person_user.requestSoftwareInstance(**request_kw)
return person_user.REQUEST.get('request_instance_tree')
def _makeTree(self, project, requested_template_id='template_software_instance'):
def _makeTree(self, project):
new_id = self.generateNewId()
self.request_kw = dict(
......@@ -299,7 +293,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self.instance_tree = self.portal.instance_tree_module\
.newContent(portal_type="Instance Tree")
self.software_instance = self.portal.software_instance_module\
[requested_template_id].Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
self.instance_tree.edit(
title=self.request_kw['software_title'],
......@@ -317,7 +311,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self.portal.portal_workflow._jumpToStateFor(self.instance_tree, 'start_requested')
self.requested_software_instance = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
self.software_instance.edit(
title=self.request_kw['software_title'],
reference="TESTSI-%s" % new_id,
......
......@@ -385,7 +385,7 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
portal_type='Compute Partition'))
software_instance2 = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
software_instance2.edit(
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
......@@ -478,7 +478,7 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
)
software_instance2 = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
software_instance2.edit(
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
......@@ -499,7 +499,7 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
)
software_instance3 = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
software_instance3.edit(
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
......@@ -605,7 +605,7 @@ class TestSlapOSAllocation(SlapOSTestCaseMixin):
portal_type='Compute Partition'))
software_instance2 = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
software_instance2.edit(
title=self.generateNewSoftwareTitle(),
reference="TESTSI-%s" % self.generateNewId(),
......
......@@ -50,7 +50,7 @@ class TestSlapOSComputePartitionConstraint(TestSlapOSConstraintMixin):
partition = compute_node.newContent(portal_type='Compute Partition')
self.portal.portal_workflow._jumpToStateFor(partition, 'free')
software_instance = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
slave_instance = self.portal.software_instance_module.newContent(
portal_type='Slave Instance')
......@@ -89,10 +89,10 @@ class TestSlapOSComputePartitionConstraint(TestSlapOSConstraintMixin):
partition = compute_node.newContent(portal_type='Compute Partition')
self.portal.portal_workflow._jumpToStateFor(partition, 'busy')
software_instance = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
software_instance.edit(aggregate=partition.getRelativeUrl())
software_instance_2 = self.portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
slave_instance = self.portal.software_instance_module.newContent(
portal_type='Slave Instance')
slave_instance_2 = self.portal.software_instance_module.newContent(
......
......@@ -46,7 +46,7 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin):
instance_tree = portal.instance_tree_module\
.newContent(portal_type="Instance Tree")
self.software_instance = portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
instance_tree.edit(
title=self.request_kw['software_title'],
......@@ -889,7 +889,7 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
self.instance_tree = portal.instance_tree_module\
.newContent(portal_type="Instance Tree")
self.software_instance = portal.software_instance_module\
.template_software_instance.Base_createCloneDocument(batch_mode=1)
.newContent(portal_type="Software Instance")
self.instance_tree.edit(
title=self.request_kw['software_title'],
......
......@@ -20,5 +20,4 @@ portal_caches/compute_node_information_cache_factory
portal_caches/compute_node_information_cache_factory/persistent_cache_plugin
portal_caches/last_stored_data_cache_factory
portal_caches/last_stored_data_cache_factory/volatile_cache_plugin
product_module/compute_node
software_instance_module/template_software_instance
\ No newline at end of file
product_module/compute_node
\ No newline at end of file
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