diff options
| author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2021-03-05 11:22:47 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-05 11:22:47 +0000 |
| commit | ee56932473df1da8fb58260711ad27cc618d108d (patch) | |
| tree | e2da059cb44f560c3d284f91318c172012553ba3 /tests/topotests/lib/common_config.py | |
| parent | ddbc1b4dd9775ea23759a684bb582ce8409abb8b (diff) | |
| parent | 23f3a92e348207a22c58669971bb135f75aecaf7 (diff) | |
Merge pull request #8165 from wesleycoakley/misc-qol-fixups
staticd, pimd, tests: small fixups and cov fix
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 |
