From: Salvatore Orlando Date: Wed, 27 Nov 2013 13:06:20 +0000 (-0800) Subject: Ensure NVP API connection port is always an integer X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0cbcdcfc5094fcb52679550bc67db8136441adf6;p=openstack-build%2Fneutron-build.git Ensure NVP API connection port is always an integer Convert the 'port' part of a NVP endpoint to int before passing it to the NVP API client. Change-Id: I15137d943ab950cb5cc80d7af2971bce3ac1a265 Closes-Bug: #1255519 --- diff --git a/neutron/plugins/nicira/NeutronPlugin.py b/neutron/plugins/nicira/NeutronPlugin.py index 5fe7bbc95..72876f606 100644 --- a/neutron/plugins/nicira/NeutronPlugin.py +++ b/neutron/plugins/nicira/NeutronPlugin.py @@ -98,7 +98,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,