summaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2022-08-07 20:20:06 -0400
committerKAPIL SINGAL <ks220y@att.com>2022-08-22 19:30:33 +0000
commitedd7b5679350130e8cf5b2de01140dc09d01a80c (patch)
tree246b4427ebd76dc378e22ea94b5cd2cbd494c377 /ms
parentcc2dbf6d08840ba0e105e44022568d9afd130273 (diff)
Refactoring to support H2 DB for local run
Updating pom.xml to remove scope test for H2 DB Updating H2DB version to 1.4.200 Updating application-dev.properties DB properties to H2 DB Issue-ID: CCSDK-3740 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I57f90a0b0788510ab736d2f9dce28a0cbf3da12d
Diffstat (limited to 'ms')
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application-dev.properties22
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/pom.xml1
-rwxr-xr-xms/blueprintsprocessor/parent/pom.xml7
-rw-r--r--ms/py-executor/resource_resolution/README.md4
-rw-r--r--ms/py-executor/resource_resolution/tests/http_client_test.py4
5 files changed, 18 insertions, 20 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
index e20e2649d..cac9a0034 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
@@ -22,7 +22,7 @@
#Current paths assume relative paths to $CDS_DIR/ms/blueprintsprocessor/application
# Web server config
-server.port=8081
+server.port=8080
# Used in Health Check
security.user.password: {bcrypt}$2a$10$duaUzVUVW0YPQCSIbGEkQOXwafZGwQ/b32/Ys4R1iwSSawFgz7QNu
security.user.name: ccsdkapps
@@ -51,7 +51,7 @@ blueprintsprocessor.loadCbaExtension=zip
### END -Controller Blueprints Properties
blueprintsprocessor.grpcEnable=false
-blueprintsprocessor.httpPort=8081
+blueprintsprocessor.httpPort=8080
blueprintsprocessor.grpcPort=9111
# Command executor
@@ -75,20 +75,20 @@ blueprintsprocessor.grpcclient.py-executor.trustCertCollection=src/main/resource
# db
-blueprintsprocessor.db.url=jdbc:mysql://localhost:3306/sdnctl
-blueprintsprocessor.db.username=sdnctl
-blueprintsprocessor.db.password=sdnctl
-blueprintsprocessor.db.driverClassName=org.mariadb.jdbc.Driver
+blueprintsprocessor.db.url=jdbc:h2:mem:sdnctl;MODE=MySQL;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+blueprintsprocessor.db.username=sa
+blueprintsprocessor.db.password=password
+blueprintsprocessor.db.driverClassName=org.h2.Driver
blueprintsprocessor.db.hibernateHbm2ddlAuto=update
blueprintsprocessor.db.hibernateDDLAuto=update
blueprintsprocessor.db.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
-blueprintsprocessor.db.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
+blueprintsprocessor.db.hibernateDialect=org.hibernate.dialect.H2Dialect
# processor-db endpoint
-blueprintsprocessor.db.processor-db.type=maria-db
-blueprintsprocessor.db.processor-db.url=jdbc:mysql://localhost:3306/sdnctl
-blueprintsprocessor.db.processor-db.username=root
-blueprintsprocessor.db.processor-db.password=secretpassword
+blueprintsprocessor.db.processor-db.type=mysql-db
+blueprintsprocessor.db.processor-db.url=jdbc:h2:mem:sdnctl;MODE=MySQL;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
+blueprintsprocessor.db.processor-db.username=sa
+blueprintsprocessor.db.processor-db.password=password
# Python executor
### If testing in docker, use the absolute paths as Docker view of filesystem will not respect relative paths.
diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml
index 3ee279cec..42a425c4a 100644
--- a/ms/blueprintsprocessor/modules/inbounds/pom.xml
+++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml
@@ -92,7 +92,6 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
- <scope>test</scope>
</dependency>
</dependencies>
</project>
diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml
index 8f4af1fbd..99ae887de 100755
--- a/ms/blueprintsprocessor/parent/pom.xml
+++ b/ms/blueprintsprocessor/parent/pom.xml
@@ -38,14 +38,14 @@
<onap.logger.slf4j>1.2.2</onap.logger.slf4j>
<hazelcast.version>4.2.2</hazelcast.version>
- <h2database.version>1.4.197</h2database.version>
+ <h2database.version>1.4.200</h2database.version>
<powermock.version>1.7.4</powermock.version>
<mockkserver.version>5.5.1</mockkserver.version>
<json.unit.version>2.8.0</json.unit.version>
<xmlunit.version>2.6.3</xmlunit.version>
-
-
+
+
<sshd.version>2.2.0</sshd.version>
<jsch.version>0.1.55</jsch.version>
<jslt.version>0.1.8</jslt.version>
@@ -499,7 +499,6 @@
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2database.version}</version>
- <scope>test</scope>
</dependency>
<!-- Test Dependency -->
diff --git a/ms/py-executor/resource_resolution/README.md b/ms/py-executor/resource_resolution/README.md
index 3920338ae..275073583 100644
--- a/ms/py-executor/resource_resolution/README.md
+++ b/ms/py-executor/resource_resolution/README.md
@@ -150,7 +150,7 @@ from resource_resolution.resource_resolution import ResourceResolution
if __name__ == "__main__":
# If you want to use only HTTP you don't have to use context manager
r = ResourceResolution(
- http_server_port=8081,
+ http_server_port=8080,
http_auth_user="ccsdkapps",
http_auth_pass="ccsdkapps",
http_use_tls=False
@@ -177,4 +177,4 @@ if __name__ == "__main__":
resolution_key="test",
)
assert another_template.result == "another_value"
-``` \ No newline at end of file
+```
diff --git a/ms/py-executor/resource_resolution/tests/http_client_test.py b/ms/py-executor/resource_resolution/tests/http_client_test.py
index 2279fde7a..2c38457df 100644
--- a/ms/py-executor/resource_resolution/tests/http_client_test.py
+++ b/ms/py-executor/resource_resolution/tests/http_client_test.py
@@ -30,9 +30,9 @@ def test_http_client(request_mock):
assert c.protocol == "http"
assert c.url == "http://127.0.0.1:8080/api/v1"
- c = Client("127.0.0.1", 8081, use_ssl=True)
+ c = Client("127.0.0.1", 8080, use_ssl=True)
assert c.protocol == "https"
- assert c.url == "https://127.0.0.1:8081/api/v1"
+ assert c.url == "https://127.0.0.1:8080/api/v1"
c.send_request("GET", "something")
request_mock.assert_called_once_with(method="GET", url=f"{c.url}/something", verify=False, auth=None)