5.9. 删除 OpenSCAP 报告
在 Satellite 服务器中,您可以删除一个或多个 OpenSCAP 报告。但是,当您删除报告时,您必须一次删除一个页面。如果要删除所有 Openscap 报告,请使用如下 bash 脚本。
删除 OpenSCAP 报告
要删除 OpenSCAP 报告,请完成以下步骤:
列出所有 OpenSCAP 报告。请注意您要删除的报告的 ID。
请求示例:
curl --insecure --user username:_password_ \ https://satellite.example.com/api/v2/compliance/arf_reports/ | python -m json.tool
curl --insecure --user username:_password_ \ https://satellite.example.com/api/v2/compliance/arf_reports/ | python -m json.tool
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 响应示例:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用上一步中的 ID,删除 OpenSCAP 报告。对您要删除的每个 ID 重复此操作。
请求示例:
curl --insecure --user username:_password_ \ --header "Content-Type: application/json" \ --request DELETE https://satellite.example.com/api/v2/compliance/arf_reports/405
# curl --insecure --user username:_password_ \ --header "Content-Type: application/json" \ --request DELETE https://satellite.example.com/api/v2/compliance/arf_reports/405
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 响应示例:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
删除所有 OpenSCAP 报告的 BASH 脚本示例
使用以下 bash 脚本删除所有 OpenSCAP 报告: