# # $Id$ # Name: python-redfish Version: 0.3 Release: 1%{dist} Summary: Redfish python library License: ASL 2.0 Group: Applications/System Url: http://github.com/bcornec/python-redfish Source: ftp://ftp.mondorescue.org//src/%{name}-%{version}.tar.gz Requires: python-docopt >= 0.6.2,python-tortilla >= 0.4.1,python-jinja2 >= 2.7.3,python-simplejson >= 3.8.1,python-requests >= 2.9.1,python-configparser >= 3.3.0 BuildArch: noarch BuildRequires: python-devel,python-setuptools >= 18,python-sphinx >= 1.2.3,python-future >= 0.15.2,python-docopt >= 0.6.2,python-requests >= 2.9.1,python-simplejson >= 3.8.1,python-configparser >= 3.3.0,texlive,python-sphinx_rtd_theme, texlive-multirow,texlive-upquote,texlive-wrapfig,texlive-threeparttable,texlive-titlesec %description The Redfish API supports dialoging with a Redfish compliant system such as defined by http://www.redfishcertification.org Python2 version. %package -n python3-redfish Summary: %{summary} / Python 3 library BuildRequires: python3-devel,python3-setuptools >= 18,python3-sphinx >= 1.2.3,python3-future >= 0.15.2,python3-docopt >= 0.6.2,python3-requests >= 2.9.1,python3-simplejson >= 3.8.1,texlive,python3-sphinx_rtd_theme, texlive-multirow,texlive-upquote,texlive-wrapfig,texlive-threeparttable,texlive-titlesec Requires: python3-docopt >= 0.6.2,python3-tortilla >= 0.4.1,python3-jinja2 >= 2.7.3,python3-simplejson >= 3.8.1,python3-requests >= 2.9.1 %package -n python-redfish-doc Summary: %{summary} / Documentation BuildRequires: python3-devel,python3-setuptools >= 18,python3-sphinx >= 1.2.3,python3-future >= 0.15.2,python3-docopt >= 0.6.2,python3-requests >= 2.9.1,python3-simplejson >= 3.8.1,texlive,python3-sphinx_rtd_theme, texlive-multirow,texlive-upquote,texlive-wrapfig,texlive-threeparttable,texlive-titlesec Requires: python3-docopt >= 0.6.2,python3-tortilla >= 0.4.1,python3-jinja2 >= 2.7.3,python3-simplejson >= 3.8.1,python3-requests >= 2.9.1 %description -n python3-redfish The Redfish API supports dialoging with a Redfish compliant system such as defined by http://www.redfishcertification.org Python3 version. %description -n python-redfish-doc The Redfish API supports dialoging with a Redfish compliant system such as defined by http://www.redfishcertification.org Documentation %prep %setup -q # Fix for now as long as setuptools isn't more recent in distributions perl -pi -e "s|configparser>=3.3.0; python_version < '3'|configparser>=3.3.0|" requirements.txt cp -a . %{py3dir} # python3 doesn't provide configparser at all (cd %{py3dir} ; perl -pi -e "s|configparser>=3.3.0||" requirements.txt) %build pushd %{py3dir} %{__python3} setup.py build # Build minimal documentation cd doc make man popd %{__python} setup.py build # Build minimal documentation cd doc make man make singlehtml make latexpdf %install ./install.sh %{__python} %{buildroot} %{python_sitelib} %{_prefix} python-redfish ./install.sh doc %{buildroot} %{python_sitelib} %{_prefix} python-redfish for i in `ls %{buildroot}/%{_mandir}/man1/*-py2.1*`; do j=`echo $i | perl -p -e 's|-py2||'` cp -a $i $j done pushd %{py3dir} ./install.sh %{__python3} %{buildroot} %{python3_sitelib} %{_prefix} python3-redfish popd %files %doc README.rst examples/[a-z]*.py LICENSE %exclude %{_docdir}/python-redfish/html %exclude %{_docdir}/python-redfish/*.pdf %{_bindir}/redfish-client %dir %{_datadir}/redfish-client %{_datadir}/redfish-client/templates/* %config(noreplace) %{_sysconfdir}/redfish-client.conf %dir %{python_sitelib}/redfish %{python_sitelib}/redfish/*.py* %{python_sitelib}/python_redfish* # Needs improvement to host all .1 man pages but not the py3 ones %{_mandir}/man1/python-redfish.1* %{_mandir}/man1/*-py2.1* %files -n python3-redfish %doc README.rst examples/[a-z]*.py LICENSE AUTHORS ChangeLog %dir %{python3_sitelib}/redfish %{python3_sitelib}/redfish/*.py* %{python3_sitelib}/redfish/__pycache__/*.py* %{python3_sitelib}/python_redfish* %{_mandir}/man1/*-py3.1* %files -n python-redfish-doc %{_docdir}/python-redfish/manual/html/_static/* %{_docdir}/python-redfish/manual/html/index.html %{_docdir}/python-redfish/manual/*.pdf %changelog * Sat Jan 01 2050 Bruno Cornec devel-1 - Updated to devel - TBD () * Tue Dec 08 2015 Bruno Cornec 0.2-1 - Updated to 0.2 - first rpm made using project-builder.org (Bruno Cornec) - Update the simple-simulator example (René Ribaud) - Update redfish-client (René Ribaud) - Add both UEFI parameters "Continuous" and "Once" as an example (Vincent Misson) - New function set_parameter and set_parameter_json on Systems Class (Vincent Misson) - New classes in types.py: Bios & Boot (Vincent Misson) - New function get_power() and generic function get_parameter(parameter_name) for class Systems (Vincent Misson) - Create new function: get_serialnumber. Tested with Simulator (v1) + Redfish Proliant 0.9.5 and 1.0 (Vincent Misson) - Various doc updates (Bruno COrnec, René Ribaud) * Wed Sep 09 2015 Bruno Cornec 0.1-1 - Updated to 0.1 - Uses tortilla lib to wrap the REST API (René Ribaud) - Uses python requests to manage login/logout (René Ribaud) - Provides 2 functional working examples with Redfish simulator and ProLiant server or Moonshot Server (René Ribaud) - Remove OpenStack deps as this code has to be usable outside of OpenStack (Bruno Cornec) - Provides a configuration file to handle credentials and connection URL (René Ribaud) - Provides a mapping class to handle multiple versions of Redfish (in this version, 0.95.0 for ProLiant and 1.0.0 for mockup) (René Ribaud) - Provides a first action reset_server to ... reset system The action is commented into simple-proliant.py to not do unexpected reset. (René Ribaud) - Provides a first retrieving function get_bios_version to get the BIOS version of a system. (René Ribaud) - Add basic logging capability (René Ribaud) - Change the documentation to reference Redfish specification. Remove HP and iLO specific references (Samer El-Haj-Mahmoud) - Initial content and Clean up to meet pep8 and doc strings (Devenanda van der Veen)