Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@cached_property
def containers(self):
"""Manage containers model for libpod."""
return Containers(self._client)
@cached_property
def pods(self):
"""Manage pods model for libpod."""
return Pods(self._client)
@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)
@cached_property
def images(self):
"""Manage images model for libpod."""
return Images(self._client)
@cached_property
def system(self):
"""Manage system model for podman."""
return System(self._client)