Commit fda4836e authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: do not require Software Installation for Remote Node

parent 4803c9c1
...@@ -4,6 +4,9 @@ portal = context.getPortalObject() ...@@ -4,6 +4,9 @@ portal = context.getPortalObject()
compute_node = context.getParentValue() compute_node = context.getParentValue()
if slap_state == 'free': if slap_state == 'free':
# XXX Not very elegant
if (compute_node.getPortalType() == 'Remote Node'):
return ['ANY_URL']
return compute_node.ComputeNode_getSoftwareReleaseUrlStringList() return compute_node.ComputeNode_getSoftwareReleaseUrlStringList()
elif slap_state == 'busy': elif slap_state == 'busy':
......
...@@ -15,7 +15,7 @@ if software_instance_portal_type == "Slave Instance": ...@@ -15,7 +15,7 @@ if software_instance_portal_type == "Slave Instance":
query_kw['free_for_request'] = 0 query_kw['free_for_request'] = 0
elif software_instance_portal_type == "Software Instance": elif software_instance_portal_type == "Software Instance":
query_kw['free_for_request'] = 1 query_kw['free_for_request'] = 1
query_kw['software_release_url'] = software_release_url query_kw['software_release_url'] = [software_release_url, "ANY_URL"]
else: else:
raise NotImplementedError("Unknown portal type %s"% raise NotImplementedError("Unknown portal type %s"%
software_instance_portal_type) software_instance_portal_type)
...@@ -176,6 +176,8 @@ if test_mode: ...@@ -176,6 +176,8 @@ if test_mode:
SQL_WINDOW_SIZE = 50 SQL_WINDOW_SIZE = 50
context.log(portal.portal_catalog.countResults(src__=1, **query_kw))
# fetch at mot 50 random Compute Partitions, and check if they are ok # fetch at mot 50 random Compute Partitions, and check if they are ok
isTransitionPossible = portal.portal_workflow.isTransitionPossible isTransitionPossible = portal.portal_workflow.isTransitionPossible
result_count = portal.portal_catalog.countResults(**query_kw)[0][0] result_count = portal.portal_catalog.countResults(**query_kw)[0][0]
......
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