From bdb2d52b3a1b69c58cb2ac6f903380ab8a7bd973 Mon Sep 17 00:00:00 2001 From: Hiroo Kitamura Date: Wed, 27 Nov 2019 13:11:06 +0900 Subject: [PATCH] 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 --- tacker/nfvo/nfvo_plugin.py | 2 +- tacker/vnfm/vim_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tacker/nfvo/nfvo_plugin.py b/tacker/nfvo/nfvo_plugin.py index 6df88947e..636cb2b9a 100644 --- a/tacker/nfvo/nfvo_plugin.py +++ b/tacker/nfvo/nfvo_plugin.py @@ -572,7 +572,7 @@ class NfvoPlugin(nfvo_db_plugin.NfvoPluginDb, vnffg_db.VnffgPluginDbMixin, if not f: LOG.warning('Unable to decode VIM auth') raise nfvo.VimNotFoundException(vim_id=vim_id) - return f.decrypt(cred) + return f.decrypt(cred).decode('utf-8') @staticmethod def _find_vim_key(vim_id): diff --git a/tacker/vnfm/vim_client.py b/tacker/vnfm/vim_client.py index 59b739a3c..8573c184d 100644 --- a/tacker/vnfm/vim_client.py +++ b/tacker/vnfm/vim_client.py @@ -123,7 +123,7 @@ class VimClient(object): if not f: LOG.warning('Unable to decode VIM auth') raise nfvo.VimNotFoundException(vim_id=vim_id) - return f.decrypt(cred) + return f.decrypt(cred).decode('utf-8') @staticmethod def _find_vim_key(vim_id):