The change I75a5dee2fd1f8cf45dbf416b0353736a43efd8e8 replaced
base64.encodestring(auth_key)[:-1] with
oslo_serialization.base64.encode_as_text(auth_key)[:-1]. It's wrong
because base64.encodestring() adds '\n' to the output, wheras
oslo_serialization.base64.encode_as_text() doesn't add '\n'.
This change removes '[:-1]' to strip the newline, it's no more
needed.
Partial-Implements: blueprint cinder-python3
Change-Id: Ib015a850d7cc2e1259518fecfe66c836002b28d9
auth_key = ('%s:%s'
% (self.configuration.san_login,
self.configuration.san_password))
- auth_key = base64.encode_as_text(auth_key)[:-1]
+ auth_key = base64.encode_as_text(auth_key)
header['Authorization'] = 'Basic %s' % auth_key
# We allow 5 retries on each IP address. If connection to primary
# fails, secondary will be tried. If connection to secondary is