Commit bde61418 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

SoftwareInstance: Add Get Compute Partition Uid.

Used by software instances as Compute Partition deosn't have access to Compute Node Module.
parent 57e41beb
......@@ -367,3 +367,14 @@ class SoftwareInstance(Item, JSONType):
security.declareProtected(Permissions.ModifyPortalContent, 'fromJSONText')
def fromJSONText(self, json_content):
return self.setJsonContent(json_content)
def getComputePartitionUid(self):
"""
Get Compute Partition Uid.
Used by software instances as Compute Partition deosn't have access to Compute Node Module.
"""
return self._getComputePartitionUid()
@UnrestrictedMethod
def _getComputePartitionUid(self):
return self.getAggregateUid()
......@@ -58,7 +58,7 @@ elif portal_type == "Shared Instance":
error_message="No matching instances with the provided reference has been found",
error_code=404
)
search_kw["strict_aggregate_uid"] = host_instance_list[0].getObject().getAggregateUid()
search_kw["strict_aggregate_uid"] = host_instance_list[0].getObject().getComputePartitionUid()
if "root_instance_title" in data_dict:
search_kw["strict_specialise_title"] = data_dict["root_instance_title"]
if "state" in data_dict:
......
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