diff options
author | 2020-08-05 17:43:36 -0400 | |
---|---|---|
committer | 2020-08-07 13:56:30 -0400 | |
commit | 59be7ffb51674ef1c58b83c80214ef417bc211f3 (patch) | |
tree | 0eb4a4f89b69c1ae9340b334a563d0ab224a3faf /ms/generic-resource-api | |
parent | d998254cf8b8888b85cca8f59f9efeed5a55f053 (diff) |
Fix docker-compose test issues
Fix issues running service-topology-operation via docker-compose
Issue-ID: SDNC-1310
Change-Id: I5c30c7a07f6baf9f2560b4dc405999abeb0441cf
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/generic-resource-api')
8 files changed, 62 insertions, 6 deletions
diff --git a/ms/generic-resource-api/pom.xml b/ms/generic-resource-api/pom.xml index 0b0434a..3b4b8d7 100644 --- a/ms/generic-resource-api/pom.xml +++ b/ms/generic-resource-api/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>spring-boot-starter-parent</artifactId> - <version>2.0.0-SNAPSHOT</version> + <version>2.0.0</version> </parent> <groupId>org.onap.sdnc.apps</groupId> diff --git a/ms/generic-resource-api/src/main/dc/docker-compose.yaml b/ms/generic-resource-api/src/main/dc/docker-compose.yaml index 9d85c39..0117fee 100755 --- a/ms/generic-resource-api/src/main/dc/docker-compose.yaml +++ b/ms/generic-resource-api/src/main/dc/docker-compose.yaml @@ -2,7 +2,7 @@ version: '2.1' services: db: - image: mariadb:10.3 + image: mariadb:10.5 container_name: gra_db_container ports: - "13306:3306" diff --git a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java index ca22fff..2c89ed4 100644 --- a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java +++ b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/ConfigServices.java @@ -11,10 +11,11 @@ import javax.persistence.*; @Table(name="CONFIG_GRA_SERVICES") public class ConfigServices { @Id + @Length(max = 100) + @Column(length = 100) String svcInstanceId; @Lob - @Column(columnDefinition = "clob") String svcData; // Service status fields diff --git a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPreloadData.java b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPreloadData.java index c39e24f..c63926d 100644 --- a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPreloadData.java +++ b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalPreloadData.java @@ -39,7 +39,7 @@ public class OperationalPreloadData { private String preloadType; @Lob - @Column(columnDefinition = "clob") + @Column(length=10000) private String preloadData; public OperationalPreloadData() { diff --git a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalServices.java b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalServices.java index c1d361d..5686c4c 100644 --- a/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalServices.java +++ b/ms/generic-resource-api/src/main/java/org/onap/sdnc/apps/ms/gra/data/OperationalServices.java @@ -10,10 +10,11 @@ import javax.persistence.*; @Table(name="OPERATIONAL_GRA_SERVICES") public class OperationalServices { @Id + @Length(max = 100) + @Column(length = 100) String svcInstanceId; @Lob - @Column(columnDefinition = "clob") String svcData; // Service status fields diff --git a/ms/generic-resource-api/src/main/resources/application.properties b/ms/generic-resource-api/src/main/resources/application.properties index ac4ed2f..db03246 100644 --- a/ms/generic-resource-api/src/main/resources/application.properties +++ b/ms/generic-resource-api/src/main/resources/application.properties @@ -6,6 +6,8 @@ spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false logging.level.com.att=TRACE logging.level.org.onap=TRACE spring.datasource.url=jdbc:mariadb://${MYSQL_DB_HOST}:3306/sdnctl +spring.datasource.hikari.data-source-properties.useUnicode=true +spring.datasource.hikari.data-source-properties.characterEncoding=UTF-8 spring.datasource.username=sdnc spring.datasource.password=abc123 spring.datasource.driver-class-name=org.mariadb.jdbc.Driver @@ -13,6 +15,7 @@ spring.datasource.platform=mariadb spring.datasource.testWhileIdle=true spring.datasource.validationQuery=SELECT 1 spring.jpa.show-sql=true +spring.jpa.generate-ddl=true spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl # spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy diff --git a/ms/generic-resource-api/src/main/resources/schema-derby.sql b/ms/generic-resource-api/src/main/resources/schema-derby.sql index 2ff2d15..52afd71 100644 --- a/ms/generic-resource-api/src/main/resources/schema-derby.sql +++ b/ms/generic-resource-api/src/main/resources/schema-derby.sql @@ -2670,3 +2670,29 @@ CREATE TABLE VNF_RELATED_NETWORK_ROLE ( PRIMARY KEY (vnf_customization_uuid,network_role,related_network_role) ) ; +CREATE TABLE CONFIG_GRA_SERVICES ( + svcInstanceId varchar(255) not null, + serviceStatusAction varchar(255), + serviceStatusFinalIndicator varchar(255), + serviceStatusRequestStatus varchar(255), + serviceStatusResponseCode varchar(255), + serviceStatusResponseMessage varchar(255), + serviceStatusResponseTimestamp varchar(255), + serviceStatusRpcAction varchar(255), + serviceStatusRpcName varchar(255), + svcData clob, primary key (svcInstanceId) +) ; + +CREATE TABLE OPERATIONAL_GRA_SERVICES ( + svcInstanceId varchar(255) not null, + serviceStatusAction varchar(255), + serviceStatusFinalIndicator varchar(255), + serviceStatusRequestStatus varchar(255), + serviceStatusResponseCode varchar(255), + serviceStatusResponseMessage varchar(255), + serviceStatusResponseTimestamp varchar(255), + serviceStatusRpcAction varchar(255), + serviceStatusRpcName varchar(255), + svcData clob, + primary key (svcInstanceId) +) ; diff --git a/ms/generic-resource-api/src/main/resources/schema-mariadb.sql b/ms/generic-resource-api/src/main/resources/schema-mariadb.sql index a1a8b5a..ee3b997 100644 --- a/ms/generic-resource-api/src/main/resources/schema-mariadb.sql +++ b/ms/generic-resource-api/src/main/resources/schema-mariadb.sql @@ -1,5 +1,4 @@ - -- -- Table structure for table `ACCESS_LOG` -- @@ -2762,3 +2761,29 @@ CREATE TABLE IF NOT EXISTS `VNF_RELATED_NETWORK_ROLE` ( PRIMARY KEY (`vnf_customization_uuid`,`network_role`,`related_network_role`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE CONFIG_GRA_SERVICES ( + svcInstanceId varchar(255) not null, + serviceStatusAction varchar(255), + serviceStatusFinalIndicator varchar(255), + serviceStatusRequestStatus varchar(255), + serviceStatusResponseCode varchar(255), + serviceStatusResponseMessage varchar(255), + serviceStatusResponseTimestamp varchar(255), + serviceStatusRpcAction varchar(255), + serviceStatusRpcName varchar(255), + svcData longtext, primary key (svcInstanceId) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ; + +CREATE TABLE OPERATIONAL_GRA_SERVICES ( + svcInstanceId varchar(255) not null, + serviceStatusAction varchar(255), + serviceStatusFinalIndicator varchar(255), + serviceStatusRequestStatus varchar(255), + serviceStatusResponseCode varchar(255), + serviceStatusResponseMessage varchar(255), + serviceStatusResponseTimestamp varchar(255), + serviceStatusRpcAction varchar(255), + serviceStatusRpcName varchar(255), + svcData longtext, + primary key (svcInstanceId) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ; |