Commit 6425d6ff authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Test ComputeNode_getTicketRelatedList

parent 43d57bc8
...@@ -8,14 +8,15 @@ uid_list = [context.getUid()] ...@@ -8,14 +8,15 @@ uid_list = [context.getUid()]
computer_partition_uid_list = [ computer_partition_uid_list = [
cp.getUid() for cp in context.contentValues(portal_type="Compute Partition") if cp.getSlapState() == 'busy'] cp.getUid() for cp in context.contentValues(portal_type="Compute Partition") if cp.getSlapState() == 'busy']
for instance in portal.portal_catalog( if computer_partition_uid_list:
for instance in portal.portal_catalog(
portal_type="Software Instance", portal_type="Software Instance",
select_dict={'specialise_uid': None}, select_dict={'specialise_uid': None},
specialise_portal_type="Instance Tree", specialise_portal_type="Instance Tree",
default_aggregate_uid=computer_partition_uid_list): default_aggregate_uid=computer_partition_uid_list):
if instance.specialise_uid not in uid_list: if instance.specialise_uid not in uid_list:
uid_list.append(instance.specialise_uid) uid_list.append(instance.specialise_uid)
kw['default_or_child_aggregate_uid'] = uid_list kw['default_or_child_aggregate_uid'] = uid_list
return context.Base_getOpenRelatedTicketList(**kw) return context.Base_getOpenRelatedTicketList(**kw)
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