Commit acff4533 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Split edit in 2

  This is required due interacton workflow call on _setAlloctionScope.

  We could change the capacity_scope to close (so allocation worklfow order dont matter, but
  it would change the expected behaviour if we drop the interaction workflow, so it is more
  reasonable keep the existing behaviour unchanged.
parent ccbf6e16
......@@ -2,10 +2,16 @@ compute_node = state_change['object']
portal = compute_node.getPortalObject()
person = portal.portal_membership.getAuthenticatedMember().getUserValue()
compute_node.edit(
allocation_scope='open/personal',
capacity_scope='open',
source_administration_value=person,
upgrade_scope='auto',
capacity_scope='open'
)
# Keep this extra call separated to be compabible
# with interaction workflow whenever this is
# updated.
compute_node.edit(
allocation_scope='open/personal',
)
portal.portal_workflow.doActionFor(compute_node, 'validate_action')
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