[libvirt-test-API][PATCH 1/2] Give a default value on br variable in mac_to_ip

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

 



Set 'virbr0' as defult value
---
 utils/utils.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/utils/utils.py b/utils/utils.py
index f841c27..c3e46f6 100644
--- a/utils/utils.py
+++ b/utils/utils.py
@@ -349,17 +349,14 @@ def locate_utils():
     result = re.search('(.*)libvirt-test-API(.*)', pwd)
     return result.group(0) + "/utils"
 
-def mac_to_ip(mac,br,timeout):
-    """Map mac address to ip
+def mac_to_ip(mac, timeout, br = 'virbr0'):
+    """Map mac address to ip under a specified brige
 
        Return None on FAILURE and the mac address on SUCCESS
     """
     if not mac:
         return None
 
-    if not br:
-        return None
-
     if timeout < 10:
         timeout = 10
 
-- 
1.8.3.1

--
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]