Commit 6d371f48 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Adjust assertion to only check errors from started instances

parent 9cdac07c
......@@ -7,16 +7,14 @@ software_instance_list = portal.portal_catalog(
# Check if at least one software Instance is Allocated
for instance in software_instance_list:
if instance.getSlapState() != "start_requested":
# There is something wrong.
return False
# All partitions should be allocated
computer_partition = instance.getAggregateValue()
if computer_partition is None:
return False
if instance.getPortalType() == "Software Instance" and \
if instance.getPortalType() == "Software Instance":
if instance.getSlapState() == "start_requested" and \
instance.SoftwareInstance_hasReportedError():
return False
return False
return True
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