Switch from base64 encodestring to encodebytes
encodestring is deprecated since python 3.1 and
removed in python 3.9.
https: //docs.python.org/3.8/library/base64.html
Closes-Bug:
@@ -138,7 +138,7 @@ class ZFSSAShareDriver(driver.ShareDriver):
self.zfssa = factory_zfssa()
self.zfssa.set_host(lcfg.zfssa_host, timeout=lcfg.zfssa_rest_timeout)
creds = '%s:%s' % (lcfg.zfssa_auth_user, lcfg.zfssa_auth_password)
- auth_str = base64.encodestring(six.b(creds))[:-1]
+ auth_str = base64.encodebytes(six.b(creds))[:-1]
self.zfssa.login(auth_str)
if lcfg.zfssa_nas_mountpoint == '':
self.mountpoint += lcfg.zfssa_project
