mirror of
https://opendev.org/x/pyghmi
synced 2026-03-31 15:23:31 +00:00
Fix redfish operation over ipv6 link local
Change-Id: I50149cc0eeea2affe727ddd6888cd656c52f6c1f
This commit is contained in:
@@ -258,7 +258,9 @@ class Command(object):
|
||||
if addrinf[0] == socket.AF_INET:
|
||||
self._bmcv4ip = socket.inet_pton(addrinf[0], addrinf[-1][0])
|
||||
elif addrinf[0] == socket.AF_INET6:
|
||||
self._bmcv6ip = socket.inet_pton(addrinf[0], addrinf[-1][0])
|
||||
theip = addrinf[-1][0]
|
||||
theip = theip.split('%')[0]
|
||||
self._bmcv6ip = socket.inet_pton(addrinf[0], theip)
|
||||
self.wc.set_header('Accept', 'application/json')
|
||||
self.wc.set_header('User-Agent', 'pyghmi')
|
||||
self.wc.set_header('Accept-Encoding', 'gzip')
|
||||
|
||||
Reference in New Issue
Block a user