From 7e63f047ec5d15cfea08dd47f85e36962534e340 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Tue, 6 Sep 2016 02:21:18 -0700 Subject: [PATCH] NSX|V3: ensure that the NSX credenatials are set for devstack Make sure that the credentials are set when spinning up a devstack component that requires the OVS then we enforce that the NSX validations are done. This is necessary to determine how we configure the OVS manager. Change-Id: Ibeec9e72ddea45b24ffde5e25b2ca8347c34bd43 --- devstack/lib/vmware_nsx_v3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devstack/lib/vmware_nsx_v3 b/devstack/lib/vmware_nsx_v3 index 57ad821747..9707678375 100644 --- a/devstack/lib/vmware_nsx_v3 +++ b/devstack/lib/vmware_nsx_v3 @@ -46,9 +46,6 @@ 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 -1 -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]') @@ -60,6 +57,9 @@ function _ovsdb_connection { } function setup_integration_bridge { + 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!" _neutron_ovs_base_setup_bridge $OVS_BRIDGE sudo ovs-vsctl set bridge $OVS_BRIDGE external_ids:bridge-id=nsx-managed sudo ovs-vsctl set-manager $(_ovsdb_connection)