From da9ee782b929e1065fc25f061b50f8d0f2145636 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Wed, 3 Aug 2016 01:54:59 -0700 Subject: [PATCH] NSX|V3: ensure that the manager, user and password are set We need to determine the NSX version used to configure the OVS manager. This requires that these values be set. If they are not set then devstack will not start. Change-Id: I032152b7a2f61e36652acf88d8c727347c090cfb --- devstack/lib/vmware_nsx_v3 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devstack/lib/vmware_nsx_v3 b/devstack/lib/vmware_nsx_v3 index 0795f7af02..1d41ac5125 100644 --- a/devstack/lib/vmware_nsx_v3 +++ b/devstack/lib/vmware_nsx_v3 @@ -46,6 +46,9 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base function _version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } function _ovsdb_connection { + die_if_not_set $LINENO NSX_MANAGER "NSX_MANAGER has not been set!" + die_if_not_set $LINENO NSX_USER "NSX_USER has not been set!" + die_if_not_set $LINENO NSX_PASSWORD "NSX_PASSWORD has not been set!" managers=(${NSX_MANAGER//,/ }) NSX_MGR_IP=${managers[0]} NSX_VER=$(curl -s -k -u "$NSX_USER:$NSX_PASSWORD" -H 'Accept: application/json' https://$NSX_MGR_IP/api/v1/node | python -c 'import sys, json; print json.load(sys.stdin)["node_version"][:5]')