Commit ca671194 authored by Michal Arbet's avatar Michal Arbet

Merge branch 'debian/rocky' into 'debian/rocky'

Debian/rocky

See merge request !4
parents 78754f15 e958bf1a
octavia-dashboard (2.0.0-3) UNRELEASED; urgency=medium
octavia-dashboard (2.0.0-3) unstable; urgency=medium
[ Ondřej Nový ]
* Running wrap-and-sort -bast.
[ Michal Arbet ]
* Redesign octavia-dashboard:
- Enabled files now in /etc/openstack-dashboard/
- Removed post scripts which is now achieved by a trigger
- Update copyright
* Add use-policy-json-format.patch
* Running wrap-and-sort -bast.
-- Ondřej Nový <onovy@debian.org> Wed, 09 Jan 2019 14:33:33 +0100
-- Michal Arbet <michal.arbet@ultimum.io> Mon, 21 Jan 2019 18:27:49 +0100
octavia-dashboard (2.0.0-2.1) unstable; urgency=medium
......
......@@ -22,8 +22,10 @@ Build-Depends-Indep:
python3-django-nose (>= 1.4.4),
python3-keystoneclient (>= 1:3.8.0),
python3-nose-exclude (>= 0.3.0),
python3-octavia,
python3-openstacksdk (>= 0.11.2),
python3-oslo.log (>= 3.36.0),
python3-oslo.policy,
python3-oslotest (>= 3.2.0),
python3-selenium (>= 2.50.1),
python3-six (>= 1.10.0),
......
......@@ -10,7 +10,7 @@ Copyright: (c) 2010-2014, OpenStack Foundation <openstack-dev@lists.openstack.or
License: Apache-2.0
Files: debian/*
Copyright: (c) 2018, Michal Arbet <michal.arbet@ultimum.io>
Copyright: (c) 2018-2019, Michal Arbet <michal.arbet@ultimum.io>
License: Apache-2.0
License: Apache-2.0
......
install-all-files.patch
use-policy-json-format.patch
Description: Change policy yaml to json as
all other dashboard plugins are using json.
Author: Michal Arbet <michal.arbet@ultimum.io>
Forwarded: no
Last-Update: 2019-01-20
--- a/octavia_dashboard/local_settings.d/_1499_load_balancer_settings.py
+++ b/octavia_dashboard/local_settings.d/_1499_load_balancer_settings.py
@@ -18,5 +18,5 @@ from django.conf import settings
settings.POLICY_FILES.update({
- 'load-balancer': 'octavia_policy.yaml',
+ 'load-balancer': 'octavia_policy.json',
})
/etc/openstack-dashboard/*
/usr/*
#!/bin/sh
set -e
if [ "${1}" = "configure" ] ; then
/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput
/usr/share/openstack-dashboard/manage.py compress --force
if [ -f /var/lib/openstack-dashboard/secret-key/.secret_key_store ]; then
rm /var/lib/openstack-dashboard/secret-key/.secret_key_store
fi
chown -R www-data /var/lib/openstack-dashboard/secret-key /var/lib/openstack-dashboard/static
fi
#DEBHELPER#
#!/bin/sh
set -e
if [ "$1" = "remove" ] || [ "$1" = "disappear" ] || [ "$1" = "purge" ] ; then
if [ -x /usr/share/openstack-dashboard/manage.py ] ; then
/usr/share/openstack-dashboard/manage.py collectstatic --clear --noinput
/usr/share/openstack-dashboard/manage.py compress --force
if [ -f /var/lib/openstack-dashboard/secret-key/.secret_key_store ]; then
rm /var/lib/openstack-dashboard/secret-key/.secret_key_store
fi
chown -R www-data /var/lib/openstack-dashboard/secret-key /var/lib/openstack-dashboard/static
fi
fi
#DEBHELPER#
......@@ -5,19 +5,9 @@ include /usr/share/openstack-pkg-tools/pkgos.make
%:
dh $@ --buildsystem=python_distutils --with python3
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
for i in $(PYTHON3S) ; do \
PYTHON=python$$i NOSE_WITH_OPENSTACK=1 \
NOSE_OPENSTACK_COLOR=1 \
NOSE_OPENSTACK_RED=0.05 \
NOSE_OPENSTACK_YELLOW=0.025 \
NOSE_OPENSTACK_SHOW_ELAPSED=1 \
DJANGO_SETTINGS_MODULE=octavia_dashboard.test.settings \
python3 -m coverage run \
$(CURDIR)/manage.py test octavia_dashboard --settings=octavia_dashboard.tests.settings ; \
done
endif
override_dh_clean:
dh_clean
rm -rf .coverage*
override_dh_auto_clean:
python3 setup.py clean
......@@ -25,32 +15,53 @@ override_dh_auto_clean:
override_dh_auto_build:
echo "Do nothing..."
override_dh_clean:
dh_clean -O--buildsystem=python_distutils
find . -name '*pyc' -delete
rm -f octavia_dashboard/tests/.secret_key_store
rm -rf .coverage*
rm -rf build
rm -f AUTHORS ChangeLog
override_dh_auto_install:
echo "Do nothing..."
override_dh_install:
for i in $(PYTHON3S) ; do \
python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-octavia-dashboard ; \
python$$i setup.py install --install-layout=deb --root $(CURDIR)/debian/tmp ; \
done
# Copy the dashboard static files on a webroot accessible path
mkdir -p $(CURDIR)/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project
cp -auxf octavia_dashboard/static/dashboard/project/lbaasv2 $(CURDIR)/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project
# Move config files to standard location
install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard/enabled
install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.d
install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard/policy
# Generate missing policy file
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3-oslopolicy-sample-generator \
--output-file=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/octavia_dashboard/conf/octavia_policy.json \
--format json \
--namespace octavia
# Move policy file
mv -f $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/octavia_dashboard/conf/octavia_policy.json $(CURDIR)/debian/tmp/etc/openstack-dashboard/policy/octavia_policy.json
# Move config enabled
mv -f $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/octavia_dashboard/enabled/_[0-9]*.py $(CURDIR)/debian/tmp/etc/openstack-dashboard/enabled/
mkdir -p $(CURDIR)/usr/share/openstack-dashboard/openstack_dashboard/static/app
cp -auxf octavia_dashboard/static/app/core $(CURDIR)/usr/share/openstack-dashboard/openstack_dashboard/static/app
# Move local_settings
mv -f $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/octavia_dashboard/local_settings.d/_[0-9]*.py $(CURDIR)/debian/tmp/etc/openstack-dashboard/local_settings.d/
# Activates the octavia_dashboard plugin in Horizon
# octavia_dashboard/enabled/_*
mkdir -p $(CURDIR)/debian/python3-octavia-dashboard/usr/lib/python3/dist-packages/openstack_dashboard/enabled
cp -r $(CURDIR)/octavia_dashboard/enabled/_* $(CURDIR)/debian/python3-octavia-dashboard/usr/lib/python3/dist-packages/openstack_dashboard/enabled
rm $(CURDIR)/debian/python3-octavia-dashboard/usr/lib/python3/dist-packages/openstack_dashboard/enabled/__init__.py
# Remove config dirs from /usr/lib/python3/dist-packages/octavia__dashboard/
rm -rf $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/octavia_dashboard/conf
rm -rf $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/octavia_dashboard/enabled
rm -rf $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/octavia_dashboard/local_settings.d/
mkdir -p $(CURDIR)/debian/python3-octavia-dashboard/usr/share/openstack-dashboard/openstack_dashboard/enabled
cp -r $(CURDIR)/octavia_dashboard/enabled/_*.py $(CURDIR)/debian/python3-octavia-dashboard/usr/share/openstack-dashboard/openstack_dashboard/enabled
rm $(CURDIR)/debian/python3-octavia-dashboard/usr/share/openstack-dashboard/openstack_dashboard/enabled/__init__.py
dh_install
dh_missing --fail-missing
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
for i in $(PYTHON3S) ; do \
PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages \
NOSE_WITH_OPENSTACK=1 \
NOSE_OPENSTACK_COLOR=1 \
NOSE_OPENSTACK_RED=0.05 \
NOSE_OPENSTACK_YELLOW=0.025 \
NOSE_OPENSTACK_SHOW_ELAPSED=1 \
python$$i $(CURDIR)/manage.py test octavia_dashboard -v 2 --settings=octavia_dashboard.tests.settings ; \
done
## Delete __pycache__
find . -name __pycache__ -prune -exec rm -rf {} +;
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment