diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2019-11-22 15:02:21 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2019-12-06 10:22:10 +0000 |
commit | ba8a72f9ac68fbdf04f9470960fae496aa49fa71 (patch) | |
tree | 2a726c59d29a6d68fc29058d5e0d5c916bbe1702 /test/vcpe/vcpecommon.py | |
parent | 62a4764febf13ad678593d4ff8fc52e430564cf1 (diff) |
Insert vcpe customer service workflow into SO catalogdb
Customer service workflow entry will be automatically
inserted into catalogdb database if running with
oom_mode set to True.
So database endpoint properties were updated to
reflect current catalogdb location.
vCPE doc updated to reflect the changes made.
Change-Id: I54ef0bf94ccf2d38501c1b854cafe4d388a4b35d
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Issue-ID: TEST-205
Diffstat (limited to 'test/vcpe/vcpecommon.py')
-rwxr-xr-x | test/vcpe/vcpecommon.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/vcpe/vcpecommon.py b/test/vcpe/vcpecommon.py index ddbce4b24..ffc63347f 100755 --- a/test/vcpe/vcpecommon.py +++ b/test/vcpe/vcpecommon.py @@ -191,6 +191,11 @@ class VcpeCommon: '/restconf/config/GENERIC-RESOURCE-API:' ############################################################################################# + # MARIADB-GALERA settings + self.mariadb_galera_endpoint_ip = self.get_k8s_service_endpoint_info('mariadb-galera','ip') + self.mariadb_galera_endpoint_port = self.get_k8s_service_endpoint_info('mariadb-galera','port') + + ############################################################################################# # SO urls, note: do NOT add a '/' at the end of the url self.so_req_api_url = {'v4': 'http://' + self.hosts['so'] + ':' + self.so_nbi_port + '/onap/so/infra/serviceInstantiation/v7/serviceInstances', 'v5': 'http://' + self.hosts['so'] + ':' + self.so_nbi_port + '/onap/so/infra/serviceInstantiation/v7/serviceInstances'} @@ -200,7 +205,8 @@ class VcpeCommon: self.so_db_name = 'catalogdb' self.so_db_user = 'root' self.so_db_pass = 'secretpassword' - self.so_db_port = '30252' if self.oom_mode else '32769' + self.so_db_host = self.mariadb_galera_endpoint_ip if self.oom_mode else self.hosts['so'] + self.so_db_port = self.mariadb_galera_endpoint_port if self.oom_mode else '3306' self.vpp_inf_url = 'http://{0}:8183/restconf/config/ietf-interfaces:interfaces' self.vpp_api_headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} @@ -219,11 +225,6 @@ class VcpeCommon: self.policy_pap_service_name = 'policy-pap' ############################################################################################# - # MARIADB-GALERA settings - self.mariadb_galera_endpoint_ip = self.get_k8s_service_endpoint_info('mariadb-galera','ip') - self.mariadb_galera_endpoint_port = self.get_k8s_service_endpoint_info('mariadb-galera','port') - - ############################################################################################# # AAI urls self.aai_region_query_url = 'https://' + self.oom_so_sdnc_aai_ip + ':' +\ self.aai_query_port +\ @@ -299,7 +300,7 @@ class VcpeCommon: def execute_cmds_so_db(self, cmds): self.execute_cmds_db(cmds, self.so_db_user, self.so_db_pass, self.so_db_name, - self.hosts['so'], self.so_db_port) + self.so_db_host, self.so_db_port) def execute_cmds_db(self, cmds, dbuser, dbpass, dbname, host, port): cnx = mysql.connector.connect(user=dbuser, password=dbpass, database=dbname, host=host, port=port) |