Commit 60ea2776 authored by Romain Courteaud's avatar Romain Courteaud

slapos_pdm: non validated allocation supply do not impact the software installation deletion

parent fac83d69
Pipeline #38110 passed with stage
in 0 seconds
...@@ -43,9 +43,8 @@ for allocation_cell in portal.portal_catalog( ...@@ -43,9 +43,8 @@ for allocation_cell in portal.portal_catalog(
resource__uid=software_product.getUid(), resource__uid=software_product.getUid(),
software_release__uid=software_release.getUid() software_release__uid=software_release.getUid()
): ):
if allocation_cell.isAllocable(): if allocation_cell.isAllocable() and (allocation_cell.getValidationState() == 'validated'):
return return
# XXX check validation state
partition = portal.portal_catalog.getResultValue( partition = portal.portal_catalog.getResultValue(
portal_type='Compute Partition', portal_type='Compute Partition',
......
...@@ -109,5 +109,5 @@ class TestSlapOSDestroySoftwareInstallation(SlapOSTestCaseMixin): ...@@ -109,5 +109,5 @@ class TestSlapOSDestroySoftwareInstallation(SlapOSTestCaseMixin):
self.tic() self.tic()
software_installation.SoftwareInstallation_destroyIfUnused() software_installation.SoftwareInstallation_destroyIfUnused()
self.assertEqual('start_requested', software_installation.getSlapState()) self.assertEqual('destroy_requested', software_installation.getSlapState())
self.assertEqual('validated', software_installation.getValidationState()) self.assertEqual('validated', software_installation.getValidationState())
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