File openstack-horizon-plugin-neutron-lbaas-ui.spec of Package openstack-horizon-plugin-neutron-lbaas-ui
#
# spec file for package openstack-horizon-plugin-neutron-lbaas-ui
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define version_unconverted 5.0.1.dev7
Name: openstack-horizon-plugin-neutron-lbaas-ui
Version: 5.0.1~dev7
Release: 0
Summary: Neutron lbaas management plugin for Horizon
License: Apache-2.0
Group: System/Management
Url: https://launchpad.net/neutron-lbaas-dashboard
Source: http://tarballs.openstack.org/neutron-lbaas-dashboard/neutron-lbaas-dashboard-stable-rocky.tar.gz
BuildRequires: fdupes
BuildRequires: openstack-dashboard
BuildRequires: openstack-suse-macros
BuildRequires: openstack-suse-sudo
BuildRequires: python-base
BuildRequires: python-pbr
Requires: python-horizon-plugin-neutron-lbaas-ui = %{version}
Requires(post): python-horizon-plugin-neutron-lbaas-ui = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
OpenStack Neutron load balancer v2 management plugin for Horizon.
%package -n python-horizon-plugin-neutron-lbaas-ui
Summary: Neutron Lbaas Management Plugin for Horizon - Python module
Group: Development/Languages/Python
Requires: python >= 2.7
Requires: python-Babel >= 2.3.4
Requires: python-barbicanclient >= 4.5.2
Requires: python-pbr >= 2.0.0
%description -n python-horizon-plugin-neutron-lbaas-ui
OpenStack Neutron load balancer v2 management plugin for Horizon.
This package contains the core Python module of the neutron-lbaas-ui.
%package test
Summary: Neutron Lbaas Management Plugin for Horizon - Testsuite
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: python-ddt >= 1.0.1
Requires: python-django-nose >= 1.4.4
Requires: python-oslotest >= 3.2.0
Requires: python-python-subunit >= 1.0.0
Requires: python-testrepository >= 0.0.18
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 2.2.0
Requires: python-xvfbwrapper >= 0.1.3
%description test
OpenStack Neutron load balancer v2 management plugin for Horizon.
It is used to verify the functionality of the Neutron Lbaas UI Plugin.
%prep
%setup -q -n neutron-lbaas-dashboard-%{version_unconverted}
%openstack_cleanup_prep
%build
python setup.py build
%install
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
install -m 0755 -d %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
cp -a neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py %{buildroot}/srv/www/openstack-dashboard/openstack_dashboard/enabled/
### misc
%fdupes %{buildroot}%{python_sitelib}/neutron_lbaas_dashboard
%post
su wwwrun -s /bin/sh -c "python /srv/www/openstack-dashboard/manage.py collectstatic --noinput --clear > /dev/null"
%postun
su wwwrun -s /bin/sh -c "python /srv/www/openstack-dashboard/manage.py collectstatic --noinput --clear > /dev/null"
%files
%defattr(-,root,root)
/srv/www/openstack-dashboard/openstack_dashboard/enabled
%doc ChangeLog README.rst
%license LICENSE
%files -n python-horizon-plugin-neutron-lbaas-ui
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/neutron_lbaas_dashboard/
%{python_sitelib}/neutron_lbaas_dashboard-*.egg-info
%exclude %{python_sitelib}/neutron_lbaas_dashboard/test*
%files test
%defattr(-,root,root)
%{python_sitelib}/neutron_lbaas_dashboard/test*
%changelog