File openstack-neutron-vmware-dvs-agent.spec of Package python-neutron-vmware-dvs
#
# spec file for package openstack-neutron-vmware-dvs-agent
#
# Copyright (c) 2016 SUSE LINUX Products 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 http://bugs.opensuse.org/
%define component vmware_dvs
%define groupname neutron
%define version_unconverted 2015.1.0.dev301
Name: openstack-neutron-vmware-dvs-agent
Version: 2015.1.0~dev301
Release: 1
License: Apache-2.0
Summary: Neutron agent for VMWare DVS
Url: http://github.com/Mirantis/vmware-dvs/
Group: Development/Languages/Python
Source: https://github.com/Mirantis/vmware-dvs/archive/vmware_dvs-%{version}.tar.gz
Source1: %name.service
BuildRequires: python-devel
BuildRequires: python-pbr
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
BuildRequires: openstack-neutron
Requires: gawk
Requires: openstack-neutron
Requires: python-novaclient
Requires: python-suds
Requires: supervisor
%{?systemd_requires}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Provides agent VMWare DVS.
%package test
Summary: Neutron agent for VMWare DVS - Testsuite
Group: System/Management
Requires: %{name} = %{version}
Requires: python-fixtures >= 1.3.1
Requires: python-mock >= 1.2
Requires: python-mox >= 0.5.3
Requires: python-nova
Requires: python-oslotest >= 1.10.0
Requires: python-python-subunit >= 0.0.18
Requires: python-testrepository >= 0.0.18
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 1.4.0
Requires: python-tempest-lib >= 0.8.0
Requires: python-cliff >= 1.14.0
Requires: python-WebTest >= 2.0
Requires: python-httplib2 >= 0.7.5
Requires: python-requests-mock >= 0.6.0
%description test
The testsuite for the Neutron agent for VMWare DVS.
%prep
%setup -q -n %{component}-%{version_unconverted}
rm -f requirements.txt
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# config files
mv %{buildroot}/usr/etc %{buildroot}/%{_sysconfdir}
mkdir -p %{buildroot}%{_sysconfdir}/neutron/plugins/ml2
mv %{buildroot}/etc/neutron/ml2_conf_vmware_dvs.ini %{buildroot}%{_sysconfdir}/neutron/plugins/ml2/
%__install -p -D -m 444 %{SOURCE1} %{buildroot}/%{_unitdir}/openstack-neutron-vmware-dvs-agent.service
#%fdupes %{buildroot}%{python_sitelib}/
%pre
%service_add_pre openstack-neutron-vmware-dvs-agent.service
%post
%service_add_post openstack-neutron-vmware-dvs-agent.service
%preun
%service_del_preun openstack-neutron-vmware-dvs-agent.service
%postun
%service_del_postun openstack-neutron-vmware-dvs-agent.service
%files
%defattr(-,root,root,-)
%doc README.rst
%{python_sitelib}/*
%{_bindir}/neutron-dvs-agent
%{_unitdir}/openstack-neutron-vmware-dvs-agent.service
%dir %{_sysconfdir}/neutron
%dir %{_sysconfdir}/neutron/plugins
%dir %{_sysconfdir}/neutron/plugins/ml2
%config(noreplace) %attr(0640, root, %{groupname}) %{_sysconfdir}/neutron/plugins/ml2/ml2_conf_vmware_dvs.ini
# Part of test subpackage
%exclude %{python_sitelib}/vmware_dvs/tests/
%files test
%defattr(-,root,root)
%dir %{python_sitelib}/vmware_dvs/tests
%changelog