summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/application/src/main')
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.java5
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java38
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java7
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application-dev.properties10
-rwxr-xr-xms/blueprintsprocessor/application/src/main/resources/application.properties8
5 files changed, 43 insertions, 25 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.java
index 2b6f8bcf1..3d5145a22 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.java
@@ -29,13 +29,12 @@ import org.springframework.context.annotation.ComponentScan;
*/
@SpringBootApplication
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
-@ComponentScan(basePackages = {"org.onap.ccsdk.cds.controllerblueprints",
- "org.onap.ccsdk.cds.blueprintsprocessor"})
+@ComponentScan(basePackages = {"org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"})
public class BlueprintProcessorApplication {
public static void main(String[] args) {
- // This is required for ResolutionResultsServiceController.getStoredResult to accept a content-type value
+ // This is required for TemplateController.getStoredResult to accept a content-type value
// as a request parameter, e.g. &format=application%2Fxml is accepted
System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true");
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java
index 8ad3c08f2..4df55ffde 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/SwaggerConfig.java
@@ -17,8 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor;
-
+import io.swagger.annotations.Api;
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;
@@ -27,37 +28,36 @@ import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import java.util.Collections;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebFlux;
/**
* SwaggerConfig
*
* @author Brinda Santh 8/13/2018
*/
-//@Configuration
-//@EnableSwagger2
-@SuppressWarnings("unused")
-@Deprecated
+@Configuration
+@EnableSwagger2WebFlux
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
- .select()
- .apis(RequestHandlerSelectors.any())
- .paths(PathSelectors.any())
- .build()
- .apiInfo(apiInfo());
+ .select()
+ .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
+ .paths(PathSelectors.any())
+ .build()
+ .apiInfo(apiInfo());
}
private ApiInfo apiInfo() {
return new ApiInfo(
- "Blueprints Processor API",
- "Controller blueprints processor API for VNF Selfservice.",
- "1.0.0",
- "Terms of service",
- new Contact("Brinda Santh", "www.onap.com", "bs2796@onap.com"),
- "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());
+ "CDS Blueprints Processor APIs",
+ "Provide APIs to interact with CBA, their related resolved resources and templates.",
+ "0.5.0",
+ null,
+ new Contact("CCSDK Team", "www.onap.org", "onap-discuss@lists.onap.org"),
+ "Apache 2.0",
+ "http://www.apache.org/licenses/LICENSE-2.0",
+ Collections.emptyList());
}
-
-
-}
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java
index b453b8581..32abff011 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/cds/blueprintsprocessor/WebConfig.java
@@ -27,7 +27,7 @@ import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
import org.springframework.web.reactive.config.CorsRegistry;
import org.springframework.web.reactive.config.ResourceHandlerRegistry;
-import org.springframework.web.reactive.config.WebFluxConfigurationSupport;
+import org.springframework.web.reactive.config.WebFluxConfigurer;
/**
* WebConfig
@@ -35,7 +35,7 @@ import org.springframework.web.reactive.config.WebFluxConfigurationSupport;
* @author Brinda Santh 8/13/2018
*/
@Configuration
-public class WebConfig extends WebFluxConfigurationSupport {
+public class WebConfig implements WebFluxConfigurer {
@Autowired
private AuthenticationManager authenticationManager;
@@ -45,7 +45,8 @@ public class WebConfig extends WebFluxConfigurationSupport {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
- registry.addResourceHandler("swagger-ui.html")
+
+ registry.addResourceHandler("/swagger-ui.html**")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
index a94fdf390..fae1adb72 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
#
# Copyright � 2017-2018 AT&T Intellectual Property.
#
@@ -73,3 +74,12 @@ blueprintsprocessor.cliExecutor.enabled=true
### If enabling remote python executor, set this value to true
### blueprintprocessor.remoteScriptCommand.enabled=true
blueprintprocessor.remoteScriptCommand.enabled=false
+
+# Kafka-message-lib Configurations
+blueprintsprocessor.messageclient.self-service-api.topic=producer.t
+blueprintsprocessor.messageclient.self-service-api.type=kafka-basic-auth
+blueprintsprocessor.messageclient.self-service-api.bootstrapServers=127.0.0.1:9092
+blueprintsprocessor.messageclient.self-service-api.consumerTopic=receiver.t
+blueprintsprocessor.messageclient.self-service-api.groupId=receiver-id
+blueprintsprocessor.messageclient.self-service-api.clientId=default-client-id
+blueprintsprocessor.messageclient.self-service-api.kafkaEnable=false
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties
index 1319d9fb5..d6e7dc890 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties
@@ -72,3 +72,11 @@ blueprintsprocessor.restclient.primary-aai-data.url=https://aai.onap:8443
blueprintsprocessor.restclient.primary-aai-data.username=aai@aai.onap.org
blueprintsprocessor.restclient.primary-aai-data.password=demo123456!
+# Kafka-message-lib Configuration
+blueprintsprocessor.messageclient.self-service-api.topic=producer.t
+blueprintsprocessor.messageclient.self-service-api.type=kafka-basic-auth
+blueprintsprocessor.messageclient.self-service-api.bootstrapServers=127.0.0.1:9092
+blueprintsprocessor.messageclient.self-service-api.consumerTopic=receiver.t
+blueprintsprocessor.messageclient.self-service-api.groupId=receiver-id
+blueprintsprocessor.messageclient.self-service-api.clientId=default-client-id
+blueprintsprocessor.messageclient.self-service-api.kafkaEnable=false