Add ironic-ui to horizon image

Add ironic-ui package into horizon image. There is no ubuntu/centos
package for ironic-ui now.

Change-Id: Ie094b92b9a8e20696cee84698013d09306dd6e7f
Closes-Bug: #1645104
This commit is contained in:
Jeffrey Zhang 2016-11-27 23:19:01 +08:00
parent 3853b7dbc6
commit 91d120cbf0
2 changed files with 29 additions and 9 deletions

View File

@ -21,19 +21,35 @@ elif [[ ${KOLLA_INSTALL_TYPE} == "source" ]]; then
SITE_PACKAGES="/var/lib/kolla/venv/lib/python2.7/site-packages"
fi
function config_neutron_lbaas {
SRC="${SITE_PACKAGES}/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py"
DEST="${SITE_PACKAGES}/openstack_dashboard/local/enabled/_1481_project_ng_loadbalancersv2_panel.py"
if [[ "${ENABLE_NEUTRON_LBAAS}" == "yes" ]] && [[ ! -f ${DEST} ]]; then
cp -a $SRC $DEST
function config_dashboard {
ENABLE=$1
SRC=$2
DEST=$3
if [[ "${ENABLE}" == "yes" ]] && [[ ! -f "${DEST}" ]]; then
cp -a "${SRC}" "${DEST}"
FORCE_GENERATE="yes"
elif [[ "${ENABLE_NEUTRON_LBAAS}" != "yes" ]] && [[ -f ${DEST} ]]; then
elif [[ "${ENABLE}" != "yes" ]] && [[ -f "${DEST}" ]]; then
# remove pyc pyo files too
rm -f ${DEST} ${DEST}c ${DEST}o
rm -f "${DEST}" "${DEST}c" "${DEST}o"
FORCE_GENERATE="yes"
fi
}
function config_ironic_dashboard {
for file in ${SITE_PACKAGES}/ironic_ui/enabled/_*[^__].py; do
config_dashboard "${ENABLE_IRONIC}" \
"${SITE_PACKAGES}/ironic_ui/enabled/${file##*/}" \
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
done
}
function config_neutron_lbaas {
config_dashboard "${ENABLE_NEUTRON_LBAAS}" \
"${SITE_PACKAGES}/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py" \
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/_1481_project_ng_loadbalancersv2_panel.py"
}
config_ironic_dashboard
config_neutron_lbaas
# NOTE(pbourke): httpd will not clean up after itself in some cases which
@ -53,11 +69,11 @@ MD5SUM_TXT_PATH="/tmp/.local_settings.md5sum.txt"
if [[ ! -f ${MD5SUM_TXT_PATH} || $(md5sum -c --status ${MD5SUM_TXT_PATH};echo $?) != 0 || ${FORCE_GENERATE} == "yes" ]]; then
md5sum /etc/openstack-dashboard/local_settings > ${MD5SUM_TXT_PATH}
if [[ "${KOLLA_INSTALL_TYPE}" == "binary" ]]; then
/usr/bin/manage.py compress --force
/usr/bin/manage.py collectstatic --noinput --clear
/usr/bin/manage.py compress --force
elif [[ "${KOLLA_INSTALL_TYPE}" == "source" ]]; then
/var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compress --force
/var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py collectstatic --noinput --clear
/var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compress --force
fi
fi

View File

@ -214,6 +214,10 @@ SOURCES = {
'type': 'url',
'location': ('http://tarballs.openstack.org/horizon/'
'horizon-master.tar.gz')},
'horizon-plugin-ironic-ui': {
'type': 'url',
'location': ('http://tarballs.openstack.org/ironic-ui/'
'ironic-ui-master.tar.gz')},
'horizon-plugin-neutron-lbaas-dashboard': {
'type': 'url',
'location': ('http://tarballs.openstack.org/neutron-lbaas-dashboard/'