Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-redfish for openSUSE:Factory checked in at 2022-10-29 20:17:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-redfish (Old) and /work/SRC/openSUSE:Factory/.python-redfish.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-redfish" Sat Oct 29 20:17:29 2022 rev:11 rq:1032175 version:3.1.7 Changes: -------- --- /work/SRC/openSUSE:Factory/python-redfish/python-redfish.changes 2022-06-18 22:06:26.451677506 +0200 +++ /work/SRC/openSUSE:Factory/.python-redfish.new.2275/python-redfish.changes 2022-10-29 20:18:38.434700993 +0200 @@ -1,0 +2,6 @@ +Sat Oct 29 00:30:12 UTC 2022 - Yogalakshmi Arunachalam <[email protected]> + +- Update to 3.1.7: + * Added handling for extracting error information when a session could not be created + +------------------------------------------------------------------- Old: ---- redfish-3.1.6.tar.gz New: ---- redfish-3.1.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-redfish.spec ++++++ --- /var/tmp/diff_new_pack.mb7n58/_old 2022-10-29 20:18:38.922703592 +0200 +++ /var/tmp/diff_new_pack.mb7n58/_new 2022-10-29 20:18:38.930703635 +0200 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-redfish -Version: 3.1.6 +Version: 3.1.7 Release: 0 Summary: Redfish Python Library License: BSD-3-Clause ++++++ redfish-3.1.6.tar.gz -> redfish-3.1.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.1.6/.github/workflows/main.yml new/python-redfish-library-3.1.7/.github/workflows/main.yml --- old/python-redfish-library-3.1.6/.github/workflows/main.yml 2022-05-12 17:33:30.000000000 +0200 +++ new/python-redfish-library-3.1.7/.github/workflows/main.yml 2022-09-09 21:28:55.000000000 +0200 @@ -57,6 +57,7 @@ if [[ -n "${{github.event.inputs.changes_6}}" ]]; then echo "- ${{github.event.inputs.changes_6}}" >> $GITHUB_ENV; fi if [[ -n "${{github.event.inputs.changes_7}}" ]]; then echo "- ${{github.event.inputs.changes_7}}" >> $GITHUB_ENV; fi if [[ -n "${{github.event.inputs.changes_8}}" ]]; then echo "- ${{github.event.inputs.changes_8}}" >> $GITHUB_ENV; fi + echo "" >> $GITHUB_ENV echo 'EOF' >> $GITHUB_ENV - name: Update version numbers run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.1.6/CHANGELOG.md new/python-redfish-library-3.1.7/CHANGELOG.md --- old/python-redfish-library-3.1.6/CHANGELOG.md 2022-05-12 17:33:30.000000000 +0200 +++ new/python-redfish-library-3.1.7/CHANGELOG.md 2022-09-09 21:28:55.000000000 +0200 @@ -1,8 +1,12 @@ # Change Log +## [3.1.7] - 2022-09-09 +- Added handling for extracting error information when a session could not be created + ## [3.1.6] - 2022-05-12 - Fixed issue where the 'read' method on response objects always return strings - Modified query parameter encoding to not percent-encode characters allowed in query strings per RFC3986 + ## [3.1.5] - 2022-04-01 - Added methods for specifying proxies directly with a new 'proxies' parameter diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.1.6/README.rst new/python-redfish-library-3.1.7/README.rst --- old/python-redfish-library-3.1.6/README.rst 2022-05-12 17:33:30.000000000 +0200 +++ new/python-redfish-library-3.1.7/README.rst 2022-09-09 21:28:55.000000000 +0200 @@ -148,7 +148,7 @@ Using proxies ~~~~~~~~~~~~~ -There are two methods for using proxies. +There are two methods for using proxies: configuring environment variables or directly providing proxy information. Environment variables ^^^^^^^^^^^^^^^^^^^^^ @@ -175,14 +175,22 @@ REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account, \ password=login_password, proxies=proxies) -Contributing ------------- +SOCKS proxy support +^^^^^^^^^^^^^^^^^^^ -1. Fork it! -2. Create your feature branch: ``git checkout -b my-new-feature`` -3. Commit your changes: ``git commit -s -am 'Add some feature'`` -4. Push to the branch: ``git push origin my-new-feature`` -5. Submit a pull request :D +An additional package is required to use SOCKS proxies. + +.. code-block:: console + + pip install -U requests[socks] + +Once installed, the proxy can be configured using environment variables or directly provided like any other proxy. +For example: + +.. code-block:: shell + + export HTTP_PROXY="socks5h://localhost:8123" + export HTTPS_PROXY="socks5h://localhost:8123" Release Process --------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.1.6/setup.py new/python-redfish-library-3.1.7/setup.py --- old/python-redfish-library-3.1.6/setup.py 2022-05-12 17:33:30.000000000 +0200 +++ new/python-redfish-library-3.1.7/setup.py 2022-09-09 21:28:55.000000000 +0200 @@ -12,7 +12,7 @@ long_description = f.read() setup(name='redfish', - version='3.1.6', + version='3.1.7', description='Redfish Python Library', long_description=long_description, long_description_content_type='text/x-rst', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.1.6/src/redfish/__init__.py new/python-redfish-library-3.1.7/src/redfish/__init__.py --- old/python-redfish-library-3.1.6/src/redfish/__init__.py 2022-05-12 17:33:30.000000000 +0200 +++ new/python-redfish-library-3.1.7/src/redfish/__init__.py 2022-09-09 21:28:55.000000000 +0200 @@ -6,7 +6,7 @@ """ Redfish restful library """ __all__ = ['rest', 'ris', 'discovery'] -__version__ = "3.1.6" +__version__ = "3.1.7" from redfish.rest.v1 import redfish_client from redfish.rest.v1 import AuthMethod diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-redfish-library-3.1.6/src/redfish/rest/v1.py new/python-redfish-library-3.1.7/src/redfish/rest/v1.py --- old/python-redfish-library-3.1.6/src/redfish/rest/v1.py 2022-05-12 17:33:30.000000000 +0200 +++ new/python-redfish-library-3.1.7/src/redfish/rest/v1.py 2022-09-09 21:28:55.000000000 +0200 @@ -45,6 +45,10 @@ """Raised when invalid credentials have been provided.""" pass +class SessionCreationError(Exception): + """Raised when a session could not be created.""" + pass + class ServerDownOrUnreachableError(Exception): """Raised when server is unreachable.""" pass @@ -929,9 +933,8 @@ respvalidate = self._rest_request(self.login_url, headers=headers) if respvalidate.status == 401: - #If your REST client has a delay for fail attempts add it here - delay = 0 - raise InvalidCredentialsError(delay) + # Invalid credentials supplied + raise InvalidCredentialsError('HTTP 401 Unauthorized returned: Invalid credentials supplied') elif auth == AuthMethod.SESSION: data = dict() data['UserName'] = self.__username @@ -947,9 +950,20 @@ self.__session_location = resp.session_location if not self.__session_key and resp.status not in [200, 201, 202, 204]: - #If your REST client has a delay for fail attempts added it here - delay = 0 - raise InvalidCredentialsError(delay) + if resp.status == 401: + # Invalid credentials supplied + raise InvalidCredentialsError('HTTP 401 Unauthorized returned: Invalid credentials supplied') + else: + # Other type of error during session creation + error_str = resp.text + try: + error_str = resp.dict["error"]["@Message.ExtendedInfo"][0]["Message"] + except: + try: + error_str = resp.dict["error"]["message"] + except: + pass + raise SessionCreationError('HTTP {}: Failed to created the session\n{}'.format(resp.status, error_str)) else: self.set_username(None) self.set_password(None)
