Fix bug that causes InternalServerError in FT
This patch fixes a bug that caused many functinal-tests
to fail with the following error:
- tackerclient.common.exceptions.InternalServerError
The bug occurs because the password is converted to bytes
type when decrypting the password of vim_auth with python3.
Change-Id: I021d1752fcf96dfba97faf21e849dc87019e4e57
Closes-Bug: #1883350
(cherry picked from commit bdb2d52b3a
)
This commit is contained in:
parent
a758d828ae
commit
7fb3429468
|
@ -572,7 +572,7 @@ class NfvoPlugin(nfvo_db_plugin.NfvoPluginDb, vnffg_db.VnffgPluginDbMixin,
|
||||||
if not f:
|
if not f:
|
||||||
LOG.warning('Unable to decode VIM auth')
|
LOG.warning('Unable to decode VIM auth')
|
||||||
raise nfvo.VimNotFoundException(vim_id=vim_id)
|
raise nfvo.VimNotFoundException(vim_id=vim_id)
|
||||||
return f.decrypt(cred)
|
return f.decrypt(cred).decode('utf-8')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _find_vim_key(vim_id):
|
def _find_vim_key(vim_id):
|
||||||
|
|
|
@ -123,7 +123,7 @@ class VimClient(object):
|
||||||
if not f:
|
if not f:
|
||||||
LOG.warning('Unable to decode VIM auth')
|
LOG.warning('Unable to decode VIM auth')
|
||||||
raise nfvo.VimNotFoundException(vim_id=vim_id)
|
raise nfvo.VimNotFoundException(vim_id=vim_id)
|
||||||
return f.decrypt(cred)
|
return f.decrypt(cred).decode('utf-8')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _find_vim_key(vim_id):
|
def _find_vim_key(vim_id):
|
||||||
|
|
Loading…
Reference in New Issue