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