[lxc-devel] [PATCH] python: Fix api_test to use the new attach() API

Stéphane Graber stgraber at ubuntu.com
Fri Aug 30 21:27:14 UTC 2013


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 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 45a1150..50140a3 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)
-- 
1.8.3.2





More information about the lxc-devel mailing list