5.9. OpenSCAP レポートの削除
Satellite Server で、1 つまたは複数の OpenSCAP レポートを削除できます。ただし、レポートは、一度に 1 ページずつしか削除できません。すべての Openscap レポートを削除する場合には、以下のバッシュスクリプトを使用してください。
以下の要求例とスクリプト例では、python3
を使用して Satellite Server からの応答をフォーマットしています。RHEL 7 およびそれ以前の一部のシステムでは、python3
の代わりに python
を使用する必要があります。
OpenSCAP レポートの削除
OpenSCAP レポートを削除するには、次の手順を実行します。
全 OpenSCAP レポートを表示します。削除するレポートの ID をメモしてください。
要求例:
curl --insecure --user username:_password_ \ https://satellite.example.com/api/v2/compliance/arf_reports/ | python3 -m json.tool
curl --insecure --user username:_password_ \ https://satellite.example.com/api/v2/compliance/arf_reports/ | python3 -m json.tool
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 応答例:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 1 つ前の手順で取得した 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 レポートを削除します。