NSX|V3: only run cleanup for devstack if q-svc is enabled

This causes issues when running on a multi-node setup and one wants
to unstack on the node.

Change-Id: I5a7ee79614a9a6a04abe6842a63c1ba2c2775424
This commit is contained in:
Gary Kotton 2016-08-16 07:16:56 -07:00
parent ef7c8fe01e
commit f6fe0652d0

View File

@ -43,12 +43,15 @@ elif [[ $Q_PLUGIN == 'vmware_nsx_v3' ]]; then
init_vmware_nsx_v3 init_vmware_nsx_v3
elif [[ "$1" == "unstack" ]]; then elif [[ "$1" == "unstack" ]]; then
stop_vmware_nsx_v3 stop_vmware_nsx_v3
# only clean up when q-svc (legacy support) or neutron-api is enabled
if is_service_enabled q-svc || is_service_enabled neutron-api; then
NSX_MANAGER=${NSX_MANAGERS:-$NSX_MANAGER} NSX_MANAGER=${NSX_MANAGERS:-$NSX_MANAGER}
IFS=',' IFS=','
NSX_MANAGER=($NSX_MANAGER) NSX_MANAGER=($NSX_MANAGER)
unset IFS unset IFS
python $dir/tools/nsxv3_cleanup.py --mgr-ip $NSX_MANAGER --user $NSX_USER --password $NSX_PASSWORD python $dir/tools/nsxv3_cleanup.py --mgr-ip $NSX_MANAGER --user $NSX_USER --password $NSX_PASSWORD
fi fi
fi
elif [[ $Q_PLUGIN == 'vmware_dvs' ]]; then elif [[ $Q_PLUGIN == 'vmware_dvs' ]]; then
source $dir/lib/vmware_dvs source $dir/lib/vmware_dvs
fi fi