From ca9548ad02238600899a1f86ded308279964e018 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Fri, 30 Aug 2013 17:27:14 -0400 Subject: [PATCH] python: Fix api_test to use the new attach() API MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- src/python-lxc/examples/api_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python-lxc/examples/api_test.py b/src/python-lxc/examples/api_test.py index 45a115071..50140a35c 100644 --- a/src/python-lxc/examples/api_test.py +++ b/src/python-lxc/examples/api_test.py @@ -98,7 +98,8 @@ while not ips or count == 10: ips = container.get_ips() time.sleep(1) count += 1 -container.attach("NETWORK|UTSNAME", "/sbin/ifconfig", "eth0") +container.attach_wait(lxc.attach_run_command, ["ifconfig", "eth0"], + namespaces=(lxc.CLONE_NEWNET + lxc.CLONE_NEWUTS)) # A few basic checks of the current state assert(len(ips) > 0) -- 2.47.2