diff options
9 files changed, 63 insertions, 7 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 ; @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>2.0.0-SNAPSHOT</version> + <version>2.0.0</version> </parent> <groupId>org.onap.sdnc.apps</groupId> |