diff options
author | krishnaa96 <krishna.moorthy6@wipro.com> | 2020-11-12 15:28:42 +0530 |
---|---|---|
committer | krishnaa96 <krishna.moorthy6@wipro.com> | 2020-11-12 15:28:42 +0530 |
commit | 078e0e852782b8a617f11f7749edfa79e4f563ec (patch) | |
tree | 9d2ecd76b5f36719854602a38e884d07168e4d8a /apps/pci/optimizers/solver/ml_model.py | |
parent | b1d2a420c9eef68061fe6706e8444e79dd611fae (diff) |
Fix DES interface in PCI opt
Issue-ID: OPTFRA-871
Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com>
Change-Id: Ie9a6ff2012f544cfe88db6b102b72c399a2c6186
Diffstat (limited to 'apps/pci/optimizers/solver/ml_model.py')
-rw-r--r-- | apps/pci/optimizers/solver/ml_model.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/pci/optimizers/solver/ml_model.py b/apps/pci/optimizers/solver/ml_model.py index 3e12387..952708d 100644 --- a/apps/pci/optimizers/solver/ml_model.py +++ b/apps/pci/optimizers/solver/ml_model.py @@ -16,6 +16,8 @@ # ------------------------------------------------------------------------- # +import json + from osdf.adapters.dcae import des from osdf.adapters.dcae.des import DESException from osdf.config.base import osdf_config @@ -53,7 +55,7 @@ class MlModel(object): request_data = self.config['DES']['filter'] request_data['cell_id'] = cell_id try: - result = des.extract_data(service_id, request_data) + result = des.extract_data(service_id, json.dumps(request_data)) except DESException as e: error_log.error("Error while calling DES {}".format(e)) return 0, 0 @@ -63,7 +65,7 @@ class MlModel(object): ho_list = [] for pm_data in result: - ho = sum([int(meas['hashMap']['InterEnbOutAtt_X2HO']) for meas in pm_data['additionalMeasurements']]) + ho = pm_data['overallHoAtt'] ho_list.append(ho) return sum(ho_list) / len(ho_list), ho_list[0] |