Devstack plugin: fetch Neutron only when needed

When Neutron is already fetched by devstack, it is not required to fetch
it in the devstack plugin. Doing so causes problems when devstack fetches
a specifig branch of Neutron.

Change-Id: Iaf2bc9bd76f78d32c7565ccd6288f96cbf6610d7
This commit is contained in:
Kobi Samoray 2018-10-22 14:41:20 +03:00
parent a87a2f9305
commit 3a652e52b3

View File

@ -47,12 +47,16 @@ function install_neutron_projects {
sudo chown -R ${USER}:${USER} src/${pkg}
fi
done
sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron
sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron.egg*
sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron
sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron.egg*
sudo pip install -e "git+https://git.openstack.org/openstack/neutron#egg=neutron"
sudo chown -R ${USER}:${USER} src/neutron
if is_service_enabled neutron; then
echo "service Neutron is enabled explicitly by devstack"
else
sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron
sudo rm -rf /usr/local/lib/python2.7/dist-packages/neutron.egg*
sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron
sudo rm -rf /usr/local/lib/python3.5/dist-packages/neutron.egg*
sudo pip install -e "git+https://git.openstack.org/openstack/neutron#egg=neutron"
sudo chown -R ${USER}:${USER} src/neutron
fi
}
function nsxv_configure_service {