Merge "Ensure NVP API connection port is always an integer"

This commit is contained in:
Jenkins 2013-12-05 16:59:47 +00:00 committed by Gerrit Code Review
commit 552232db15

View File

@ -99,7 +99,11 @@ class NetworkTypes:
def create_nvp_cluster(cluster_opts, concurrent_connections,
nvp_gen_timeout):
cluster = nvp_cluster.NVPCluster(**cluster_opts)
api_providers = [ctrl.split(':') + [True]
def _ctrl_split(x, y):
return (x, int(y), True)
api_providers = [_ctrl_split(*ctrl.split(':'))
for ctrl in cluster.nvp_controllers]
cluster.api_client = NvpApiClient.NVPApiHelper(
api_providers, cluster.nvp_user, cluster.nvp_password,