Commit b2e5e04a authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Also search for Remote Node

   Be consistent and also search for a Remote Node, since it can also contain Compute Partitions.
parent edab9781
...@@ -44,7 +44,7 @@ class SlapOSCatalogToolCacheMixin(object): ...@@ -44,7 +44,7 @@ class SlapOSCatalogToolCacheMixin(object):
# No need to get all results if an error is raised when at least 2 objects # No need to get all results if an error is raised when at least 2 objects
# are found # are found
compute_node_list = self.unrestrictedSearchResults(limit=2, compute_node_list = self.unrestrictedSearchResults(limit=2,
portal_type='Compute Node', portal_type=['Compute Node', 'Remote Node'],
validation_state="validated", validation_state="validated",
reference=reference) reference=reference)
if len(compute_node_list) != 1: if len(compute_node_list) != 1:
...@@ -73,7 +73,7 @@ class SlapOSCatalogToolCacheMixin(object): ...@@ -73,7 +73,7 @@ class SlapOSCatalogToolCacheMixin(object):
@UnrestrictedMethod @UnrestrictedMethod
def _getNonCachedComputeNodeUid(self, reference): def _getNonCachedComputeNodeUid(self, reference):
return self.unrestrictedSearchResults( return self.unrestrictedSearchResults(
portal_type='Compute Node', reference=reference, portal_type=['Compute Node', 'Remote Node'], reference=reference,
validation_state="validated")[0].UID validation_state="validated")[0].UID
def getComputePartitionObject(self, compute_node_reference, def getComputePartitionObject(self, compute_node_reference,
......
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