summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-12-03 19:42:59 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-03 19:42:59 +0000
commit8bc8a2ed3d2ade7487d215f5bc11223fcfc3f7f9 (patch)
tree5915be7bc0730cccfc9f361e0fa7931d3f3658cb /ms/blueprintsprocessor
parentfa5535933ab1bffdaef076a883cfa833179975a4 (diff)
parentbd28818bdba4ede90fe80877bf6839004516000a (diff)
Merge "Enable Webflux Service."
Diffstat (limited to 'ms/blueprintsprocessor')
-rw-r--r--ms/blueprintsprocessor/application/pom.xml4
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java8
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java9
-rw-r--r--ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt5
-rw-r--r--ms/blueprintsprocessor/parent/pom.xml15
5 files changed, 31 insertions, 10 deletions
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index 086a9883..4e652d50 100644
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -36,10 +36,6 @@
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
<!-- North Bound -->
<dependency>
<groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java
index 72fa260b..3537a91d 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java
@@ -20,14 +20,12 @@ package org.onap.ccsdk.apps.blueprintsprocessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.Arrays;
import java.util.Collections;
@@ -39,8 +37,10 @@ import java.util.Set;
*
* @author Brinda Santh 8/13/2018
*/
-@Configuration
-@EnableSwagger2
+//@Configuration
+//@EnableSwagger2
+@SuppressWarnings("unused")
+@Deprecated
public class SwaggerConfig {
@Bean
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java
index 3742f560..796a2d79 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java
@@ -35,4 +35,13 @@ public class WebConfig extends WebFluxConfigurationSupport {
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}
+
+ @Override
+ public void addCorsMappings(CorsRegistry corsRegistry) {
+ corsRegistry.addMapping("/**")
+ .allowedOrigins("*")
+ .allowedMethods("*")
+ .allowedHeaders("DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range")
+ .maxAge(3600);
+ }
}
diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
index adce865a..427063e4 100644
--- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
+++ b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
@@ -108,6 +108,11 @@ open class Flags {
open class Status {
@get:ApiModelProperty(required = true)
var code: Int = 200
+ @get:ApiModelProperty(required = true)
+ var eventType: String = "EVENT-ACTION-RESPONSE"
+ @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z")
+ @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+ var timestamp: Date = Date()
@get:ApiModelProperty(required = false)
var errorMessage: String? = null
@get:ApiModelProperty(required = true)
diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml
index ba8e9211..3ad3fef3 100644
--- a/ms/blueprintsprocessor/parent/pom.xml
+++ b/ms/blueprintsprocessor/parent/pom.xml
@@ -30,8 +30,8 @@
<name>Blueprints Processor Parent</name>
<description>Blueprints Processor Parent</description>
<properties>
- <spring.boot.version>2.0.6.RELEASE</spring.boot.version>
- <spring.version>5.0.10.RELEASE</spring.version>
+ <spring.boot.version>2.1.1.RELEASE</spring.boot.version>
+ <spring.version>5.1.3.RELEASE</spring.version>
<kotlin.version>1.3.10</kotlin.version>
<kotlin.maven.version>1.3.10</kotlin.maven.version>
<kotlin.couroutines.version>1.0.1</kotlin.couroutines.version>
@@ -98,6 +98,11 @@
<!-- GRPC Dependencies -->
<dependency>
<groupId>io.grpc</groupId>
+ <artifactId>grpc-core</artifactId>
+ <version>${grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>${grpc.version}</version>
</dependency>
@@ -273,6 +278,12 @@
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-testing</artifactId>
+ <version>${grpc.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</dependencyManagement>