Skip to content

Commit

Permalink
Workaround for different floating_ip_pool results
Browse files Browse the repository at this point in the history
In one cases result of clients.nova().floating_ip_pools.list()
is list of strings, in other cases it is list of dicts.

Related-Bug: #1355855

Change-Id: I39867702d13aaa9014440ce8d074852af9779547
  • Loading branch information
Sergey Skripnick committed Aug 12, 2014
1 parent 24218d9 commit c8d1fcb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rally/benchmark/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ def external_network_exists_validator(config, clients, task):

networks = [net.name for net in
clients.nova().floating_ip_pools.list()]

if isinstance(networks[0], dict):
networks = [n["name"] for n in networks]

if ext_network not in networks:
message = _("External (floating) network with name %(network)s "
"not found. "
Expand Down

0 comments on commit c8d1fcb

Please sign in to comment.