aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiranjana <niranjana.y60@wipro.com>2020-11-16 17:19:01 +0530
committerNiranjana <niranjana.y60@wipro.com>2020-11-16 18:18:46 +0530
commitdbdc2d26632175ab01d345b88ebf02ee8f95454a (patch)
tree516ca1d5cfbad3fdb12d881d13813cc22eaddd9c
parent42c59718c3e9320e04e73ce1d84278bf4715413d (diff)
Fix issue in pci-ml model3.0.2
- Remove list conversion from fixed cells Issue-ID: OPTFRA-871 Signed-off-by: Niranjana <niranjana.y60@wipro.com> Change-Id: If29945fe7513ea0fdb84bcabbdf5d546bfd8ac55
-rw-r--r--apps/pci/optimizers/solver/ml_model.py2
-rw-r--r--pom.xml2
-rw-r--r--test/apps/pci_optimization/test_ml_model.py8
-rw-r--r--version.properties2
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/pci/optimizers/solver/ml_model.py b/apps/pci/optimizers/solver/ml_model.py
index 952708d..67402d9 100644
--- a/apps/pci/optimizers/solver/ml_model.py
+++ b/apps/pci/optimizers/solver/ml_model.py
@@ -48,7 +48,7 @@ class MlModel(object):
fixed_cells.add(cell_id)
fixed_cells.update(dzn_data.get('PCI_UNCHANGEABLE_CELLS', []))
- dzn_data['PCI_UNCHANGEABLE_CELLS'] = list(fixed_cells)
+ dzn_data['PCI_UNCHANGEABLE_CELLS'] = fixed_cells
def get_ho_details(self, cell_id):
service_id = self.config['DES']['service_id']
diff --git a/pom.xml b/pom.xml
index 1b9e3fe..64b85a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@ http://maven.apache.org/POM/4.0.0 ">
<groupId>org.onap.optf.osdf</groupId>
<artifactId>optf-osdf</artifactId>
<name>optf-osdf</name>
- <version>3.0.1-SNAPSHOT</version>
+ <version>3.0.2-SNAPSHOT</version>
<description>Optimization Service Design Framework</description>
<properties>
diff --git a/test/apps/pci_optimization/test_ml_model.py b/test/apps/pci_optimization/test_ml_model.py
index 9c617a9..3a7f76c 100644
--- a/test/apps/pci_optimization/test_ml_model.py
+++ b/test/apps/pci_optimization/test_ml_model.py
@@ -48,7 +48,7 @@ class TestMlModel(unittest.TestCase):
'NEIGHBORS': [],
'NUM_SECOND_LEVEL_NEIGHBORS': 1,
'SECOND_LEVEL_NEIGHBORS': [],
- 'PCI_UNCHANGEABLE_CELLS': [],
+ 'PCI_UNCHANGEABLE_CELLS': {},
'ORIGINAL_PCIS': []
}
@@ -70,18 +70,18 @@ class TestMlModel(unittest.TestCase):
self.Mock_req = self.patcher_req.start()
mlmodel = MlModel()
mlmodel.get_additional_inputs(dzn_data, network_cell_info)
- self.assertEqual(['Chn0001'], dzn_data['PCI_UNCHANGEABLE_CELLS'])
+ self.assertEqual({'Chn0001'}, dzn_data['PCI_UNCHANGEABLE_CELLS'])
self.patcher_req.stop()
dzn_data['PCI_UNCHANGEABLE_CELLS'] = []
self.patcher_req = patch('osdf.adapters.dcae.des.extract_data', side_effect=DESException('error'))
self.Mock_req = self.patcher_req.start()
mlmodel.get_additional_inputs(dzn_data, network_cell_info)
- self.assertEqual([], dzn_data['PCI_UNCHANGEABLE_CELLS'])
+ self.assertEqual(set() , dzn_data['PCI_UNCHANGEABLE_CELLS'])
self.patcher_req.stop()
self.patcher_req = patch('osdf.adapters.dcae.des.extract_data', return_value=[])
self.Mock_req = self.patcher_req.start()
mlmodel.get_additional_inputs(dzn_data, network_cell_info)
- self.assertEqual([], dzn_data['PCI_UNCHANGEABLE_CELLS'])
+ self.assertEqual(set() , dzn_data['PCI_UNCHANGEABLE_CELLS'])
self.patcher_req.stop()
diff --git a/version.properties b/version.properties
index 21229ea..a97b48e 100644
--- a/version.properties
+++ b/version.properties
@@ -19,7 +19,7 @@
major=3
minor=0
-patch=1
+patch=2
base_version=${major}.${minor}.${patch}