ContainersPolicy - file /etc/containers/policy.json
¶
-
class
insights.parsers.containers_policy.
ContainersPolicy
(context)[source]¶ Bases:
insights.core.JSONParser
Class for converting file
/etc/containers/policy.json
into a dictionary that matches the JSON string in the file.Sample file content:
{ "default": [ { "type": "insecureAcceptAnything" } ], "transports": { "docker": { "registry.access.redhat.com": [ { "type": "signedBy", "keyType": "GPGKeys", "keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" } ], "registry.redhat.io/redhat/redhat-operator-index": [ { "type": "insecureAcceptAnything" } ], "registry.redhat.io": [ { "type": "signedBy", "keyType": "GPGKeys", "keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release" } ] }, "docker-daemon": { "": [ { "type": "insecureAcceptAnything" } ] } } }
Examples
>>> len(containers_policy["default"]) 1