From 2cb881fa58a6a8fe6c89ec2885f01ebb3d74d871 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Fri, 25 May 2018 15:18:43 -0700 Subject: Implement container attach Signed-off-by: Jhon Honce --- contrib/python/podman/libs/containers.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'contrib/python/podman/libs/containers.py') diff --git a/contrib/python/podman/libs/containers.py b/contrib/python/podman/libs/containers.py index 96ec6be37..a350a128a 100644 --- a/contrib/python/podman/libs/containers.py +++ b/contrib/python/podman/libs/containers.py @@ -6,8 +6,10 @@ import json import signal import time +from ._containers_attach import Mixin as AttachMixin -class Container(collections.UserDict): + +class Container(collections.UserDict, AttachMixin): """Model for a container.""" def __init__(self, client, id, data): @@ -46,12 +48,6 @@ class Container(collections.UserDict): with self._client() as podman: return self._refresh(podman) - def attach(self, detach_key=None, no_stdin=False, sig_proxy=True): - """Attach to running container.""" - with self._client() as podman: - # TODO: streaming and port magic occur, need arguments - podman.AttachToContainer() - def processes(self): """Show processes running in container.""" with self._client() as podman: -- cgit v1.2.3-54-g00ecf