Commit 2d343353 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud:

* XXX do not approve computer by default
  TODO: create open order related to the computer usage
* drop useless requestComputeNodeRegistration workflow transition
  This transition does nothing.
parent d4f6d4af
......@@ -91,7 +91,6 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin):
compute_node = self.portal.compute_node_module.newContent(portal_type='Compute Node',
title="Compute Node %s for %s" % (self.new_id, self.person_user.getReference()),
reference="TESTCOMP-%s" % self.new_id)
compute_node.requestComputeNodeRegistration()
compute_node.approveComputeNodeRegistration()
self.assertEqual('open/personal', compute_node.getAllocationScope())
self.assertEqual(self.person_user.getRelativeUrl(),
......
......@@ -19,7 +19,6 @@
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_approve_compute_node_registration</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_generate_certificate</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_report_compute_node_bang</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_request_compute_node_registration</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_request_software_release</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_request_transfer</string>
<string>destination/portal_workflow/compute_node_slap_interface_workflow/transition_revoke_certificate</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Workflow Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action_name</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/workflow</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>guard_permission</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>transition_request_compute_node_registration</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Workflow Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Request Registration</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -25,9 +25,7 @@ if len(compute_node_list) == 2:
elif len(compute_node_list) == 1:
compute_node = compute_node_list[0]
else:
compute_node = None
if compute_node is None:
reference = "COMP-%s" % portal.portal_ids.generateNewId(
id_group='slap_computer_reference',
id_generator='uid')
......@@ -38,9 +36,6 @@ if compute_node is None:
reference=reference,
activate_kw={'tag': tag}
)
compute_node.requestComputeNodeRegistration()
compute_node.approveComputeNodeRegistration()
compute_node = context.restrictedTraverse(compute_node.getRelativeUrl())
......
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