<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/07/2015 10:00 PM, jiahu wrote:<br>
</div>
<blockquote
cite="mid:1420639241-16478-1-git-send-email-jiahu@laptoptest.redhat.com"
type="cite">
<pre wrap="">The interface list should be:
['em1', 'lo', 'virbr0', 'wlp3s0']
rather than below:
['em1:', 'lo:', 'virbr0:', 'wlp3s0:']
---
repos/interface/iface_list.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/repos/interface/iface_list.py b/repos/interface/iface_list.py
index 49f0c05..7041535 100644
--- a/repos/interface/iface_list.py
+++ b/repos/interface/iface_list.py
@@ -10,7 +10,8 @@ optional_params = {}
VIRSH_QUIET_IFACE_LIST = "virsh --quiet iface-list %s | awk '{print ""$%s""}'"
NETWORK_CONFIG = "/etc/sysconfig/network-scripts/"
-IFCONFIG_DRIVER = "ifconfig %s | sed 's/[ \t].*//;/^$/d'"
+IFCONFIG_DRIVER = "ifconfig %s | sed 's/[ \t].*//;/^$/d'\
+|awk -F\":\" '{print $1}'"
GET_MAC = "ip link show %s |sed -n '2p'| awk '{print $2}'"
VIRSH_IFACE_LIST = "virsh iface-list %s"
</pre>
</blockquote>
Actually, the iface_list is a invalid case in libvirt-test-API . The
original author of it didn't call any python api , but verify the
result of "virsh iface-list".<br>
We need to rewrite it to verify python api - listAllInterface
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</body>
</html>