Commit f08452e2 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: XXX forbid creation of Software Instance

Use must validate the Open Sale Order first
parent b87a51a2
...@@ -82,6 +82,9 @@ elif (root_state == "destroyed"): ...@@ -82,6 +82,9 @@ elif (root_state == "destroyed"):
else: else:
raise ValueError, "state should be started, stopped or destroyed" raise ValueError, "state should be started, stopped or destroyed"
# XXX forbid creation of the Software Instance
# the Software Instance parameters must match the Open Sale Order pricing criteria
"""
request_instance_tree.requestInstance( request_instance_tree.requestInstance(
software_release=software_release_url_string, software_release=software_release_url_string,
software_title=software_title, software_title=software_title,
...@@ -91,6 +94,7 @@ request_instance_tree.requestInstance( ...@@ -91,6 +94,7 @@ request_instance_tree.requestInstance(
shared=is_slave, shared=is_slave,
state=root_state, state=root_state,
) )
"""
# Change the state at the end to allow to execute updateLocalRoles only once in the transaction # Change the state at the end to allow to execute updateLocalRoles only once in the transaction
validation_state = request_instance_tree.getValidationState() validation_state = request_instance_tree.getValidationState()
......
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