aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2021-07-20 11:44:26 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2021-07-20 14:38:09 +0530
commitf90e03c6a749ee25df3ac74355981861d59160d0 (patch)
tree400b9f6b2ef6a07b1dbb4ebeeb58e8c026e00a45 /test
parent555e5727d1c818108ff255a1b9fe4542b768ad5c (diff)
Add cps client to PCI app
- Add CPS client - Add configuration to switch between CPS and config DB Issue-ID: OPTFRA-978 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: Ibce259123864a16e5f9e3b8e53563151d8036a88
Diffstat (limited to 'test')
-rwxr-xr-xtest/config/osdf_config.yaml9
-rw-r--r--test/configdb/test_configdb_calls.py2
-rw-r--r--test/functest/simulators/configdb/response-payloads/getCellList-netw1000.json (renamed from test/functest/simulators/configdb/response-payloads/getCellList-1000.json)0
-rw-r--r--test/functest/simulators/configdb/response-payloads/getCellList-netw2000.json (renamed from test/functest/simulators/configdb/response-payloads/getCellList-2000.json)0
-rwxr-xr-xtest/functest/simulators/simulated-config/osdf_config.yaml2
-rw-r--r--test/pci-optimization-tests/fixed_pci.json2
-rw-r--r--test/pci-optimization-tests/pci_anr_request.json2
-rw-r--r--test/pci-optimization-tests/request.json4
-rw-r--r--test/test_process_fixed_pci.py2
-rw-r--r--test/test_process_pci_anr_opt.py2
-rw-r--r--test/test_process_pci_opt.py2
11 files changed, 19 insertions, 8 deletions
diff --git a/test/config/osdf_config.yaml b/test/config/osdf_config.yaml
index 2b38ddd..05d7c6a 100755
--- a/test/config/osdf_config.yaml
+++ b/test/config/osdf_config.yaml
@@ -64,6 +64,15 @@ aaf_ca_certs: ssl_certs/aaf_root_ca.cer
pciHMSUsername: "" # pcihandler username for call back.
pciHMSPassword: "" # pcihandler password for call back.
+configClientType: configdb
+
+# config db api
+configDbUrl: http://127.0.0.1:5000/simulated/configdb
+configDbUserName: osdf
+configDbPassword: passwd
+configDbGetCellListUrl: 'getCellList'
+configDbGetNbrListUrl: 'getNbrList'
+
# Credentials for the OOF PCI Opt service
osdfPCIOptUsername: PCI-OSDF-USER
osdfPCIOptPassword: PCI-OSDF-PASSWD
diff --git a/test/configdb/test_configdb_calls.py b/test/configdb/test_configdb_calls.py
index a6f1c97..3393991 100644
--- a/test/configdb/test_configdb_calls.py
+++ b/test/configdb/test_configdb_calls.py
@@ -16,7 +16,7 @@
# -------------------------------------------------------------------------
#
-from apps.pci.optimizers.configdb import request
+from apps.pci.optimizers.config_request import request
import osdf.config.loader as config_loader
from osdf.utils.interfaces import json_from_file
from osdf.utils.programming_utils import DotDict
diff --git a/test/functest/simulators/configdb/response-payloads/getCellList-1000.json b/test/functest/simulators/configdb/response-payloads/getCellList-netw1000.json
index df23f6e..df23f6e 100644
--- a/test/functest/simulators/configdb/response-payloads/getCellList-1000.json
+++ b/test/functest/simulators/configdb/response-payloads/getCellList-netw1000.json
diff --git a/test/functest/simulators/configdb/response-payloads/getCellList-2000.json b/test/functest/simulators/configdb/response-payloads/getCellList-netw2000.json
index 77cf7db..77cf7db 100644
--- a/test/functest/simulators/configdb/response-payloads/getCellList-2000.json
+++ b/test/functest/simulators/configdb/response-payloads/getCellList-netw2000.json
diff --git a/test/functest/simulators/simulated-config/osdf_config.yaml b/test/functest/simulators/simulated-config/osdf_config.yaml
index 2f03d99..eb02b33 100755
--- a/test/functest/simulators/simulated-config/osdf_config.yaml
+++ b/test/functest/simulators/simulated-config/osdf_config.yaml
@@ -60,6 +60,8 @@ aaf_sms_timeout: 30
secret_domain: osdf
aaf_ca_certs: ssl_certs/aaf_root_ca.cer
+configClientType: configdb
+
# config db api
configDbUrl: http://127.0.0.1:5000/simulated/configdb
configDbUserName: osdf
diff --git a/test/pci-optimization-tests/fixed_pci.json b/test/pci-optimization-tests/fixed_pci.json
index 8bd159e..0038d04 100644
--- a/test/pci-optimization-tests/fixed_pci.json
+++ b/test/pci-optimization-tests/fixed_pci.json
@@ -26,7 +26,7 @@
"cellInfo": {
- "networkId": "2000",
+ "networkId": "netw2000",
"cellIdList": [
diff --git a/test/pci-optimization-tests/pci_anr_request.json b/test/pci-optimization-tests/pci_anr_request.json
index e8947b1..34e2409 100644
--- a/test/pci-optimization-tests/pci_anr_request.json
+++ b/test/pci-optimization-tests/pci_anr_request.json
@@ -12,7 +12,7 @@
"timeout": 600
},
"cellInfo": {
- "networkId": "2000",
+ "networkId": "netw2000",
"cellIdList": [
"cell20"
]
diff --git a/test/pci-optimization-tests/request.json b/test/pci-optimization-tests/request.json
index 517ee10..a8eb4f6 100644
--- a/test/pci-optimization-tests/request.json
+++ b/test/pci-optimization-tests/request.json
@@ -12,9 +12,9 @@
"timeout": 600
},
"cellInfo": {
- "networkId": "1000",
+ "networkId": "netw1000",
"cellIdList": [
"cell0"
]
}
-} \ No newline at end of file
+}
diff --git a/test/test_process_fixed_pci.py b/test/test_process_fixed_pci.py
index da68289..3d805c5 100644
--- a/test/test_process_fixed_pci.py
+++ b/test/test_process_fixed_pci.py
@@ -31,7 +31,7 @@ class TestProcessPlacementOpt(unittest.TestCase):
def setUp(self):
mock_req_accept_message = Response("Accepted Request", content_type='application/json; charset=utf-8')
- self.patcher_req = patch('apps.pci.optimizers.configdb.request',
+ self.patcher_req = patch('apps.pci.optimizers.config_request.request',
return_value={"solutionInfo": {"placementInfo": "dummy"}})
self.patcher_req_accept = patch('osdf.operation.responses.osdf_response_for_request_accept',
return_value=mock_req_accept_message)
diff --git a/test/test_process_pci_anr_opt.py b/test/test_process_pci_anr_opt.py
index b717d32..17c3e6d 100644
--- a/test/test_process_pci_anr_opt.py
+++ b/test/test_process_pci_anr_opt.py
@@ -32,7 +32,7 @@ class TestProcessPlacementOpt(unittest.TestCase):
def setUp(self):
mock_req_accept_message = Response("Accepted Request", content_type='application/json; charset=utf-8')
- self.patcher_req = patch('apps.pci.optimizers.configdb.request',
+ self.patcher_req = patch('apps.pci.optimizers.config_request.request',
return_value={"solutionInfo": {"placementInfo": "dummy"}})
self.patcher_req_accept = patch('osdf.operation.responses.osdf_response_for_request_accept',
return_value=mock_req_accept_message)
diff --git a/test/test_process_pci_opt.py b/test/test_process_pci_opt.py
index ffbc718..d52599d 100644
--- a/test/test_process_pci_opt.py
+++ b/test/test_process_pci_opt.py
@@ -31,7 +31,7 @@ class TestProcessPlacementOpt(unittest.TestCase):
def setUp(self):
mock_req_accept_message = Response("Accepted Request", content_type='application/json; charset=utf-8')
- self.patcher_req = patch('apps.pci.optimizers.configdb.request',
+ self.patcher_req = patch('apps.pci.optimizers.config_request.request',
return_value={"solutionInfo": {"placementInfo": "dummy"}})
self.patcher_req_accept = patch('osdf.operation.responses.osdf_response_for_request_accept',
return_value=mock_req_accept_message)