Commit c04584a2 authored by Rafael Monnerat's avatar Rafael Monnerat

fix "Feature computer remove unused software"

See merge request nexedi/slapos.core!293
parents 3d7dfe5b ec7e449c
......@@ -19,6 +19,9 @@ if computer is None:
return
if computer.Computer_getSoftwareReleaseUsage(url_string) != 0:
return
if computer.getAllocationScope() not in ['open/public', 'open/subscription', 'close/forever']:
# handle only some specific computers: public ones and removed
return
software_installation.requestDestroy(
comment='Destroyed by %s as %s is archived.' % (script.id, software_release.getRelativeUrl(),))
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