From de4d3b98a1801f9b9197cbf04ed7760bdf4834e6 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Tue, 23 May 2017 01:58:26 -0700 Subject: [PATCH] NSXV3: ensure that devstack does not get invalid config If a expected variable is not set then we would get the error: Configuration variable 'The' not found. Change-Id: I02e6e9a6b6281528b795adcb33989a4736cd175a --- devstack/lib/vmware_nsx_v3 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devstack/lib/vmware_nsx_v3 b/devstack/lib/vmware_nsx_v3 index 42f94aad52..ca0c2e7b15 100644 --- a/devstack/lib/vmware_nsx_v3 +++ b/devstack/lib/vmware_nsx_v3 @@ -153,10 +153,13 @@ function neutron_plugin_configure_plugin_agent { } function _nsxv3_ini_set { + if [[ -z $1 || -z $2 ]]; then + if [[ $3 != "" ]]; then + die $LINENO $3 + fi + fi if [[ $2 != "" ]]; then iniset /$Q_PLUGIN_CONF_FILE nsx_v3 $1 $2 - elif [[ $3 != "" ]]; then - die $LINENO $3 fi }