How to use the podman.libs.cached_property 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 / client.py View on Github external
    @cached_property
    def containers(self):
        """Manage containers model for libpod."""
        return Containers(self._client)
github containers / python-podman / podman / client.py View on Github external
    @cached_property
    def pods(self):
        """Manage pods model for libpod."""
        return Pods(self._client)
github containers / python-podman / podman / libs / system.py View on Github external
    @cached_property
    def versions(self):
        """Access versions."""
        with self._client() as podman:
            vers = podman.GetVersion()

        client = '0.0.0'
        try:
            client = pkg_resources.get_distribution('podman').version
        except Exception:  # pylint: disable=broad-except
            pass
        vers['client_version'] = client
        return collections.namedtuple('Version', vers.keys())(**vers)
github containers / python-podman / podman / client.py View on Github external
    @cached_property
    def images(self):
        """Manage images model for libpod."""
        return Images(self._client)
github containers / python-podman / podman / client.py View on Github external
    @cached_property
    def system(self):
        """Manage system model for podman."""
        return System(self._client)