Commit 17bb254a authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: allow to force software change

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