mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[XM-TEST] Move network_utils.py to lib directory
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
1 parent
1975a60f78
commit
21cdf90f7a
4 files changed
+9
-5
No files matched your search
+6
-2
@@ -24,9 +24,13 @@ def get_state(domain_name, number):
|
||||
else:
|
||||
return int(o)
|
||||
|
||||
def network_attach(domain_name, console):
|
||||
def network_attach(domain_name, console, bridge=None):
|
||||
eths_before = count_eth(console)
|
||||
status, output = traceCommand("xm network-attach %s" % domain_name)
|
||||
if bridge:
|
||||
status, output = traceCommand("xm network-attach %s bridge=%s"
|
||||
% (domain_name, bridge))
|
||||
else:
|
||||
status, output = traceCommand("xm network-attach %s" % domain_name)
|
||||
if status != 0:
|
||||
return -1, "xm network-attach returned invalid %i != 0" % status
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import sys
|
||||
|
||||
from XmTestLib import *
|
||||
from network_utils import *
|
||||
from XmTestLib.network_utils import *
|
||||
|
||||
if ENABLE_HVM_SUPPORT:
|
||||
SKIP("Network-attach not supported for HVM domains")
|
||||
|
||||
@@ -8,7 +8,7 @@ import re
|
||||
import time
|
||||
|
||||
from XmTestLib import *
|
||||
from network_utils import *
|
||||
from XmTestLib.network_utils import *
|
||||
|
||||
if ENABLE_HVM_SUPPORT:
|
||||
SKIP("Network-attach not supported for HVM domains")
|
||||
|
||||
@@ -8,7 +8,7 @@ import re
|
||||
import time
|
||||
|
||||
from XmTestLib import *
|
||||
from network_utils import *
|
||||
from XmTestLib.network_utils import *
|
||||
|
||||
if ENABLE_HVM_SUPPORT:
|
||||
SKIP("Network-attach not supported for HVM domains")
|
||||
|
||||