File openstack-neutron.spec of Package openstack-neutron-doc

#
# spec file for package openstack-neutron
#
# Copyright (c) 2023 SUSE LLC
#
# 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 component neutron
%define groupname %{component}
%define username %{component}

%define version_unconverted 13.0.8.dev209

Name:           openstack-neutron
Version:        13.0.8~dev209
Release:        0
Summary:        OpenStack Network
License:        Apache-2.0
Group:          System/Management
URL:            https://launchpad.net/neutron
Source:         http://tarballs.openstack.org/neutron/neutron-stable-rocky.tar.gz
Source1:        openstack-%{component}.service
Source2:        %{name}.logrotate
Source3:        neutron-sudoers
Source7:        openstack-neutron-dhcp-agent.service
Source8:        openstack-neutron-l3-agent.service
Source9:        openstack-neutron-linuxbridge-agent.service
Source10:       openstack-neutron-macvtap-agent.service
Source11:       openstack-neutron-metadata-agent.service
Source12:       openstack-neutron-metering-agent.service
Source13:       openstack-neutron-openvswitch-agent.service
Source14:       openstack-neutron-ovs-cleanup.service
Source30:       %name.conf
Source20:       https://raw.githubusercontent.com/SUSE-Cloud/cookbook-openstack-network/neutron-ha-tool-maintenance/files/default/neutron-ha-tool.py
Source21:       https://raw.githubusercontent.com/SUSE-Cloud/cookbook-openstack-network/neutron-ha-tool-maintenance/files/default/neutron-evacuate-lbaasv2-agent.py
Source50:       README.config
Source99:       rpmlintrc
BuildRequires:  crudini
BuildRequires:  fdupes
BuildRequires:  openstack-suse-macros
BuildRequires:  openstack-suse-sudo
BuildRequires:  python-devel
BuildRequires:  python-pbr
BuildRequires:  python-pyroute2
# Documentation/sample config build requirements:
BuildRequires:  python-Sphinx
BuildRequires:  python-debtcollector
BuildRequires:  python-fixtures
BuildRequires:  python-keystoneauth1
BuildRequires:  python-keystonemiddleware
BuildRequires:  python-neutron-lib
BuildRequires:  python-novaclient
BuildRequires:  python-openstackdocstheme
BuildRequires:  python-os-xenapi
BuildRequires:  python-oslo.cache
BuildRequires:  python-oslo.config
BuildRequires:  python-oslo.db
BuildRequires:  python-oslo.i18n
BuildRequires:  python-oslo.log
BuildRequires:  python-oslo.messaging
BuildRequires:  python-oslo.policy
BuildRequires:  python-oslo.privsep
BuildRequires:  python-oslo.rootwrap
BuildRequires:  python-oslo.versionedobjects
BuildRequires:  python-oslotest
BuildRequires:  python-osprofiler
BuildRequires:  python-ovsdbapp
BuildRequires:  python-pecan
BuildRequires:  python-psutil
BuildRequires:  python-six
BuildRequires:  python-sphinxcontrib-apidoc
BuildRequires:  python-tenacity
BuildRequires:  python-testresources
BuildRequires:  python-weakrefmethod
Requires:       logrotate
Requires:       openstack-suse-sudo
Requires:       python >= 2.7
Requires:       python-neutron = %{version}
%if 0%{?suse_version}
Requires(pre):  pwdutils
%else
Requires(pre):  /usr/bin/getent /usr/sbin/useradd /usr/sbin/userdel /usr/sbin/groupadd /usr/sbin/groupdel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Neutron is a virtual network service for Openstack.

Just like OpenStack Nova provides an API to dynamically request and
configure virtual servers, Neutron provides an API to dynamically
request and configure virtual networks. These networks connect
"interfaces" from other OpenStack services (e.g., vNICs from Nova VMs).
The Neutron API supports extensions to provide advanced network
capabilities (e.g., QoS, ACLs, network monitoring, etc)

%package -n python-neutron
Summary:        OpenStack Network - Python module
Group:          Development/Languages/Python
Requires:       python >= 2.7
Requires:       python-Jinja2 >= 2.10
Requires:       python-Paste >= 2.0.2
Requires:       python-PasteDeploy >= 1.5.0
Requires:       python-Routes >= 2.3.1
Requires:       python-SQLAlchemy >= 1.2.0
Requires:       python-netifaces >= 0.10.4
Requires:       python-oslo.cache >= 1.26.0
Requires:       python-oslo.privsep >= 1.23.0
Requires:       python-osprofiler >= 1.4.0
# WMI is only needed on windows
#Requires:       python-WMI
Requires:       python-WebOb >= 1.7.1
Requires:       python-alembic >= 0.8.10
Requires:       python-debtcollector >= 1.2.0
Requires:       python-designateclient >= 2.7.0
Requires:       python-eventlet >= 0.18.2
Requires:       python-httplib2 >= 0.9.1
Requires:       python-keystoneauth1 >= 3.4.0
Requires:       python-keystonemiddleware >= 4.17.0
Requires:       python-netaddr >= 0.7.18
Requires:       python-neutron-lib >= 1.18.0
Requires:       python-neutronclient >= 6.7.0
Requires:       python-novaclient >= 9.1.0
Requires:       python-os-xenapi >= 0.3.1
Requires:       python-os-xenapi >= 0.3.1
Requires:       python-oslo.concurrency >= 3.25.0
Requires:       python-oslo.config >= 5.1.0
Requires:       python-oslo.context >= 2.19.2
Requires:       python-oslo.db >= 4.27.0
Requires:       python-oslo.i18n >= 3.15.3
Requires:       python-oslo.log >= 3.36.0
Requires:       python-oslo.messaging >= 5.29.0
Requires:       python-oslo.middleware >= 3.31.0
Requires:       python-oslo.policy >= 1.30.0
Requires:       python-oslo.reports >= 1.18.0
Requires:       python-oslo.rootwrap >= 5.8.0
Requires:       python-oslo.serialization >= 2.18.0
Requires:       python-oslo.service >= 1.24.0
Requires:       python-oslo.utils >= 3.33.0
Requires:       python-oslo.versionedobjects >= 1.31.2
Requires:       python-ovs >= 2.8.0
Requires:       python-ovsdbapp >= 0.9.1
Requires:       python-pbr >= 2.0.0
Requires:       python-pecan >= 1.1.1
Requires:       python-psutil >= 3.2.2
Requires:       python-pyroute2 >= 0.4.21
Requires:       python-requests >= 2.14.2
Requires:       python-retrying >= 1.2.3
Requires:       python-ryu >= 4.24
Requires:       python-six >= 1.10.0
Requires:       python-stevedore >= 1.20.0
Requires:       python-tenacity >= 3.2.1
Requires:       python-weakrefmethod >= 1.0.2

%description -n python-neutron
This package contains the core Python module of OpenStack Neutron.

%package server
Summary:        OpenStack Network - Python module
Group:          Development/Languages/Python
PreReq:         %name = %version
Requires:       crudini

%description server
This package provides the Neutron server

%package dhcp-agent
Summary:        OpenStack Network - DHCP Agent
Group:          Development/Languages/Python
PreReq:         %name = %version
Requires:       dnsmasq >= 2.63
%if 0%{?suse_version} >= 1310
Requires:       dnsmasq-utils
%endif

%description dhcp-agent
This package provides the DHCP Agent.

%package l3-agent
Summary:        OpenStack Network Service (Neutron) - L3 Agent
Group:          Development/Languages/Python
PreReq:         %name = %version
Requires:       conntrack-tools
Requires:       radvd

%description l3-agent
This package provides the L3 Agent.

%package linuxbridge-agent
Summary:        OpenStack Network - Linux Bridge Agent
Group:          Development/Languages/Python
Provides:       openstack-neutron-agent = %version
PreReq:         %name = %version
Requires:       conntrack-tools
Requires:       ebtables
Requires:       ipset
Requires:       iptables

%description linuxbridge-agent
This package provides the Linux Bridge Agent.

%package metadata-agent
Summary:        OpenStack Network - Meta Data Agent
Group:          Development/Languages/Python
PreReq:         %name = %version
Requires:       haproxy

%description metadata-agent
This package provides the Meta Data Agent.

%package metering-agent
Summary:        OpenStack Network - Metering Agent
Group:          Development/Languages/Python
PreReq:         %name = %version

%description metering-agent
This package provides the Metering Agent.

#%package mlnx-agent
#Summary:        OpenStack Network - Mellanox Plugin
#Group:          Development/Languages/Python
#PreReq:         %name = %version
#Provides:       openstack-quantum-mlnx-agent = 2013.2.0
#Obsoletes:      openstack-quantum-mlnx-agent < 2013.2.0

#%description mlnx-agent
#This package provides the Mellanox Agent





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































#%package ofagent-agent
#Summary:        OpenStack Network - ofagent Agent
#Group:          Development/Languages/Python
#Provides:       openstack-neutron-agent = %version
#PreReq:         %name = %version
#
#%description ofagent-agent
#This package provides the ofagent Agent.
#

%package openvswitch-agent
Summary:        OpenStack Network - Open vSwitch
Group:          Development/Languages/Python
Provides:       openstack-neutron-agent = %version
PreReq:         %name = %version
Requires:       conntrack-tools
Requires:       ipset
Requires:       iptables
Requires:       openvswitch

%description openvswitch-agent
This package provides the OpenVSwitch Agent.

%package macvtap-agent
Summary:        OpenStack Network - macvtap
Group:          Development/Languages/Python
PreReq:         %name = %version

%description macvtap-agent
This package provides the macvtap Agent.

%package test
Summary:        OpenStack Network - Testsuite
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
Requires:       python-WebTest >= 2.0.27
Requires:       python-ddt >= 1.0.1
Requires:       python-fixtures >= 3.0.0
Requires:       python-mock >= 2.0.0
Requires:       python-os-testr >= 1.0.0
Requires:       python-oslotest >= 3.2.0
Requires:       python-python-subunit >= 1.0.0
Requires:       python-requests-mock >= 1.0
Requires:       python-stestr >= 1.0.0
Requires:       python-testresources >= 2.0.0
Requires:       python-testscenarios >= 0.4
Requires:       python-testtools >= 2.2.0

%description test
The OpenStack Neutron testsuite. It is used to verify the functionality
of OpenStack Neutron.

%package ha-tool
Summary:        OpenStack Network - HA tool for L3 agent
Group:          Development/Languages/Python
Requires:       python-neutronclient >= 6.7.0
Requires:       python-paramiko >= 2.0
Requires:       python-retrying >= 1.2.3

%description ha-tool
This package provides a high availability tool for neutron networking that is
able to find offline l3 agents and migrate them to another online agents.

%prep
%setup -q -n %{component}-%{version_unconverted}
# ignore warnings during doc build
crudini --set setup.cfg build_sphinx warning-is-error false

%openstack_cleanup_prep

%build
cp %{SOURCE20} %{SOURCE21} .
python setup.py build
PYTHONPATH=. PBR_VERSION=%{version_unconverted} sphinx-build -b man doc/source doc/build/man

PYTHONPATH=. tools/generate_config_file_samples.sh

%install
python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} --install-data=/

### directories
install -d -m 750 %{buildroot}%{_localstatedir}/{lib,log}/%{component}
install -d -m 750 %{buildroot}%{_localstatedir}/cache/%{component}
install -D -m 644 %{SOURCE30} %{buildroot}/%_tmpfilesdir/%name.conf

### configuration files
install -p -D -m 640 %{SOURCE50} %{buildroot}%{_sysconfdir}/%{component}/README.config
for c in neutron.conf dhcp_agent.ini l3_agent.ini metadata_agent.ini metering_agent.ini ; do
    install -p -D -m 644 etc/$c.sample %{buildroot}%{_sysconfdir}/%{component}/$c
done
for c in linuxbridge_agent.ini ml2_conf.ini openvswitch_agent.ini sriov_agent.ini macvtap_agent.ini ; do
    install -p -D -m 644 etc/neutron/plugins/ml2/$c.sample %{buildroot}%{_sysconfdir}/%{component}/plugins/ml2/$c
done
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}

### systemd units
mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_unitdir}

install -p -D -m 444 %{SOURCE1} "%{buildroot}%{_unitdir}/%{name}.service"
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcopenstack-%{component}

agents=(\
     dhcp-agent \
     l3-agent \
     linuxbridge-agent \
     macvtap-agent
     metadata-agent \
     metering-agent \
     openvswitch-agent \
)

agent_units=(\
    %{SOURCE7} \
    %{SOURCE8} \
    %{SOURCE9} \
    %{SOURCE10} \
    %{SOURCE11} \
    %{SOURCE12} \
    %{SOURCE13}
)

for i in ${!agents[@]} ; do
  install -p -D -m 444 "${agent_units[$i]}" "%{buildroot}%{_unitdir}/%{name}-${agents[$i]}.service"
  ln -s %{_sbindir}/service "%{buildroot}%{_sbindir}/rc%{name}-${agents[$i]}"
done

install -p -D -m 444 %{SOURCE14} "%{buildroot}%{_unitdir}/%{name}-ovs-cleanup.service"
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-ovs-cleanup

### sudoers configuration for nova-rootwrap:
install -D -m 440 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/openstack-neutron

### documentation
install -d %{buildroot}%{_mandir}/man1
install -m 644 doc/build/man/*.1 %{buildroot}%{_mandir}/man1

### default core plugin (the plugin.ini link defines the used plugin. see .service file)
ln -s %{_sysconfdir}/neutron/plugins/ml2/ml2_conf.ini %{buildroot}/%{_sysconfdir}/neutron/plugin.ini

### extra config dirs
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}.conf.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}-server.conf.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}-l3-agent.conf.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}-dhcp-agent.conf.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}-metadata-agent.conf.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}-metering-agent.conf.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}-linuxbridge-agent.conf.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/%{component}/%{component}-openvswitch-agent.conf.d/

## SUSE configuration defaults
%define neutron_conf %{buildroot}%{_sysconfdir}/%{component}/%{component}.conf.d/010-%{component}.conf
%define plugin_dir %{buildroot}/etc/neutron/plugins/
crudini --set %{neutron_conf} DEFAULT state_path /var/lib/%{component}
crudini --set %{neutron_conf} DEFAULT log_dir /var/log/%{component}
crudini --set %{neutron_conf} agent root_helper "sudo neutron-rootwrap /etc/neutron/rootwrap.conf"
crudini --set %{neutron_conf} oslo_concurrency lock_path /var/run/%{component}

### test subpackage
%openstack_test_package_install
%fdupes %{buildroot}%{_localstatedir}/lib/%{name}-test

#TODO/FIXME: there's an upstream discussion on how to install these,
# it's related to setuptools_git / MANIFEST.in issues.
for i in \
         neutron/tests/etc/api-paste.ini.test \
         ; do
    install -m 0644 -D $i %{buildroot}%{python_sitelib}/$i
done

### ha tool
install -m 755 neutron-ha-tool.py %{buildroot}%{_bindir}/neutron-ha-tool
install -m 755 neutron-evacuate-lbaasv2-agent.py %{buildroot}%{_bindir}/neutron-evacuate-lbaasv2-agent

### misc
%fdupes %{buildroot}%{python_sitelib}/%{component}
%fdupes %{buildroot}%{_bindir}

### authentication cache dir
mkdir -p %{buildroot}%{_localstatedir}/cache/%{component}

%pre
%openstack_pre_user_group_create %{username} %{groupname}

%pre server
%service_add_pre openstack-%{component}.service

%post server
%service_add_post openstack-%{component}.service

%preun server
%stop_on_removal openstack-%{component}.service
%service_del_preun openstack-%{component}.service

%postun server
%service_del_postun openstack-%{component}.service

%pre dhcp-agent
%service_add_pre openstack-neutron-dhcp-agent.service

%post dhcp-agent
%service_add_post openstack-neutron-dhcp-agent.service

%preun dhcp-agent
%service_del_preun openstack-neutron-dhcp-agent.service

%postun dhcp-agent
%service_del_postun openstack-neutron-dhcp-agent.service

%pre l3-agent
%service_add_pre openstack-neutron-l3-agent.service

%post l3-agent
%service_add_post openstack-neutron-l3-agent.service

%preun l3-agent
%service_del_preun openstack-neutron-l3-agent.service

%postun l3-agent
%service_del_postun openstack-neutron-l3-agent.service

%pre metadata-agent
%service_add_pre openstack-neutron-metadata-agent.service

%post metadata-agent
%service_add_post openstack-neutron-metadata-agent.service

%preun metadata-agent
%service_del_preun openstack-neutron-metadata-agent.service

%postun metadata-agent
%service_del_postun openstack-neutron-metadata-agent.service

%pre metering-agent
%service_add_pre openstack-neutron-metering-agent.service

%post metering-agent
%service_add_post openstack-neutron-metering-agent.service

%preun metering-agent
%service_del_preun openstack-neutron-metering-agent.service

%postun metering-agent
%service_del_postun openstack-neutron-metering-agent.service

%pre linuxbridge-agent
%service_add_pre openstack-neutron-linuxbridge-agent.service

%post linuxbridge-agent
%service_add_post openstack-neutron-linuxbridge-agent.service

%preun linuxbridge-agent
%service_del_preun openstack-neutron-linuxbridge-agent.service

%postun linuxbridge-agent
%service_del_postun openstack-neutron-linuxbridge-agent.service

%pre openvswitch-agent
%service_add_pre openstack-neutron-openvswitch-agent.service
%service_add_pre openstack-neutron-ovs-cleanup.service

%post openvswitch-agent
%service_add_post openstack-neutron-openvswitch-agent.service
%service_add_post openstack-neutron-ovs-cleanup.service

%preun openvswitch-agent
%service_del_preun openstack-neutron-openvswitch-agent.service
%service_del_preun openstack-neutron-ovs-cleanup.service

%postun openvswitch-agent
%service_del_postun openstack-neutron-openvswitch-agent.service
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun openstack-neutron-ovs-cleanup.service

%pre macvtap-agent
%service_add_pre openstack-neutron-macvtap-agent.service

%post macvtap-agent
%service_add_post openstack-neutron-macvtap-agent.service

%preun macvtap-agent
%service_del_preun openstack-neutron-macvtap-agent.service

%postun macvtap-agent
%service_del_postun openstack-neutron-macvtap-agent.service

%post
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf

%files
%defattr(-,root,root,-)
%doc README.rst
%license LICENSE
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config %{_sysconfdir}/sudoers.d/openstack-neutron
%dir %{_sysconfdir}/%{component}
%dir %{_sysconfdir}/%{component}/%{component}.conf.d/
%dir %{_sysconfdir}/%{component}/%{component}-server.conf.d/
%dir %{_sysconfdir}/%{component}/%{component}-l3-agent.conf.d/
%dir %{_sysconfdir}/%{component}/%{component}-dhcp-agent.conf.d/
%dir %{_sysconfdir}/%{component}/%{component}-metadata-agent.conf.d/
%dir %{_sysconfdir}/%{component}/%{component}-metering-agent.conf.d/
%dir %{_sysconfdir}/%{component}/%{component}-linuxbridge-agent.conf.d/
%dir %{_sysconfdir}/%{component}/%{component}-openvswitch-agent.conf.d/
%{_sysconfdir}/%{component}/README.config
%config(noreplace) %{_sysconfdir}/%{component}/api-paste.ini
%config(noreplace) %{_sysconfdir}/%{component}/plugin.ini
%config %{_sysconfdir}/%{component}/policy.json
%config(noreplace) %attr(0640, root, %{groupname}) %{_sysconfdir}/%{component}/neutron.conf
%config(noreplace) %attr(0640, root, %{groupname}) %{_sysconfdir}/%{component}/%{component}.conf.d/010-%{component}.conf
%config %{_sysconfdir}/%{component}/rootwrap.conf
%dir %{_sysconfdir}/%{component}/rootwrap.d/
%dir %attr(0755, %{username}, %{groupname}) %{_localstatedir}/lib/%{component}
%dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/log/%{component}
%dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/cache/%{component}
%_tmpfilesdir/%name.conf
%dir %{_sysconfdir}/%{component}/plugins
%dir %{_sysconfdir}/%{component}/plugins/ml2/
%config(noreplace) %{_sysconfdir}/%{component}/plugins/ml2/linuxbridge_agent.ini
%config(noreplace) %{_sysconfdir}/%{component}/plugins/ml2/ml2_conf.ini
%config(noreplace) %{_sysconfdir}/%{component}/plugins/ml2/openvswitch_agent.ini
%config(noreplace) %{_sysconfdir}/%{component}/plugins/ml2/sriov_agent.ini
%config %{_sysconfdir}/%{component}/rootwrap.d/iptables-firewall.filters
%config %{_sysconfdir}/%{component}/rootwrap.d/privsep.filters
%config %{_sysconfdir}/%{component}/rootwrap.d/ipset-firewall.filters
%config %{_sysconfdir}/%{component}/rootwrap.d/ebtables.filters
%config %{_sysconfdir}/%{component}/rootwrap.d/dibbler.filters
%config %{_sysconfdir}/%{component}/rootwrap.d/netns-cleanup.filters
%{_bindir}/%{component}-debug
%{_bindir}/%{component}-keepalived-state-change
%{_bindir}/%{component}-netns-cleanup
%{_bindir}/%{component}-ipset-cleanup
%{_bindir}/%{component}-rootwrap
%{_bindir}/%{component}-rootwrap-daemon
%{_bindir}/%{component}-rootwrap-xen-dom0
%{_bindir}/%{component}-sanity-check
%{_bindir}/%{component}-sriov-nic-agent
%{_bindir}/%{component}-usage-audit
%{_mandir}/man1/%{component}.1%{?ext_man}

%files dhcp-agent
%defattr(-,root,root,-)
%license LICENSE
%{_bindir}/%{component}-dhcp-agent
%{_unitdir}/%{name}-dhcp-agent.service
%{_sbindir}/rcopenstack-%{component}-dhcp-agent
%config(noreplace) %{_sysconfdir}/%{component}/dhcp_agent.ini
%config %{_sysconfdir}/%{component}/rootwrap.d/dhcp.filters

%files l3-agent
%defattr(-,root,root,-)
%license LICENSE
%{_bindir}/%{component}-l3-agent
%{_bindir}/%{component}-pd-notify
%config %{_sysconfdir}/%{component}/rootwrap.d/l3.filters
%config(noreplace) %{_sysconfdir}/%{component}/l3_agent.ini
%{_unitdir}/%{name}-l3-agent.service
%{_sbindir}/rcopenstack-%{component}-l3-agent

%files metadata-agent
%defattr(-,root,root,-)
%license LICENSE
%config(noreplace) %{_sysconfdir}/%{component}/metadata_agent.ini
%{_bindir}/%{component}-metadata-agent
%{_unitdir}/%{name}-metadata-agent.service
%{_sbindir}/rcopenstack-%{component}-metadata-agent

%files metering-agent
%defattr(-,root,root,-)
%license LICENSE
%config(noreplace) %{_sysconfdir}/%{component}/metering_agent.ini
%{_bindir}/%{component}-metering-agent
%{_unitdir}/%{name}-metering-agent.service
%{_sbindir}/rcopenstack-%{component}-metering-agent

#%files mlnx-agent
#%defattr(-,root,root,-)
#%license LICENSE
#%dir %{_sysconfdir}/%{component}/plugins/mlnx
#%config(noreplace) %{_sysconfdir}/%{component}/plugins/mlnx/mlnx_conf.ini
#%{_bindir}/%{component}-mlnx-agent
#%{_unitdir}/openstack-%{component}-mlnx-agent.service
#%{_sbindir}/rcopenstack-%{component}-mlnx-agent

#files ofagent-agent
#defattr(-,root,root,-)
#doc LICENSE
#{_bindir}/%{component}-ofagent-agent
#config %{_sysconfdir}/%{component}/rootwrap.d/ofagent.filters

%files linuxbridge-agent
%defattr(-,root,root,-)
%license LICENSE
%{_bindir}/%{component}-linuxbridge-agent
%{_bindir}/%{component}-linuxbridge-cleanup
%config %{_sysconfdir}/%{component}/rootwrap.d/linuxbridge-plugin.filters
%dir %{_sysconfdir}/%{component}/plugins/ml2/
%{_unitdir}/%{name}-linuxbridge-agent.service
%{_sbindir}/rcopenstack-%{component}-linuxbridge-agent

%files openvswitch-agent
%defattr(-,root,root,-)
%license LICENSE
%dir %{_sysconfdir}/%{component}/plugins/ml2/
%{_bindir}/%{component}-openvswitch-agent
%{_bindir}/%{component}-ovs-cleanup
%{_unitdir}/%{name}-ovs-cleanup.service
%{_sbindir}/rcopenstack-%{component}-ovs-cleanup
%config %{_sysconfdir}/%{component}/rootwrap.d/openvswitch-plugin.filters
%{_unitdir}/%{name}-openvswitch-agent.service
%{_sbindir}/rcopenstack-%{component}-openvswitch-agent

%files macvtap-agent
%defattr(-,root,root,-)
%license LICENSE
%dir %{_sysconfdir}/%{component}/plugins/ml2/
%config(noreplace) %{_sysconfdir}/%{component}/plugins/ml2/macvtap_agent.ini
%{_bindir}/%{component}-macvtap-agent
%{_unitdir}/%{name}-macvtap-agent.service
%{_sbindir}/rcopenstack-%{component}-macvtap-agent

%files server
%defattr(-,root,root,-)
%license LICENSE
%{_bindir}/%{component}-api
%{_bindir}/%{component}-server
%{_bindir}/%{component}-rpc-server
%{_bindir}/%{component}-db-manage
%{_unitdir}/openstack-%{component}.service
%{_sbindir}/rcopenstack-%{component}

%files -n python-neutron
%defattr(-,root,root,-)
%license LICENSE
%{python_sitelib}/%{component}/
%{python_sitelib}/%{component}-*.egg-info
# tempest test must be in python-neutron (because of entry point)
%exclude %{python_sitelib}/%{component}/tests/contrib
%exclude %{python_sitelib}/%{component}/tests/unit
%exclude %{python_sitelib}/%{component}/tests/retargetable
%exclude %{python_sitelib}/%{component}/tests/functional
%exclude %{python_sitelib}/%{component}/tests/fullstack

%files test
%defattr(-,root,root)
%{_localstatedir}/lib/%{name}-test/
%{python_sitelib}/%{component}/tests/contrib
%{python_sitelib}/%{component}/tests/unit
%{python_sitelib}/%{component}/tests/functional
%{python_sitelib}/%{component}/tests/fullstack
%config %{_sysconfdir}/%{component}/rootwrap.d/debug.filters

%files ha-tool
%defattr(-,root,root,-)
%{_bindir}/neutron-ha-tool
%{_bindir}/neutron-evacuate-lbaasv2-agent

%changelog
openSUSE Build Service is sponsored by