How to use the podman.libs.fold_keys function in podman

To help you get started, we’ve selected a few podman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github containers / python-podman / podman / libs / images.py View on Github external
def inspect(self):
        """Retrieve details about image."""
        with self._client() as podman:
            results = podman.InspectImage(self._id)
        obj = json.loads(results["image"], object_hook=fold_keys())
        return collections.namedtuple("ImageInspect", obj.keys())(**obj)
github containers / python-podman / podman / libs / containers.py View on Github external
def inspect(self):
        """Retrieve details about containers."""
        with self._client() as podman:
            results = podman.InspectContainer(self._id)
        obj = json.loads(results['container'], object_hook=fold_keys())
        return collections.namedtuple('ContainerInspect', obj.keys())(**obj)
github containers / python-podman / podman / libs / pods.py View on Github external
def inspect(self):
        """Retrieve details about pod."""
        with self._client() as podman:
            results = podman.InspectPod(self._ident)
        obj = json.loads(results['pod'], object_hook=fold_keys())
        obj['id'] = obj['config']['id']
        return collections.namedtuple('PodInspect', obj.keys())(**obj)