From 5e8566a495187d62f6fc3eb7b6c63c3bfb463e50 Mon Sep 17 00:00:00 2001 From: Janne Suominen Date: Wed, 8 May 2019 15:11:34 +0300 Subject: [PATCH] Seed code for ironicclient Seed code for ironicclient Change-Id: Ib33d1aa04382bda1f0348eb97daf21d1f92d2f26 --- nokia/patches/0001-floppy-changes.patch | 11 +++ python-ironicclient.spec | 143 ++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 nokia/patches/0001-floppy-changes.patch create mode 100644 python-ironicclient.spec diff --git a/nokia/patches/0001-floppy-changes.patch b/nokia/patches/0001-floppy-changes.patch new file mode 100644 index 0000000..836b2bd --- /dev/null +++ b/nokia/patches/0001-floppy-changes.patch @@ -0,0 +1,11 @@ +--- a/ironicclient/v1/utils.py.orig 2018-06-27 10:41:33.214327733 +0300 ++++ b/ironicclient/v1/utils.py 2018-06-27 10:41:44.314365970 +0300 +@@ -15,7 +15,7 @@ + + HTTP_METHODS = ['POST', 'PUT', 'GET', 'DELETE', 'PATCH'] + +-BOOT_DEVICES = ['pxe', 'disk', 'cdrom', 'bios', 'safe', 'wanboot'] ++BOOT_DEVICES = ['pxe', 'disk', 'cdrom', 'bios', 'safe', 'wanboot', 'floppy'] + + # Polling intervals in seconds. + _LONG_ACTION_POLL_INTERVAL = 10 diff --git a/python-ironicclient.spec b/python-ironicclient.spec new file mode 100644 index 0000000..e91388d --- /dev/null +++ b/python-ironicclient.spec @@ -0,0 +1,143 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global sname ironicclient + +%global common_desc A python and command line client library for Ironic + +Name: python-ironicclient +Version: 2.2.1 +Release: 1%{?dist} +Summary: Python client for Ironic + +License: ASL 2.0 +URL: https://pypi.python.org/pypi/python-ironicclient +Source0: https://tarballs.openstack.org/python-ironicclient/python-ironicclient-%{version}%{?milestone}.tar.gz +Patch0: nokia/patches/0001-floppy-changes.patch +BuildArch: noarch + + +%description +%{common_desc} + + +%package -n python2-%{sname} +Summary: Python client for Ironic + +BuildRequires: python2-devel +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: python2-setuptools + +Requires: python2-appdirs >= 1.3.0 +Requires: python2-keystoneauth1 >= 3.3.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable +Requires: python2-six >= 1.10.0 +Requires: python2-osc-lib >= 1.8.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-requests +%if 0%{?fedora} > 0 +Requires: python2-dogpile-cache >= 0.6.2 +Requires: python2-jsonschema +Requires: python2-pyyaml +%else +Requires: python-dogpile-cache >= 0.6.2 +Requires: python-jsonschema +Requires: PyYAML +%endif + +%{?python_provide:%python_provide python2-%{sname}} + +%description -n python2-%{sname} +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python client for Ironic + +BuildRequires: python3-devel +BuildRequires: python3-pbr >= 2.0.0 +BuildRequires: python3-setuptools + +Requires: python3-appdirs >= 1.3.0 +Requires: python3-dogpile-cache >= 0.6.2 +Requires: python3-jsonschema +Requires: python3-keystoneauth1 >= 3.3.0 +Requires: python3-pbr >= 2.0.0 +Requires: python3-prettytable +Requires: python3-six >= 1.10.0 +Requires: python3-osc-lib >= 1.8.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-requests +Requires: python3-PyYAML + +%{?python_provide:%python_provide python3-%{sname}} + +%description -n python3-%{sname} +%{common_desc} +%endif + +%prep +%setup -q -n %{name}-%{upstream_version} + +%patch0 -p1 +# Remove the requirements file so that pbr hooks don't add it +# to distutils requires_dist config +rm -rf {test-,}requirements.txt tools/{pip,test}-requires + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/ironic %{buildroot}%{_bindir}/ironic-%{python3_version} +ln -s ./ironic-%{python3_version} %{buildroot}%{_bindir}/ironic-3 +%endif + +%py2_install +mv %{buildroot}%{_bindir}/ironic %{buildroot}%{_bindir}/ironic-%{python2_version} +ln -s ./ironic-%{python2_version} %{buildroot}%{_bindir}/ironic-2 + +ln -s ./ironic-2 %{buildroot}%{_bindir}/ironic + + +%files -n python2-%{sname} +%doc README.rst +%license LICENSE +%{_bindir}/ironic +%{_bindir}/ironic-2 +%{_bindir}/ironic-%{python2_version} +%{python2_sitelib}/ironicclient* +%{python2_sitelib}/python_ironicclient* + +%if 0%{?with_python3} +%files -n python3-%{sname} +%doc README.rst +%license LICENSE +%{_bindir}/ironic-3 +%{_bindir}/ironic-%{python3_version} +%{python3_sitelib}/ironicclient* +%{python3_sitelib}/python_ironicclient* +%endif + + +%changelog +* Tue Jun 19 2018 RDO 2.2.1-1 +- Update to 2.2.1 + +* Sun Feb 11 2018 RDO 2.2.0-1 +- Update to 2.2.0 + -- 2.16.6