Add distributed traffic feature
This commit is contained in:
parent
d5795208be
commit
784a5b2e38
2583
0001-add-distributed-traffic-feature-support.patch
Normal file
2583
0001-add-distributed-traffic-feature-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,15 @@
|
||||
%define gitPatch() \
|
||||
cd %1; \
|
||||
git init && git config user.name "openstack-plugin" && git config user.email "openstack-plugin"; \
|
||||
git add . && git commit -m "openstack-plugin init"; \
|
||||
git apply --check %2 || exit 1 && git apply %2; \
|
||||
git add . && git commit -m "openstack-plugin patch"
|
||||
|
||||
%define gitUnPatch() \
|
||||
cd %1;\
|
||||
git reset --hard HEAD~;\
|
||||
rm -rf %1/.git
|
||||
|
||||
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
||||
%global service neutron
|
||||
|
||||
@ -18,7 +30,7 @@ capabilities (e.g., QoS, ACLs, network monitoring, etc.)
|
||||
|
||||
Name: openstack-%{service}
|
||||
Version: 15.3.4
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: OpenStack Networking Service
|
||||
|
||||
License: ASL 2.0
|
||||
@ -51,6 +63,7 @@ Source34: neutron-l2-agent-sysctl.conf
|
||||
# essentially because .modules files are shell scripts.
|
||||
Source35: neutron-l2-agent.modules
|
||||
Source36: neutron-destroy-patch-ports.service
|
||||
Source37: 0001-add-distributed-traffic-feature-support.patch
|
||||
# Required for tarball sources verification
|
||||
|
||||
BuildArch: noarch
|
||||
@ -354,9 +367,18 @@ Requires: openstack-%{service}-common = %{version}-%{release}
|
||||
This package contains the Neutron agent to support advanced features of
|
||||
SR-IOV network cards.
|
||||
|
||||
%package distributed-traffic
|
||||
Summary: The plug-in package of openstack-neutron for router gateway portforwarding feature
|
||||
Requires: git
|
||||
Requires: python3-crudini
|
||||
Requires: openstack-neutron
|
||||
|
||||
%description distributed-traffic
|
||||
The plug-in package of openstack-neutron for router gateway portforwarding feature
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{service}-%{upstream_version} -S git
|
||||
%autosetup -n %{service}-%{upstream_version} -S git
|
||||
sed -i 's/\/usr\/bin\/python/\/usr\/bin\/python3/' %{SOURCE36}
|
||||
|
||||
find %{service} -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
|
||||
@ -506,6 +528,9 @@ rm -f %{buildroot}%{python3_sitelib}/%{service}/locale/*/LC_*/%{service}*po
|
||||
rm -f %{buildroot}%{python3_sitelib}/%{service}/locale/*pot
|
||||
mv %{buildroot}%{python3_sitelib}/%{service}/locale %{buildroot}%{_datadir}/locale
|
||||
|
||||
# Install router gateway portforwarding feature patch
|
||||
install -D -p -m 644 %{SOURCE37} %{buildroot}%{python3_sitelib}/openstack-plugin/neutron/$(basename %{SOURCE37})
|
||||
|
||||
# Find language files
|
||||
%find_lang %{service} --all-name
|
||||
|
||||
@ -623,6 +648,22 @@ fi
|
||||
%systemd_postun_with_restart neutron-sriov-nic-agent.service
|
||||
%cleanup_orphan_rootwrap_daemons
|
||||
|
||||
|
||||
%post distributed-traffic
|
||||
export patch_name=$(basename %{SOURCE37})
|
||||
%gitPatch %{python3_sitelib}/neutron %{python3_sitelib}/openstack-plugin/neutron/$patch_name
|
||||
crudini --set %{python3_sitelib}/neutron-*.egg-info/entry_points.txt neutron.objects RGPortForwarding neutron.objects.rg_port_forwarding:RGPortForwarding
|
||||
crudini --set %{python3_sitelib}/neutron-*.egg-info/entry_points.txt neutron.service_plugins rg_port_forwarding neutron.services.rg_portforwarding.pf_plugin:RGPortForwardingPlugin
|
||||
crudini --set %{python3_sitelib}/neutron-*.egg-info/entry_points.txt neutron.agent.l3.extensions rg_port_forwarding neutron.agent.l3.extensions.rg_port_forwarding:RGPortForwardingAgentExtension
|
||||
|
||||
|
||||
%preun distributed-traffic
|
||||
%gitUnPatch %{python3_sitelib}/neutron
|
||||
crudini --del %{python3_sitelib}/neutron-*.egg-info/entry_points.txt neutron.objects RGPortForwarding
|
||||
crudini --del %{python3_sitelib}/neutron-*.egg-info/entry_points.txt neutron.service_plugins rg_port_forwarding
|
||||
crudini --del %{python3_sitelib}/neutron-*.egg-info/entry_points.txt neutron.agent.l3.extensions rg_port_forwarding
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%{_bindir}/neutron-api
|
||||
@ -772,9 +813,15 @@ fi
|
||||
%config(noreplace) %attr(0640, root, %{service}) %{_sysconfdir}/%{service}/plugins/ml2/sriov_agent.ini
|
||||
%dir %{_sysconfdir}/%{service}/conf.d/%{service}-sriov-nic-agent
|
||||
|
||||
%files distributed-traffic
|
||||
%{python3_sitelib}/openstack-plugin/neutron/%{basename %{SOURCE37}}
|
||||
|
||||
%changelog
|
||||
* Tue Oct 17 2023 wangkuntian <wangkuntian@uniontech.com> - 15.3.4-3
|
||||
- Add distributed traffic feature package
|
||||
|
||||
* Tue Nov 23 2021 zhangy1317 <zhangy1317@foxmail.com> - 15.3.4-2
|
||||
- Fix install issue
|
||||
* Fri Nov 05 2021 wangxiyuan <wangxiyuan1007@gmail.com> 15.3.4-1
|
||||
- Support OpenStack Train release
|
||||
|
||||
* Fri Nov 05 2021 wangxiyuan <wangxiyuan1007@gmail.com> 15.3.4-1
|
||||
- Support OpenStack Train release
|
||||
Loading…
x
Reference in New Issue
Block a user