e577ef82d3ad42f17acae24856e89a33bf5f3506
[openstack-build/neutron-build.git] / centos7 / rpm / SPECS / openstack-neutron.spec
1 %global service neutron
2
3 Name:       openstack-%{service}
4 Version:    7.0.0.0b3
5 Release:    1%{?dist}
6 Epoch:      1
7 Summary:    OpenStack Networking Service
8
9 License:    ASL 2.0
10 URL:        http://launchpad.net/%{service}/
11
12 Source0:    %{service}-%{version}.tar.gz
13 Source1:    %{service}.logrotate
14 Source2:    %{service}-sudoers
15 Source10:   neutron-server.service
16 Source11:   neutron-linuxbridge-agent.service
17 Source12:   neutron-openvswitch-agent.service
18 Source15:   neutron-dhcp-agent.service
19 Source16:   neutron-l3-agent.service
20 Source17:   neutron-metadata-agent.service
21 Source18:   neutron-ovs-cleanup.service
22 Source19:   neutron-mlnx-agent.service
23 Source20:   neutron-metering-agent.service
24 Source21:   neutron-sriov-nic-agent.service
25 Source22:   neutron-netns-cleanup.service
26 Source23:   neutron-netns-cleanup.init
27 Source24:   neutron-ovs-cleanup.init
28 Source28:   neutron-dev-server.service
29 Source29:   neutron-rpc-server.service
30
31 Source30:   %{service}-dist.conf
32 Source31:   conf.README
33
34 BuildArch:  noarch
35
36 BuildRequires:  python2-devel
37 BuildRequires:  python-d2to1
38 BuildRequires:  python-pbr
39 BuildRequires:  python-pecan
40 BuildRequires:  python-setuptools
41 BuildRequires:  systemd-units
42
43 BuildRequires:  git
44
45 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
46
47 # dnsmasq is not a hard requirement, but is currently the only option
48 # when neutron-dhcp-agent is deployed.
49 Requires:   dnsmasq
50 Requires:   dnsmasq-utils
51
52 # radvd is not a hard requirement, but is currently the only option
53 # for IPv6 deployments.
54 Requires:   radvd
55
56 # dibbler is not a hard requirement, but is currently the default option
57 # for IPv6 prefix delegation.
58 #Requires:  dibbler-client
59
60 # conntrack is not a hard requirement, but is currently used by L3 agent
61 # to immediately drop connections after a floating IP is disassociated
62 Requires:   conntrack-tools
63
64 # keepalived is not a hard requirement, but is currently used by DVR L3
65 # agent
66 Requires:   keepalived
67
68 # those are not hard requirements, but are used to implement firewall
69 # drivers.
70 Requires:   ipset
71 Requires:   iptables
72
73 Requires(pre): shadow-utils
74 Requires(post): systemd
75 Requires(preun): systemd
76 Requires(postun): systemd
77
78 %description
79 Neutron is a virtual network service for Openstack. Just like
80 OpenStack Nova provides an API to dynamically request and configure
81 virtual servers, Neutron provides an API to dynamically request and
82 configure virtual networks. These networks connect "interfaces" from
83 other OpenStack services (e.g., virtual NICs from Nova VMs). The
84 Neutron API supports extensions to provide advanced network
85 capabilities (e.g., QoS, ACLs, network monitoring, etc.)
86
87
88 %package -n python-%{service}
89 Summary:    Neutron Python libraries
90 Requires:   MySQL-python
91 Requires:   python-alembic >= 0.8.0
92 Requires:   python-debtcollector >= 0.3.0
93 Requires:   python-eventlet >= 0.17.4
94 Requires:   python-greenlet >= 0.3.2
95 Requires:   python-httplib2 >= 0.7.5
96 Requires:   python-jinja2 >= 2.6
97 Requires:   python-keystoneclient >= 1:1.6.0
98 Requires:   python-keystonemiddleware >= 2.0.0
99 Requires:   python-netaddr >= 0.7.12
100 Requires:   python-neutronclient >= 2.6.0
101 Requires:   python-novaclient >= 1:2.26.0
102 Requires:   python-oslo-concurrency >= 2.3.0
103 Requires:   python-oslo-config >= 2:2.1.0
104 Requires:   python-oslo-context >= 0.2.0
105 Requires:   python-oslo-db >= 2.0
106 Requires:   python-oslo-i18n >= 1.5.0
107 Requires:   python-oslo-log >= 1.8.0
108 Requires:   python-oslo-messaging >= 1.16.0
109 Requires:   python-oslo-middleware >= 2.4.0
110 Requires:   python-oslo-policy >= 0.5.0
111 Requires:   python-oslo-rootwrap >= 2.0.0
112 Requires:   python-oslo-serialization >= 1.4.0
113 Requires:   python-oslo-service >= 0.6.0
114 Requires:   python-oslo-utils >= 2.0.0
115 Requires:   python-oslo-versionedobjects >= 0.6.0
116 Requires:   python-oslo-context >= 0.2.0
117 Requires:   python-paste
118 Requires:   python-paste-deploy >= 1.5.0
119 Requires:   python-pecan >= 1.0.0
120 Requires:   python-pbr
121 Requires:   python-pyroute2
122 Requires:   python-requests >= 2.5.2
123 Requires:   python-retrying >= 1.2.3
124 Requires:   python-routes >= 1.12.3
125 Requires:   python-six >= 1.9.0
126 Requires:   python-sqlalchemy >= 0.9.7
127 Requires:   python-stevedore >= 1.5.0
128 Requires:   python-webob >= 1.2.3
129 Requires:   python-unicodecsv
130
131
132
133 %description -n python-%{service}
134 Neutron provides an API to dynamically request and configure virtual
135 networks.
136
137 This package contains the Neutron Python library.
138
139
140 %package -n python-%{service}-tests
141 Summary:    Neutron tests
142 Requires:   openstack-%{service} = %{epoch}:%{version}-%{release}
143
144
145 %description -n python-%{service}-tests
146 Neutron provides an API to dynamically request and configure virtual
147 networks.
148
149 This package contains Neutron test files.
150
151
152 %package common
153 Summary:    Neutron common files
154 Requires:   python-%{service} = %{epoch}:%{version}-%{release}
155 Requires:   sudo
156
157
158 %description common
159 Neutron provides an API to dynamically request and configure virtual
160 networks.
161
162 This package contains Neutron common files.
163
164
165 %package bigswitch
166 Summary:    Neutron Big Switch plugin
167 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
168
169
170 %description bigswitch
171 Neutron provides an API to dynamically request and configure virtual
172 networks.
173
174 This package contains the Neutron plugin that implements virtual
175 networks using the FloodLight Openflow Controller or the Big Switch
176 Networks Controller.
177
178
179 %package brocade
180 Summary:    Neutron Brocade plugin
181 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
182 Requires:   python-ncclient
183
184
185 %description brocade
186 Neutron provides an API to dynamically request and configure virtual
187 networks.
188
189 This package contains the Neutron plugin that implements virtual
190 networks using Brocade VCS switches running NOS.
191
192
193 %package cisco
194 Summary:    Neutron Cisco plugin
195 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
196 Requires:   python-ncclient
197
198
199 %description cisco
200 Neutron provides an API to dynamically request and configure virtual
201 networks.
202
203 This package contains the Neutron plugin that implements virtual
204 networks using Cisco UCS and Nexus.
205
206
207 %package dev-server
208 Summary:    Neutron Server (WSGI pecan)
209 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
210
211
212 %description dev-server
213 Neutron provides an API to dynamically request and configure virtual
214 networks.
215
216 This package contains an alternative Neutron server implementation that uses
217 pecan library as its WSGI backend.
218
219
220 %package embrane
221 Summary:    Neutron Embrane plugin
222 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
223
224
225 %description embrane
226 Neutron provides an API to dynamically request and configure virtual
227 networks.
228
229 This package contains the Neutron plugin that implements virtual
230 L3-L7 network services using Embrane's heleos platform.
231
232
233 %package linuxbridge
234 Summary:    Neutron linuxbridge plugin
235 Requires:   bridge-utils
236 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
237
238
239 %description linuxbridge
240 Neutron provides an API to dynamically request and configure virtual
241 networks.
242
243 This package contains the Neutron plugin that implements virtual
244 networks as VLANs using Linux bridging.
245
246
247 %package mellanox
248 Summary:    Neutron Mellanox plugin
249 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
250
251
252 %description mellanox
253 This plugin implements Neutron v2 APIs with support for Mellanox embedded
254 switch functionality as part of the VPI (Ethernet/InfiniBand) HCA.
255
256
257 %package midonet
258 Summary:    Neutron MidoNet plugin
259 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
260
261
262 %description midonet
263 Neutron provides an API to dynamically request and configure virtual
264 networks.
265
266 This package contains the Neutron plugin that implements virtual
267 networks using MidoNet from Midokura.
268
269
270 %package ml2
271 Summary:    Neutron ML2 plugin
272 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
273 # needed for brocade and cisco drivers
274 Requires:   python-ncclient
275
276
277 %description ml2
278 Neutron provides an API to dynamically request and configure virtual
279 networks.
280
281 This package contains a Neutron plugin that allows the use of drivers
282 to support separately extensible sets of network types and the mechanisms
283 for accessing those types.
284
285
286 %package nuage
287 Summary:    Neutron Nuage plugin
288 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
289
290
291 %description nuage
292 This plugin implements Neutron v2 APIs with support for Nuage Networks
293 Virtual Service Platform (VSP).
294
295
296 %package ofagent
297 Summary:    Neutron ofagent plugin from ryu project
298 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
299
300
301 %description ofagent
302 This plugin implements Neutron v2 APIs with support for the ryu ofagent
303 plugin.
304
305
306 %package oneconvergence-nvsd
307 Summary:    Neutron One Convergence NVSD plugin
308 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
309
310
311 %description oneconvergence-nvsd
312 Neutron provides an API to dynamnically request and configure virtual
313 networks.
314
315 This package contains the Neutron plugin that implements virtual
316 networks using One Convergence NVSD
317
318
319 %package opencontrail
320 Summary:    Neutron OpenContrail plugin
321 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
322
323
324 %description opencontrail
325 This plugin implements Neutron v2 APIs with support for the OpenContrail
326 plugin.
327
328
329 %package openvswitch
330 Summary:    Neutron openvswitch plugin
331 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
332 # We require openvswitch when using vsctl to access ovsdb;
333 # but if we use native access, then we just need python bindings.
334 # since we don't know what users actually use, we depend on both.
335 Requires:   openvswitch
336 Requires:   python-openvswitch
337
338
339 %description openvswitch
340 Neutron provides an API to dynamically request and configure virtual
341 networks.
342
343 This package contains the Neutron plugin that implements virtual
344 networks using Open vSwitch.
345
346
347 %package ovsvapp
348 Summary:    Neutron OVSvApp vSphere plugin
349 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
350
351
352 %description ovsvapp
353 Neutron provides an API to dynamically request and configure virtual
354 networks.
355
356 This package contains the Neutron plugin that implements virtual
357 networks using OVSvApp vSphere L2 agent.
358
359
360 %package metering-agent
361 Summary:    Neutron bandwidth metering agent
362 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
363
364
365 %description metering-agent
366 Neutron provides an API to measure bandwidth utilization
367
368 This package contains the Neutron agent responsible for generating bandwidth
369 utilization notifications.
370
371
372 %package rpc-server
373 Summary:    Neutron (RPC only) Server
374 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
375
376
377 %description rpc-server
378 Neutron provides an API to dynamically request and configure virtual
379 networks.
380
381 This package contains an alternative Neutron server that handles AMQP RPC
382 workload only.
383
384
385 %package sriov-nic-agent
386 Summary:    Neutron SR-IOV NIC agent
387 Requires:   openstack-%{service}-common = %{epoch}:%{version}-%{release}
388
389
390 %description sriov-nic-agent
391 Neutron allows to run virtual instances using SR-IOV NIC hardware
392
393 This package contains the Neutron agent to support advanced features of
394 SR-IOV network cards.
395
396
397 %package doc
398 Summary:    Documentation for OpenStack Neutron
399 Group:      Documentation
400
401 BuildRequires:  python-sphinx
402 BuildRequires:  python-oslo-sphinx
403 BuildRequires:  python-alembic >= 0.8.0
404 BuildRequires:  python-debtcollector >= 0.3.0
405 BuildRequires:  python-eventlet >= 0.17.4
406 BuildRequires:  python-greenlet >= 0.3.2
407 BuildRequires:  python-httplib2 >= 0.7.5
408 BuildRequires:  python-jinja2 >= 2.6
409 BuildRequires:  python-keystoneclient >= 1:1.6.0
410 BuildRequires:  python-keystonemiddleware >= 2.0.0
411 BuildRequires:  python-netaddr >= 0.7.12
412 BuildRequires:  python-neutronclient >= 2.6.0
413 BuildRequires:  python-novaclient >= 1:2.26.0
414 BuildRequires:  python-oslo-concurrency >= 2.3.0
415 BuildRequires:  python-oslo-config >= 2:2.1.0
416 BuildRequires:  python-oslo-context >= 0.2.0
417 BuildRequires:  python-oslo-db >= 2.0
418 BuildRequires:  python-oslo-i18n >= 1.5.0
419 BuildRequires:  python-oslo-log >= 1.8.0
420 BuildRequires:  python-oslo-messaging >= 1.16.0
421 BuildRequires:  python-oslo-middleware >= 2.4.0
422 BuildRequires:  python-oslo-policy >= 0.5.0
423 BuildRequires:  python-oslo-rootwrap >= 2.0.0
424 BuildRequires:  python-oslo-serialization >= 1.4.0
425 BuildRequires:  python-oslo-service >= 0.6.0
426 BuildRequires:  python-oslo-utils >= 2.0.0
427 BuildRequires:  python-oslo-versionedobjects >= 0.6.0
428 BuildRequires:  python-oslo-context >= 0.2.0
429 BuildRequires:  python-paste
430 BuildRequires:  python-paste-deploy >= 1.5.0
431 BuildRequires:  python-pecan >= 1.0.0
432 BuildRequires:  python-pbr
433 BuildRequires:  python-pyroute2
434 BuildRequires:  python-requests >= 2.5.2
435 BuildRequires:  python-retrying >= 1.2.3
436 BuildRequires:  python-routes >= 1.12.3
437 BuildRequires:  python-six >= 1.9.0
438 BuildRequires:  python-sqlalchemy >= 0.9.7
439 BuildRequires:  python-stevedore >= 1.5.0
440 BuildRequires:  python-webob >= 1.2.3
441 BuildRequires:  python-testresources
442 BuildRequires:  python-testscenarios
443 BuildRequires:  python-oslotest
444
445 %description doc
446 Documentation for Openstack Neutron.
447
448
449 %prep
450 %autosetup -n %{service}-%{version} -S git
451
452 find %{service} -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
453
454 # Let's handle dependencies ourseleves
455 rm -f requirements.txt
456
457 # Kill egg-info in order to generate new SOURCES.txt
458 rm -rf neutron.egg-info
459
460 %build
461 export SKIP_PIP_INSTALL=1
462 %{__python2} setup.py build
463
464 # Loop through values in neutron-dist.conf and make sure that the values
465 # are substituted into the neutron.conf as comments. Some of these values
466 # will have been uncommented as a way of upstream setting defaults outside
467 # of the code. For notification_driver, there are commented examples
468 # above uncommented settings, so this specifically skips those comments
469 # and instead comments out the actual settings and substitutes the
470 # correct default values.
471 while read name eq value; do
472   test "$name" && test "$value" || continue
473   if [ "$name" = "notification_driver" ]; then
474     sed -ri "0,/^$name *=/{s!^$name *=.*!# $name = $value!}" etc/%{service}.conf
475   else
476     sed -ri "0,/^(#)? *$name *=/{s!^(#)? *$name *=.*!# $name = $value!}" etc/%{service}.conf
477   fi
478 done < %{SOURCE30}
479
480 %install
481 # pbr does not like dashes in version strings, neither it likes fc* prefixes (dev* is fine)
482 #export PBR_VERSION=%{version}.%(echo %{release} | sed 's/%{?dist}//')
483 %{__python2} setup.py install -O1 --skip-build --root %{buildroot}
484
485 # Remove unused files
486 rm -rf %{buildroot}%{python2_sitelib}/bin
487 rm -rf %{buildroot}%{python2_sitelib}/doc
488 rm -rf %{buildroot}%{python2_sitelib}/tools
489 rm %{buildroot}/usr/etc/init.d/neutron-server
490
491 # Build HTML docs
492 export PYTHONPATH="$( pwd ):$PYTHONPATH"
493 sphinx-build -b html doc/source html
494
495 # Fix hidden-file-or-dir warnings
496 rm -fr html/.doctrees html/.buildinfo
497
498 # Move rootwrap files to proper location
499 install -d -m 755 %{buildroot}%{_datarootdir}/%{service}/rootwrap
500 mv %{buildroot}/usr/etc/%{service}/rootwrap.d/*.filters %{buildroot}%{_datarootdir}/%{service}/rootwrap
501
502 # Move config files to proper location
503 install -d -m 755 %{buildroot}%{_sysconfdir}/%{service}
504 mv %{buildroot}/usr/etc/%{service}/* %{buildroot}%{_sysconfdir}/%{service}
505 mv %{buildroot}%{_sysconfdir}/%{service}/api-paste.ini %{buildroot}%{_datadir}/%{service}/api-paste.ini
506 chmod 640 %{buildroot}%{_sysconfdir}/%{service}/plugins/*/*.ini
507
508 # Install logrotate
509 install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-%{service}
510
511 # Install sudoers
512 install -p -D -m 440 %{SOURCE2} %{buildroot}%{_sysconfdir}/sudoers.d/%{service}
513
514 # Install systemd units
515 install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/neutron-server.service
516 install -p -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/neutron-linuxbridge-agent.service
517 install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/neutron-openvswitch-agent.service
518 install -p -D -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/neutron-dhcp-agent.service
519 install -p -D -m 644 %{SOURCE16} %{buildroot}%{_unitdir}/neutron-l3-agent.service
520 install -p -D -m 644 %{SOURCE17} %{buildroot}%{_unitdir}/neutron-metadata-agent.service
521 install -p -D -m 644 %{SOURCE18} %{buildroot}%{_unitdir}/neutron-ovs-cleanup.service
522 install -p -D -m 644 %{SOURCE19} %{buildroot}%{_unitdir}/neutron-mlnx-agent.service
523 install -p -D -m 644 %{SOURCE20} %{buildroot}%{_unitdir}/neutron-metering-agent.service
524 install -p -D -m 644 %{SOURCE21} %{buildroot}%{_unitdir}/neutron-sriov-nic-agent.service
525 install -p -D -m 644 %{SOURCE22} %{buildroot}%{_unitdir}/neutron-netns-cleanup.service
526 install -p -D -m 644 %{SOURCE28} %{buildroot}%{_unitdir}/neutron-dev-server.service
527 install -p -D -m 644 %{SOURCE29} %{buildroot}%{_unitdir}/neutron-rpc-server.service
528
529
530 # Install scripts for pacemaker support
531 install -p -D -m 755 %{SOURCE23} %{buildroot}%{_prefix}/lib/ocf/lib/neutron/neutron-netns-cleanup
532 install -p -D -m 755 %{SOURCE24} %{buildroot}%{_prefix}/lib/ocf/lib/neutron/neutron-ovs-cleanup
533
534 # Install README file that describes how to configure services with custom configuration files
535 install -p -D -m 755 %{SOURCE31} %{buildroot}%{_sysconfdir}/%{service}/conf.d/README
536
537 # Setup directories
538 install -d -m 755 %{buildroot}%{_datadir}/%{service}
539 install -d -m 755 %{buildroot}%{_sharedstatedir}/%{service}
540 install -d -m 755 %{buildroot}%{_localstatedir}/log/%{service}
541 install -d -m 755 %{buildroot}%{_localstatedir}/run/%{service}
542
543 # Install dist conf
544 install -p -D -m 640 %{SOURCE30} %{buildroot}%{_datadir}/%{service}/%{service}-dist.conf
545
546 # Create and populate configuration directory for L3 agent that is not accessible for user modification
547 mkdir -p %{buildroot}%{_datadir}/%{service}/l3_agent
548 ln -s %{_sysconfdir}/%{service}/l3_agent.ini %{buildroot}%{_datadir}/%{service}/l3_agent/l3_agent.conf
549
550 # Create dist configuration directory for neutron-server (may be filled by advanced services)
551 mkdir -p %{buildroot}%{_datadir}/%{service}/server
552
553 # Create configuration directories for all services that can be populated by users with custom *.conf files
554 mkdir -p %{buildroot}/%{_sysconfdir}/%{service}/conf.d/common
555 for service in server dev-server rpc-server ovs-cleanup netns-cleanup; do
556     mkdir -p %{buildroot}/%{_sysconfdir}/%{service}/conf.d/%{service}-$service
557 done
558 for service in linuxbridge openvswitch dhcp l3 metadata mlnx metering sriov-nic; do
559     mkdir -p %{buildroot}/%{_sysconfdir}/%{service}/conf.d/%{service}-$service-agent
560 done
561
562 # Kill hyperv agent since it's of no use for Linux
563 rm %{buildroot}/%{_bindir}/neutron-hyperv-agent
564
565
566 %pre common
567 getent group %{service} >/dev/null || groupadd -r %{service}
568 getent passwd %{service} >/dev/null || \
569     useradd -r -g %{service} -d %{_sharedstatedir}/%{service} -s /sbin/nologin \
570     -c "OpenStack Neutron Daemons" %{service}
571 exit 0
572
573
574 %post
575 %systemd_post neutron-dhcp-agent.service
576 %systemd_post neutron-l3-agent.service
577 %systemd_post neutron-metadata-agent.service
578 %systemd_post neutron-server.service
579 %systemd_post neutron-netns-cleanup.service
580 %systemd_post neutron-ovs-cleanup.service
581
582
583 %preun
584 %systemd_preun neutron-dhcp-agent.service
585 %systemd_preun neutron-l3-agent.service
586 %systemd_preun neutron-metadata-agent.service
587 %systemd_preun neutron-server.service
588 %systemd_preun neutron-netns-cleanup.service
589 %systemd_preun neutron-ovs-cleanup.service
590
591
592 %postun
593 %systemd_postun_with_restart neutron-dhcp-agent.service
594 %systemd_postun_with_restart neutron-l3-agent.service
595 %systemd_postun_with_restart neutron-metadata-agent.service
596 %systemd_postun_with_restart neutron-server.service
597
598
599 %post linuxbridge
600 %systemd_post neutron-linuxbridge-agent.service
601 oldconf=%{_sysconfdir}/%{service}/plugins/linuxbridge/linuxbridge_conf.ini
602 newconf=%{_sysconfdir}/%{service}/plugins/ml2/linuxbridge_agent.ini
603 if [ $1 -gt 1 ]; then
604     if [ -e $oldconf ]; then
605         # Imitate noreplace
606         cp $newconf ${newconf}.rpmnew
607         cp $oldconf $newconf
608     fi
609 fi
610
611
612 %preun linuxbridge
613 %systemd_preun neutron-linuxbridge-agent.service
614
615
616 %postun linuxbridge
617 %systemd_postun_with_restart neutron-linuxbridge-agent.service
618
619
620 %post mellanox
621 %systemd_post neutron-mlnx-agent.service
622
623
624 %preun mellanox
625 %systemd_preun neutron-mlnx-agent.service
626
627
628 %postun mellanox
629 %systemd_postun_with_restart neutron-mlnx-agent.service
630
631
632 %post openvswitch
633 %systemd_post neutron-openvswitch-agent.service
634 oldconf=%{_sysconfdir}/%{service}/plugins/openvswitch/ovs_neutron_plugin.ini
635 newconf=%{_sysconfdir}/%{service}/plugins/ml2/openvswitch_agent.ini
636 if [ $1 -gt 1 ]; then
637     if [ -e $oldconf ]; then
638         # Imitate noreplace
639         cp $newconf ${newconf}.rpmnew
640         cp $oldconf $newconf
641     fi
642 fi
643
644
645 %preun openvswitch
646 %systemd_preun neutron-openvswitch-agent.service
647
648
649 %postun openvswitch
650 %systemd_postun_with_restart neutron-openvswitch-agent.service
651
652
653 %post metering-agent
654 %systemd_post neutron-metering-agent.service
655
656
657 %preun metering-agent
658 %systemd_preun neutron-metering-agent.service
659
660
661 %postun metering-agent
662 %systemd_postun_with_restart neutron-metering-agent.service
663
664
665 %post sriov-nic-agent
666 %systemd_post neutron-sriov-nic-agent.service
667
668
669 %preun sriov-nic-agent
670 %systemd_preun neutron-sriov-nic-agent.service
671
672
673 %postun sriov-nic-agent
674 %systemd_postun_with_restart neutron-sriov-nic-agent.service
675
676
677 %files
678 %license LICENSE
679 %{_bindir}/neutron-db-manage
680 %{_bindir}/neutron-debug
681 %{_bindir}/neutron-dhcp-agent
682 %{_bindir}/neutron-ipset-cleanup
683 %{_bindir}/neutron-keepalived-state-change
684 %{_bindir}/neutron-l3-agent
685 %{_bindir}/neutron-metadata-agent
686 %{_bindir}/neutron-netns-cleanup
687 %{_bindir}/neutron-ns-metadata-proxy
688 %{_bindir}/neutron-ovs-cleanup
689 %{_bindir}/neutron-pd-notify
690 %{_bindir}/neutron-sanity-check
691 %{_bindir}/neutron-server
692 %{_bindir}/neutron-usage-audit
693 %{_prefix}/lib/ocf/lib/neutron/neutron-netns-cleanup
694 %{_prefix}/lib/ocf/lib/neutron/neutron-ovs-cleanup
695 %{_unitdir}/neutron-dhcp-agent.service
696 %{_unitdir}/neutron-l3-agent.service
697 %{_unitdir}/neutron-metadata-agent.service
698 %{_unitdir}/neutron-server.service
699 %{_unitdir}/neutron-netns-cleanup.service
700 %{_unitdir}/neutron-ovs-cleanup.service
701 %attr(-, root, %{service}) %{_datadir}/%{service}/api-paste.ini
702 %dir %{_datadir}/%{service}/l3_agent
703 %dir %{_datadir}/%{service}/server
704 %{_datadir}/%{service}/l3_agent/*.conf
705 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/dhcp_agent.ini
706 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/l3_agent.ini
707 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/metadata_agent.ini
708 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/policy.json
709 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-dhcp-agent
710 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-l3-agent
711 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-metadata-agent
712 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-server
713 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-netns-cleanup
714 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-ovs-cleanup
715
716
717 %files -n python-%{service}-tests
718 %license LICENSE
719 %{python2_sitelib}/%{service}/tests
720
721
722 %files -n python-%{service}
723 %license LICENSE
724 %{python2_sitelib}/%{service}
725 %{python2_sitelib}/%{service}-*.egg-info
726 %exclude %{python2_sitelib}/%{service}/tests
727
728
729 %files common
730 %license LICENSE
731 %doc README.rst
732 %{_bindir}/neutron-rootwrap
733 %{_bindir}/neutron-rootwrap-daemon
734 %{_bindir}/neutron-rootwrap-xen-dom0
735 %dir %{_sysconfdir}/%{service}
736 %{_sysconfdir}/%{service}/conf.d/README
737 %dir %{_sysconfdir}/%{service}/conf.d
738 %dir %{_sysconfdir}/%{service}/conf.d/common
739 %dir %{_sysconfdir}/%{service}/plugins
740 %attr(-, root, %{service}) %{_datadir}/%{service}/%{service}-dist.conf
741 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/%{service}.conf
742 %config(noreplace) %{_sysconfdir}/%{service}/rootwrap.conf
743 %config(noreplace) %{_sysconfdir}/logrotate.d/*
744 %{_sysconfdir}/sudoers.d/%{service}
745 %dir %attr(0755, %{service}, %{service}) %{_sharedstatedir}/%{service}
746 %dir %attr(0750, %{service}, %{service}) %{_localstatedir}/log/%{service}
747 %dir %{_datarootdir}/%{service}
748 %dir %{_datarootdir}/%{service}/rootwrap
749 %{_datarootdir}/%{service}/rootwrap/debug.filters
750 %{_datarootdir}/%{service}/rootwrap/dhcp.filters
751 %{_datarootdir}/%{service}/rootwrap/ebtables.filters
752 %{_datarootdir}/%{service}/rootwrap/ipset-firewall.filters
753 %{_datarootdir}/%{service}/rootwrap/iptables-firewall.filters
754 %{_datarootdir}/%{service}/rootwrap/l3.filters
755
756
757 %files bigswitch
758 %license LICENSE
759 %{_bindir}/neutron-restproxy-agent
760 %dir %{_sysconfdir}/%{service}/plugins/bigswitch
761 %{_sysconfdir}/%{service}/plugins/bigswitch/ssl
762 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/bigswitch/*.ini
763
764
765 %files brocade
766 %license LICENSE
767 %doc %{service}/plugins/brocade/README.md
768 %dir %{_sysconfdir}/%{service}/plugins/brocade
769 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/brocade/*.ini
770 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/brocade/vyatta/*.ini
771
772
773 %files cisco
774 %license LICENSE
775 %dir %{_sysconfdir}/%{service}/plugins/cisco
776 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/cisco/*.ini
777
778
779 %files embrane
780 %license LICENSE
781 %doc %{service}/plugins/embrane/README
782 %dir %{_sysconfdir}/%{service}/plugins/embrane
783 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/embrane/*.ini
784
785
786 %files dev-server
787 %license LICENSE
788 %{_bindir}/neutron-dev-server
789 %{_unitdir}/neutron-dev-server.service
790 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-dev-server
791
792
793 %files linuxbridge
794 %license LICENSE
795 %{_bindir}/neutron-linuxbridge-agent
796 %{_unitdir}/neutron-linuxbridge-agent.service
797 %{_datarootdir}/%{service}/rootwrap/linuxbridge-plugin.filters
798 %dir %{_sysconfdir}/%{service}/plugins/ml2
799 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/ml2/linuxbridge_agent.ini
800 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-linuxbridge-agent
801
802
803 %files mellanox
804 %license LICENSE
805 %doc %{service}/plugins/ml2/drivers/mlnx/README
806 %{_bindir}/neutron-mlnx-agent
807 %{_unitdir}/neutron-mlnx-agent.service
808 %dir %{_sysconfdir}/%{service}/plugins/mlnx
809 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/mlnx/*.ini
810 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-mlnx-agent
811
812
813 %files midonet
814 %license LICENSE
815 #%doc %{service}/plugins/midonet/README
816 %dir %{_sysconfdir}/%{service}/plugins/midonet
817 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/midonet/*.ini
818
819
820 %files ml2
821 %license LICENSE
822 %doc %{service}/plugins/ml2/README
823 %dir %{_sysconfdir}/%{service}/plugins/ml2
824 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/ml2/*.ini
825 %exclude %{_sysconfdir}/%{service}/plugins/ml2/linuxbridge_agent.ini
826 %exclude %{_sysconfdir}/%{service}/plugins/ml2/openvswitch_agent.ini
827
828
829 %files nuage
830 %license LICENSE
831 %{python2_sitelib}/%{service}/plugins/nuage
832 %dir %{_sysconfdir}/%{service}/plugins/nuage
833 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/nuage/*.ini
834
835
836 %files ofagent
837 %license LICENSE
838
839
840 %files oneconvergence-nvsd
841 %license LICENSE
842 %doc %{service}/plugins/oneconvergence/README
843 %dir %{_sysconfdir}/%{service}/plugins/oneconvergence
844 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/oneconvergence/*.ini
845 %{_bindir}/neutron-nvsd-agent
846
847
848 %files opencontrail
849 %license LICENSE
850 #%doc %{service}/plugins/opencontrail/README
851 %dir %{_sysconfdir}/%{service}/plugins/opencontrail
852 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/opencontrail/*.ini
853
854
855 %files openvswitch
856 %license LICENSE
857 %{_bindir}/neutron-openvswitch-agent
858 %{_unitdir}/neutron-openvswitch-agent.service
859 %{_datarootdir}/%{service}/rootwrap/openvswitch-plugin.filters
860 %dir %{_sysconfdir}/%{service}/plugins/ml2
861 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/ml2/openvswitch_agent.ini
862 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-openvswitch-agent
863
864
865 %files ovsvapp
866 %license LICENSE
867 %{_bindir}/neutron-ovsvapp-agent
868 # TODO: add a systemd unit file
869 %dir %{_sysconfdir}/%{service}/plugins/ovsvapp
870 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/ovsvapp/*.ini
871
872
873 %files metering-agent
874 %license LICENSE
875 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/metering_agent.ini
876 %{_unitdir}/neutron-metering-agent.service
877 %{_bindir}/neutron-metering-agent
878 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-metering-agent
879
880
881 %files rpc-server
882 %license LICENSE
883 %{_bindir}/neutron-rpc-server
884 %{_unitdir}/neutron-rpc-server.service
885 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-rpc-server
886
887
888 %files sriov-nic-agent
889 %license LICENSE
890 %{_unitdir}/neutron-sriov-nic-agent.service
891 %{_bindir}/neutron-sriov-nic-agent
892 %config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/ml2/sriov_agent.ini
893 %dir %{_sysconfdir}/%{service}/conf.d/%{service}-sriov-nic-agent
894
895
896 %files doc
897 %license LICENSE
898 %doc html
899
900
901 %changelog
902 * Fri Nov 6 2015 Sergey Kolekonov <skolekonov@mirantis.com> 7.0.0
903 - Update specs for 7.0.0 release
904 * Thu Sep 3 2015 Sergey Kolekonov <skolekonov@mirantis.com> 7.0.0.0b3
905 - Update specs for Liberty release