]> git.proxmox.com Git - mirror_lxc.git/commitdiff
python: Fix api_test to use the new attach() API
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 30 Aug 2013 21:27:14 +0000 (17:27 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 3 Sep 2013 13:35:39 +0000 (09:35 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/python-lxc/examples/api_test.py

index 45a115071eeefac2e77fd00fe7255e460841aea2..50140a35ca96065605a486c1ceb2bc513d911c25 100644 (file)
@@ -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)