Hello community, here is the log from the commit of package python-sushy for openSUSE:Factory checked in at 2018-09-07 15:39:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sushy (Old) and /work/SRC/openSUSE:Factory/.python-sushy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sushy" Fri Sep 7 15:39:33 2018 rev:3 rq:633121 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sushy/python-sushy.changes 2018-07-10 16:16:47.937408999 +0200 +++ /work/SRC/openSUSE:Factory/.python-sushy.new/python-sushy.changes 2018-09-07 15:39:33.530526169 +0200 @@ -1,0 +2,7 @@ +Mon Sep 3 18:03:58 UTC 2018 - [email protected] + +- update to version 1.3.2 + - Updated from global requirements + - Mark Systems/Managers/SessionService optional + +------------------------------------------------------------------- Old: ---- sushy-1.3.1.tar.gz New: ---- sushy-1.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sushy.spec ++++++ --- /var/tmp/diff_new_pack.bzXBxH/_old 2018-09-07 15:39:33.886525787 +0200 +++ /var/tmp/diff_new_pack.bzXBxH/_new 2018-09-07 15:39:33.886525787 +0200 @@ -17,66 +17,80 @@ Name: python-sushy -Version: 1.3.1 +Version: 1.3.2 Release: 0 Summary: Sushy is a small Python library to communicate with Redfish based systems License: Apache-2.0 Group: Development/Languages/Python -Url: https://docs.openstack.org/sushy -Source0: https://files.pythonhosted.org/packages/source/s/sushy/sushy-1.3.1.tar.gz +URL: https://docs.openstack.org/sushy +Source0: https://files.pythonhosted.org/packages/source/s/sushy/sushy-1.3.2.tar.gz BuildRequires: openstack-macros BuildRequires: python-devel -BuildRequires: python-oslotest >= 3.2.0 -BuildRequires: python-pbr >= 2.0.0 -BuildRequires: python-python-subunit >= 1.0.0 -BuildRequires: python-reno >= 2.5.0 -BuildRequires: python-requests >= 2.14.2 -BuildRequires: python-setuptools >= 16.0 -BuildRequires: python-six >= 1.10.0 -BuildRequires: python-testrepository >= 0.0.18 -BuildRequires: python-testscenarios >= 0.4 -BuildRequires: python-testtools >= 2.2.0 +BuildRequires: python2-oslotest +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: python2-python-subunit +BuildRequires: python2-reno +BuildRequires: python2-requests >= 2.14.2 +BuildRequires: python2-setuptools +BuildRequires: python2-six >= 1.10.0 +BuildRequires: python2-testrepository +BuildRequires: python2-testscenarios +BuildRequires: python2-testtools +BuildRequires: python3-devel +BuildRequires: python3-oslotest +BuildRequires: python3-pbr >= 2.0.0 +BuildRequires: python3-python-subunit +BuildRequires: python3-reno +BuildRequires: python3-requests >= 2.14.2 +BuildRequires: python3-setuptools +BuildRequires: python3-six >= 1.10.0 +BuildRequires: python3-testrepository +BuildRequires: python3-testscenarios +BuildRequires: python3-testtools Requires: python-pbr >= 2.0.0 Requires: python-requests >= 2.14.2 Requires: python-six >= 1.10.0 BuildArch: noarch +%python_subpackages %description Sushy is a Python library to communicate with `Redfish` based systems. -%package doc +%package -n python-sushy-doc Summary: Documentation for OpenStack sushy Group: Documentation/HTML BuildRequires: python-Sphinx -BuildRequires: python-openstackdocstheme >= 1.18.1 +BuildRequires: python-openstackdocstheme -%description doc +%description -n python-sushy-doc Sushy is a Python library to communicate with `Redfish` based systems. This package contains the documentation. %prep -%autosetup -p1 -n sushy-1.3.1 +%autosetup -p1 -n sushy-1.3.2 %py_req_cleanup sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg %build -%{py2_build} +%{python_build} %{__python2} setup.py build_sphinx --builder=html,man rm -rf html/.{doctrees,buildinfo} %install -%{py2_install} +%{python_install} %check -%{__python2} setup.py test +%{python_expand rm -rf .testrepository +$python setup.py test +} -%files +%files %{python_files} %license LICENSE %doc AUTHORS ChangeLog README.rst -%{python2_sitelib}/sushy* -%{python2_sitelib}/*.egg-info +%{python_sitelib}/sushy* +%{python_sitelib}/*.egg-info -%files doc +%files -n python-sushy-doc %doc doc/build/html %license LICENSE ++++++ _service ++++++ --- /var/tmp/diff_new_pack.bzXBxH/_old 2018-09-07 15:39:33.906525766 +0200 +++ /var/tmp/diff_new_pack.bzXBxH/_new 2018-09-07 15:39:33.906525766 +0200 @@ -1,8 +1,8 @@ <services> <service mode="disabled" name="renderspec"> - <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/queens/openstack/sushy/sushy.spec.j2</param> + <param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/rocky/openstack/sushy/sushy.spec.j2</param> <param name="output-name">python-sushy.spec</param> - <param name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/queens/requirements.txt</param> + <param name="requirements">https://raw.githubusercontent.com/openstack/sushy/stable/rocky/requirements.txt</param> <param name="changelog-email">[email protected]</param> <param name="changelog-provider">gh,openstack,sushy</param> </service> ++++++ sushy-1.3.1.tar.gz -> sushy-1.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/ChangeLog new/sushy-1.3.2/ChangeLog --- old/sushy-1.3.1/ChangeLog 2018-02-05 22:39:11.000000000 +0100 +++ new/sushy-1.3.2/ChangeLog 2018-04-09 23:27:26.000000000 +0200 @@ -1,6 +1,12 @@ CHANGES ======= +1.3.2 +----- + +* Mark Systems/Managers/SessionService optional +* Updated from global requirements + 1.3.1 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/PKG-INFO new/sushy-1.3.2/PKG-INFO --- old/sushy-1.3.1/PKG-INFO 2018-02-05 22:39:12.000000000 +0100 +++ new/sushy-1.3.2/PKG-INFO 2018-04-09 23:27:27.000000000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: sushy -Version: 1.3.1 +Version: 1.3.2 Summary: Sushy is a small Python library to communicate with Redfish based systems Home-page: https://docs.openstack.org/sushy Author: OpenStack Author-email: [email protected] License: UNKNOWN -Description-Content-Type: UNKNOWN Description: About Sushy =========== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/releasenotes/notes/bug-1754514-ca6ebe16c4e4b3b0.yaml new/sushy-1.3.2/releasenotes/notes/bug-1754514-ca6ebe16c4e4b3b0.yaml --- old/sushy-1.3.1/releasenotes/notes/bug-1754514-ca6ebe16c4e4b3b0.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/sushy-1.3.2/releasenotes/notes/bug-1754514-ca6ebe16c4e4b3b0.yaml 2018-04-09 23:24:50.000000000 +0200 @@ -0,0 +1,5 @@ +--- +critical: + - | + Fixes authentication failure when SessionService attribute is + not present in the root resource. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/sushy/main.py new/sushy-1.3.2/sushy/main.py --- old/sushy-1.3.1/sushy/main.py 2018-02-05 22:36:53.000000000 +0100 +++ new/sushy-1.3.2/sushy/main.py 2018-04-09 23:24:50.000000000 +0200 @@ -16,6 +16,7 @@ from sushy import auth as sushy_auth from sushy import connector as sushy_connector +from sushy import exceptions from sushy.resources import base from sushy.resources.manager import manager from sushy.resources.sessionservice import session @@ -36,14 +37,13 @@ uuid = base.Field('UUID') """The Redfish root service UUID""" - _systems_path = base.Field(['Systems', '@odata.id'], required=True) + _systems_path = base.Field(['Systems', '@odata.id']) """SystemCollection path""" - _managers_path = base.Field(['Managers', '@odata.id'], required=True) + _managers_path = base.Field(['Managers', '@odata.id']) """ManagerCollection path""" - _session_service_path = base.Field(['SessionService', '@odata.id'], - required=True) + _session_service_path = base.Field(['SessionService', '@odata.id']) """SessionService path""" def __init__(self, base_url, username=None, password=None, @@ -96,6 +96,10 @@ not found :returns: a SystemCollection object """ + if not self._systems_path: + raise exceptions.MissingAttributeError( + attribute='Systems/@odata.id', resource=self._path) + return system.SystemCollection(self._conn, self._systems_path, redfish_version=self.redfish_version) @@ -115,6 +119,10 @@ not found :returns: a ManagerCollection object """ + if not self._managers_path: + raise exceptions.MissingAttributeError( + attribute='Managers/@odata.id', resource=self._path) + return manager.ManagerCollection(self._conn, self._managers_path, redfish_version=self.redfish_version) @@ -130,9 +138,14 @@ def get_session_service(self): """Get the SessionService object - :raises: MissingAttributeError, if the collection attribue is not found + :raises: MissingAttributeError, if the collection attribute is + not found :returns: as SessionCollection object """ + if not self._session_service_path: + raise exceptions.MissingAttributeError( + attribute='SessionService/@odata.id', resource=self._path) + return sessionservice.SessionService( self._conn, self._session_service_path, redfish_version=self.redfish_version) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/sushy/tests/unit/json_samples/bare_minimum_root.json new/sushy-1.3.2/sushy/tests/unit/json_samples/bare_minimum_root.json --- old/sushy-1.3.1/sushy/tests/unit/json_samples/bare_minimum_root.json 1970-01-01 01:00:00.000000000 +0100 +++ new/sushy-1.3.2/sushy/tests/unit/json_samples/bare_minimum_root.json 2018-04-09 23:24:50.000000000 +0200 @@ -0,0 +1,11 @@ +{ + "@odata.type": "#ServiceRoot.v1_0_2.ServiceRoot", + "Id": "RootService", + "Name": "Root Service", + "RedfishVersion": "1.0.2", + "UUID": "92384634-2938-2342-8820-489239905423", + "Oem": {}, + "@odata.context": "/redfish/v1/$metadata#ServiceRoot", + "@odata.id": "/redfish/v1/", + "@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/sushy/tests/unit/test_main.py new/sushy-1.3.2/sushy/tests/unit/test_main.py --- old/sushy-1.3.1/sushy/tests/unit/test_main.py 2018-02-05 22:36:53.000000000 +0100 +++ new/sushy-1.3.2/sushy/tests/unit/test_main.py 2018-04-09 23:24:50.000000000 +0200 @@ -19,6 +19,7 @@ from sushy import auth from sushy import connector +from sushy import exceptions from sushy import main from sushy.resources.manager import manager from sushy.resources.sessionservice import session @@ -117,3 +118,30 @@ mock_sess.assert_called_once_with( self.root._conn, 'asdf', redfish_version=self.root.redfish_version) + + +class BareMinimumMainTestCase(base.TestCase): + + def setUp(self): + super(BareMinimumMainTestCase, self).setUp() + self.conn = mock.MagicMock() + with open('sushy/tests/unit/json_samples/' + 'bare_minimum_root.json', 'r') as f: + self.conn.get.return_value.json.return_value = json.loads(f.read()) + self.root = main.Sushy('http://foo.bar:1234', verify=True, + auth=mock.MagicMock(), connector=self.conn) + + def test_get_system_collection_when_systems_attr_absent(self): + self.assertRaisesRegex( + exceptions.MissingAttributeError, + 'Systems/@odata.id', self.root.get_system_collection) + + def test_get_manager_collection_when_managers_attr_absent(self): + self.assertRaisesRegex( + exceptions.MissingAttributeError, + 'Managers/@odata.id', self.root.get_manager_collection) + + def test_get_session_service_when_sessionservice_attr_absent(self): + self.assertRaisesRegex( + exceptions.MissingAttributeError, + 'SessionService/@odata.id', self.root.get_session_service) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/sushy.egg-info/PKG-INFO new/sushy-1.3.2/sushy.egg-info/PKG-INFO --- old/sushy-1.3.1/sushy.egg-info/PKG-INFO 2018-02-05 22:39:11.000000000 +0100 +++ new/sushy-1.3.2/sushy.egg-info/PKG-INFO 2018-04-09 23:27:26.000000000 +0200 @@ -1,12 +1,11 @@ Metadata-Version: 1.1 Name: sushy -Version: 1.3.1 +Version: 1.3.2 Summary: Sushy is a small Python library to communicate with Redfish based systems Home-page: https://docs.openstack.org/sushy Author: OpenStack Author-email: [email protected] License: UNKNOWN -Description-Content-Type: UNKNOWN Description: About Sushy =========== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/sushy.egg-info/SOURCES.txt new/sushy-1.3.2/sushy.egg-info/SOURCES.txt --- old/sushy-1.3.1/sushy.egg-info/SOURCES.txt 2018-02-05 22:39:12.000000000 +0100 +++ new/sushy-1.3.2/sushy.egg-info/SOURCES.txt 2018-04-09 23:27:27.000000000 +0200 @@ -24,6 +24,7 @@ releasenotes/notes/.placeholder releasenotes/notes/add-custom-connector-support-0a49c6649d5f7eaf.yaml releasenotes/notes/add_ethernet_interface-df308f814f0e4bce.yaml +releasenotes/notes/bug-1754514-ca6ebe16c4e4b3b0.yaml releasenotes/notes/fix-refine-resource-refresh-86c21ce230967251.yaml releasenotes/notes/health_literals_change-0e3fc0c439b765e3.yaml releasenotes/notes/sessions.yml @@ -69,6 +70,7 @@ sushy/tests/unit/test_connector.py sushy/tests/unit/test_main.py sushy/tests/unit/test_utils.py +sushy/tests/unit/json_samples/bare_minimum_root.json sushy/tests/unit/json_samples/error.json sushy/tests/unit/json_samples/ethernet_interfaces.json sushy/tests/unit/json_samples/ethernet_interfaces_collection.json diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/sushy.egg-info/pbr.json new/sushy-1.3.2/sushy.egg-info/pbr.json --- old/sushy-1.3.1/sushy.egg-info/pbr.json 2018-02-05 22:39:11.000000000 +0100 +++ new/sushy-1.3.2/sushy.egg-info/pbr.json 2018-04-09 23:27:26.000000000 +0200 @@ -1 +1 @@ -{"git_version": "97c6bb5", "is_release": true} \ No newline at end of file +{"git_version": "ae06c02", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sushy-1.3.1/test-requirements.txt new/sushy-1.3.2/test-requirements.txt --- old/sushy-1.3.1/test-requirements.txt 2018-02-05 22:37:05.000000000 +0100 +++ new/sushy-1.3.2/test-requirements.txt 2018-04-09 23:25:01.000000000 +0200 @@ -7,7 +7,7 @@ coverage!=4.4,>=4.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.0/BSD sphinx!=1.6.6,>=1.6.2 # BSD -openstackdocstheme>=1.17.0 # Apache-2.0 +openstackdocstheme>=1.18.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD
