From: Stéphane Graber Date: Fri, 30 Aug 2013 21:27:14 +0000 (-0400) Subject: python: Fix api_test to use the new attach() API X-Git-Tag: lxc-1.0.0.alpha1~1^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca9548ad02238600899a1f86ded308279964e018;p=thirdparty%2Flxc.git python: Fix api_test to use the new attach() API Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- 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)