Hello community,

here is the log from the commit of package python-redfish for openSUSE:Factory 
checked in at 2020-08-12 10:29:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-redfish (Old)
 and      /work/SRC/openSUSE:Factory/.python-redfish.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-redfish"

Wed Aug 12 10:29:55 2020 rev:5 rq:825417 version:2.1.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-redfish/python-redfish.changes    
2020-07-08 19:13:23.731192161 +0200
+++ /work/SRC/openSUSE:Factory/.python-redfish.new.3399/python-redfish.changes  
2020-08-12 10:35:16.008254630 +0200
@@ -1,0 +2,9 @@
+Mon Aug 10 15:56:59 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 2.1.8
+  * Added option to SSDP discover to bind to a specified address
+  * Added ability to override built-in HTTP headers.
+  * Fixed issue where the location of a session was not being.
+    tracked properly for HTTP connections.
+
+-------------------------------------------------------------------

Old:
----
  redfish-2.1.7.tar.gz

New:
----
  redfish-2.1.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-redfish.spec ++++++
--- /var/tmp/diff_new_pack.YmGvMu/_old  2020-08-12 10:35:21.260257236 +0200
+++ /var/tmp/diff_new_pack.YmGvMu/_new  2020-08-12 10:35:21.264257238 +0200
@@ -19,7 +19,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-redfish
-Version:        2.1.7
+Version:        2.1.8
 Release:        0
 Summary:        Redfish Python Library
 License:        BSD-3-Clause

++++++ redfish-2.1.7.tar.gz -> redfish-2.1.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-2.1.7/CHANGELOG.md 
new/python-redfish-library-2.1.8/CHANGELOG.md
--- old/python-redfish-library-2.1.7/CHANGELOG.md       2020-07-06 
15:11:59.000000000 +0200
+++ new/python-redfish-library-2.1.8/CHANGELOG.md       2020-08-10 
14:07:34.000000000 +0200
@@ -1,5 +1,10 @@
 # Change Log
 
+## [2.1.8] - 2020-08-10
+- Added option to SSDP discover to bind to a specified address
+- Added ability to override built-in HTTP headers
+- Fixed issue where the location of a seesion was not being tracked properly 
for HTTP connections
+
 ## [2.1.7] - 2020-07-06
 - Added support for setting the 'Content-Type' header to 
'application/octet-stream' when binary data is provided in a request
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-2.1.7/setup.py 
new/python-redfish-library-2.1.8/setup.py
--- old/python-redfish-library-2.1.7/setup.py   2020-07-06 15:11:59.000000000 
+0200
+++ new/python-redfish-library-2.1.8/setup.py   2020-08-10 14:07:34.000000000 
+0200
@@ -7,7 +7,7 @@
     long_description = f.read()
 
 setup(name='redfish',
-      version='2.1.7',
+      version='2.1.8',
       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-2.1.7/src/redfish/__init__.py 
new/python-redfish-library-2.1.8/src/redfish/__init__.py
--- old/python-redfish-library-2.1.7/src/redfish/__init__.py    2020-07-06 
15:11:59.000000000 +0200
+++ new/python-redfish-library-2.1.8/src/redfish/__init__.py    2020-08-10 
14:07:34.000000000 +0200
@@ -5,7 +5,7 @@
 """ Redfish restful library """
 
 __all__ = ['rest', 'ris', 'discovery']
-__version__ = "2.1.7"
+__version__ = "2.1.8"
 
 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-2.1.7/src/redfish/discovery/discovery.py 
new/python-redfish-library-2.1.8/src/redfish/discovery/discovery.py
--- old/python-redfish-library-2.1.7/src/redfish/discovery/discovery.py 
2020-07-06 15:11:59.000000000 +0200
+++ new/python-redfish-library-2.1.8/src/redfish/discovery/discovery.py 
2020-08-10 14:07:34.000000000 +0200
@@ -41,7 +41,7 @@
     return number
 
 
-def discover_ssdp(port=1900, ttl=2, response_time=3, iface=None, 
protocol="ipv4"):
+def discover_ssdp(port=1900, ttl=2, response_time=3, iface=None, 
protocol="ipv4", address=None):
     """Discovers Redfish services via SSDP
 
     :param port: the port to use for the SSDP request
@@ -54,6 +54,8 @@
     :type iface: string
     :param protocol: the type of protocol to use for the request; either 
'ipv4' or 'ipv6'
     :type protocol: string
+    :param address: the address to use for the request; None for all 
+    :type address: string
 
     :returns: a set of discovery data
     """
@@ -87,6 +89,8 @@
     sock = socket.socket(af_type, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
     sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
     sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl)
+    if address:
+        sock.bind((address, 0))
     if iface:
         sock.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, 
str(iface+"\0").encode("utf-8"))
     sock.sendto(bytearray(msearch_str, "utf-8"), mcast_connection)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-redfish-library-2.1.7/src/redfish/rest/v1.py 
new/python-redfish-library-2.1.8/src/redfish/rest/v1.py
--- old/python-redfish-library-2.1.7/src/redfish/rest/v1.py     2020-07-06 
15:11:59.000000000 +0200
+++ new/python-redfish-library-2.1.8/src/redfish/rest/v1.py     2020-08-10 
14:07:34.000000000 +0200
@@ -746,7 +746,10 @@
         elif self.__authorization_key:
             headers['Authorization'] = self.__authorization_key
 
-        headers['Accept'] = '*/*'
+        headers_keys = set(k.lower() for k in headers)
+        if 'accept' not in headers_keys:
+            headers['Accept'] = '*/*'
+
         headers['Connection'] = 'Keep-Alive'
 
         return headers
@@ -979,7 +982,7 @@
         """ Logout of session. YOU MUST CALL THIS WHEN YOU ARE DONE TO FREE"""
         """ UP SESSIONS"""
         if self.__session_key:
-            session_loc = self.__session_location.replace(self.__base_url, '')
+            session_loc = urlparse(self.__session_location).path
 
             resp = self.delete(session_loc)
             if resp.status not in [200, 202, 204]:
@@ -1069,7 +1072,9 @@
 
         """
         headers = super(HttpClient, self)._get_req_headers(headers)
-        headers['OData-Version'] = '4.0'
+        headers_keys = set(k.lower() for k in headers)
+        if 'odata-version' not in headers_keys:
+            headers['OData-Version'] = '4.0'
 
         return headers
 


Reply via email to