Merge "Add python_version function to functions-common"
This commit is contained in:
commit
92619ddb61
@ -1899,6 +1899,12 @@ function maskip {
|
|||||||
echo $subnet
|
echo $subnet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Return the current python as "python<major>.<minor>"
|
||||||
|
function python_version {
|
||||||
|
local python_version=$(python -c 'import sys; print("%s.%s" % sys.version_info[0:2])')
|
||||||
|
echo "python${python_version}"
|
||||||
|
}
|
||||||
|
|
||||||
# Service wrapper to restart services
|
# Service wrapper to restart services
|
||||||
# restart_service service-name
|
# restart_service service-name
|
||||||
function restart_service {
|
function restart_service {
|
||||||
|
@ -164,7 +164,7 @@ function _config_keystone_apache_wsgi {
|
|||||||
keystone_auth_port=$KEYSTONE_AUTH_PORT_INT
|
keystone_auth_port=$KEYSTONE_AUTH_PORT_INT
|
||||||
fi
|
fi
|
||||||
if [[ ${USE_VENV} = True ]]; then
|
if [[ ${USE_VENV} = True ]]; then
|
||||||
venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/python2.7/site-packages"
|
venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/$(python_version)/site-packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy proxy vhost and wsgi file
|
# copy proxy vhost and wsgi file
|
||||||
|
2
lib/nova
2
lib/nova
@ -259,7 +259,7 @@ function _config_nova_apache_wsgi {
|
|||||||
nova_keyfile="SSLCertificateKeyFile $NOVA_SSL_KEY"
|
nova_keyfile="SSLCertificateKeyFile $NOVA_SSL_KEY"
|
||||||
fi
|
fi
|
||||||
if [[ ${USE_VENV} = True ]]; then
|
if [[ ${USE_VENV} = True ]]; then
|
||||||
venv_path="python-path=${PROJECT_VENV["nova"]}/lib/python2.7/site-packages"
|
venv_path="python-path=${PROJECT_VENV["nova"]}/lib/$(python_version)/site-packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy proxy vhost and wsgi helper files
|
# copy proxy vhost and wsgi helper files
|
||||||
|
Loading…
Reference in New Issue
Block a user