Description of problem: Satellite should allow for deletion of SCAP results. In deployments where are thousands of SCAP scans performed the web interface experiences slowdown. Version-Release number of selected component (if applicable): RHN Satellite 5.5+
This has been implemented in upstream project. spacewalk.git 1fae462932207..6b4ccd7994780 spacewalk.git 7d06206839128..dd1d0122387a7 spacewalk.git 0f60532652c4e
Scope of the work done and the test plan: General Info ------------ We do not allow deletion of SCAP results by default. The deletion has to be explicitly allowed for each organization in the Organization Configuration dialog (or using org.setPolicyForScapResultDeletion() API). User can specify retention period (in days) for each organization, default is 90 days (arbitrary choice). Only those SCAP Scans can be deleted which have passed their retention period. Changes to WebUI ---------------- The choice of retention period has been added to Organization Configuration dialog (admin/multiorg/OrgConfigDetails.do). If the given scan can be deleted, the 'delete scan' link appears at the Scan's details page toolbar (systems/details/audit/XccdfDetails.do). This link redirects to deletion confirmation page (systems/details/audit/XccdfDeleteConfirm.do). At the page which lists all the scans for the given single system (systems/details/audit/ListScap.do), there are select boxes added. User is able to select any scans and hit <Remove Selected Scans> button. The button again redirects to a confirmation page. If the scan is deleted, any assigned files (detailed results) are deleted as well. Added Frontend API ------------------ system.scap.deleteXccdfScan() org.getPolicyForScapResultDeletion() org.setPolicyForScapResultDeletion() + added 'deletable' property to system.scap.getXccdfScanDetails() result dict.
VERIFIED. At least for now ;-) Verified webui funcionality together with API funcionality. Missing API calls are in place. (comment #8) spacewalk-schema-2.0.2-13.el5sat spacewalk-java-2.0.2-46.el5sat satellite-branding-5.6.0.22-1.el5sat
BUT, I don't like the feeling it ignores me somehow, see: API: >>> client.org.setPolicyForScapResultDeletion(key, 1, {'retention_period': 15, 'enabled': False}) 1 >>> client.org.getPolicyForScapResultDeletion(key,1) {'retention_period': 0, 'enabled': False} 'retention_period': 0 !!! Oh, no, it simply discarded retention period when switching to false WEBUI: same behavior - unchecking Allow Deletion of SCAP Results: [_] will discard value of Allow Deletion After (period in days) and set it to 90 days. Possibly new BZ...
Possibly? No, definitely ;-) On behalf of comment #17 filed new bz #1016675