commit | dcddd6e4f204a6df6a17b7768edb3d51a639b197 | [log] [tgz] |
---|---|---|
author | Felipe Monteiro <felipe.monteiro@att.com> | Fri Mar 24 19:43:33 2017 +0000 |
committer | Felipe Monteiro <felipe.monteiro@att.com> | Fri Mar 24 19:48:19 2017 +0000 |
tree | d3de81b38efdb411844bb8289cb5fec9b7968e0f | |
parent | e28d4ddb53d7df6cea5a488f1aa7f5ff18cbbefa [diff] |
Network tests should take advantage of net_utils to find unused ip. Currently, test_create_router_external_fixed_ips fails [0] for the same reason described in this patch [1]. Basically, calling random.choice to select an ip address from an allocation pool can potentially select an already-used ip address, resulting in an error. The best way to resolve such issues is to use the built-in Tempest helper function `get_unused_ip_addresses` defined here [2]. This patch makes the necessary changes to the code in [1] and to test_routers_rbac as well. [0] http://logs.openstack.org/03/448603/7/check/gate-tempest-dsvm-patrole-admin-fast-ubuntu-xenial-nv/2bb077f/console.html [1] https://review.openstack.org/#/c/448250/ [2] https://github.com/openstack/tempest/blob/master/tempest/common/utils/net_utils.py Change-Id: I9bbb7cd77cde9287e398f506de58ff23e9e95496 Closes-Bug: #1675342