diff options
Diffstat (limited to 'tests/topotests/lib/common_config.py')
| -rw-r--r-- | tests/topotests/lib/common_config.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index ce35bdc0fe..fd480aba73 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -336,16 +336,15 @@ def start_router_daemons(tgen, router, daemons): router_list = tgen.routers() # Start daemons - result = router_list[router].startDaemons(daemons) - return result + res = router_list[router].startDaemons(daemons) except Exception as e: errormsg = traceback.format_exc() logger.error(errormsg) - return errormsg + res = errormsg logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name)) - return True + return res def kill_mininet_routers_process(tgen): @@ -1376,12 +1375,14 @@ def generate_ips(network, no_of_ips): return ipaddress_list start_ip = ipaddress.IPv4Address(unicode(start_ip)) step = 2 ** (32 - mask) - if addr_type == "ipv6": + elif addr_type == "ipv6": if start_ip == "0::0" and mask == 0 and no_of_ips == 1: ipaddress_list.append("{}/{}".format(start_ip, mask)) return ipaddress_list start_ip = ipaddress.IPv6Address(unicode(start_ip)) step = 2 ** (128 - mask) + else: + return [] next_ip = start_ip count = 0 |
