Commit 4ad0afb4 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: allow to force software change

parent b94ee55a
......@@ -58,9 +58,10 @@ elif len(request_instance_tree_list) == 1:
# Do not allow user to change the release/type/shared status
# This is not compatible with invoicing the service
# Instance release change will be handled by allocation supply and upgrade decision
if (request_instance_tree.getUrlString() != software_release_url_string) or \
(request_instance_tree.getSourceReference() != software_type) or \
(request_instance_tree.getRootSlave() != is_slave):
if ((request_instance_tree.getUrlString() != software_release_url_string) or \
(request_instance_tree.getSourceReference() != software_type) or \
(request_instance_tree.getRootSlave() != is_slave)) and \
(not kwargs.get("force_software_change", False)):
raise NotImplementedError, "You can not change the release / type / shared states"
else:
if (root_state == "destroyed"):
......
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