aboutsummaryrefslogtreecommitdiff
path: root/contrib/python/podman/libs/containers.py
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2018-05-25 15:18:43 -0700
committerJhon Honce <jhonce@redhat.com>2018-05-31 20:13:35 -0700
commit2cb881fa58a6a8fe6c89ec2885f01ebb3d74d871 (patch)
tree4cca7b43b7e7e7ab1bff0687d846f2cc6e6540c7 /contrib/python/podman/libs/containers.py
parenta9e9fd4f5b56f0dd91944b86feba9a2d3814d93e (diff)
downloadpodman-2cb881fa58a6a8fe6c89ec2885f01ebb3d74d871.tar.gz
podman-2cb881fa58a6a8fe6c89ec2885f01ebb3d74d871.tar.bz2
podman-2cb881fa58a6a8fe6c89ec2885f01ebb3d74d871.zip
Implement container attach
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'contrib/python/podman/libs/containers.py')
-rw-r--r--contrib/python/podman/libs/containers.py10
1 files changed, 3 insertions, 7 deletions
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: