fix Rally task [NovaServers.list_servers] failed with network problems

when we get 'nics' information from rally task config
'contexts', the type of self.config["nics"] is 'tuple', but we need it is 'list'
type.

Change-Id: If293700a5c0a2f30a23b1fcf808adb6e467c76c6
Closes-Bug: #1695245
This commit is contained in:
zhangzhang 2017-06-20 16:03:19 -04:00
parent 008a26f775
commit eee85042c3
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ class ServerGenerator(context.Context):
if self.config.get("nics"):
if isinstance(self.config["nics"][0], dict):
# it is a format that Nova API expects
kwargs["nics"] = self.config["nics"]
kwargs["nics"] = list(self.config["nics"])
else:
kwargs["nics"] = [{"net-id": nic}
for nic in self.config["nics"]]