From: beierl Date: Tue, 10 Dec 2019 01:54:58 +0000 (-0500) Subject: Fixes double decryption X-Git-Tag: v7.0.0~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=eba6065d11b0f5ab76b4cda867a21aa5a8b4c092;p=osm%2FMON.git Fixes double decryption Code to decrypt the passwords happens twice, causing an error for the second decryption. Bug 959 Change-Id: I873699af61ae45ae3ed45e98e0d8d087ba79dccc Signed-off-by: beierl --- diff --git a/osm_mon/collector/infra_collectors/vmware.py b/osm_mon/collector/infra_collectors/vmware.py index c5db5ec..7f8ebc2 100644 --- a/osm_mon/collector/infra_collectors/vmware.py +++ b/osm_mon/collector/infra_collectors/vmware.py @@ -92,17 +92,12 @@ class VMwareInfraCollector(BaseVimInfraCollector): vim_account['vim_type'] = vim_account_info['vim_type'] vim_account['vim_url'] = vim_account_info['vim_url'] vim_account['org_user'] = vim_account_info['vim_user'] - vim_account['org_password'] = self.common_db.decrypt_vim_password(vim_account_info['vim_password'], - vim_account_info['schema_version'], - vim_account_id) vim_account['vim_uuid'] = vim_account_info['_id'] vim_account['project_id'] = vim_account_info['_admin']['projects_read'][0] vim_config = vim_account_info['config'] vim_account['admin_username'] = vim_config['admin_username'] - vim_account['admin_password'] = self.common_db.decrypt_vim_password(vim_config['admin_password'], - vim_account_info['schema_version'], - vim_account_id) + vim_account['admin_password'] = vim_config['admin_password'] if vim_config['orgname'] is not None: vim_account['orgname'] = vim_config['orgname'] diff --git a/osm_mon/collector/vnf_collectors/vmware.py b/osm_mon/collector/vnf_collectors/vmware.py index 626a402..888b013 100644 --- a/osm_mon/collector/vnf_collectors/vmware.py +++ b/osm_mon/collector/vnf_collectors/vmware.py @@ -90,14 +90,10 @@ class VMwareCollector(BaseVimCollector): vim_config = vim_account_info['config'] vim_account['admin_username'] = vim_config['admin_username'] - vim_account['admin_password'] = self.common_db.decrypt_vim_password(vim_config['admin_password'], - vim_account_info['schema_version'], - vim_account_id) + vim_account['admin_password'] = vim_config['admin_password'] vim_account['vrops_site'] = vim_config['vrops_site'] vim_account['vrops_user'] = vim_config['vrops_user'] - vim_account['vrops_password'] = self.common_db.decrypt_vim_password(vim_config['vrops_password'], - vim_account_info['schema_version'], - vim_account_id) + vim_account['vrops_password'] = vim_config['vrops_password'] return vim_account