Re: [libvirt-test-API][PATCH] Remove redundant colon in inteface list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/01/15 11:14, hongming wrote:
On 01/07/2015 10:00 PM, jiahu wrote:
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"
 
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".
We need to rewrite it to verify python api - listAllInterface
Yes, thanks for your reviewing.
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]