diff options
Diffstat (limited to 'ms')
7 files changed, 214 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt index e42d7085..d8472ede 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt @@ -74,7 +74,7 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS // Get the Rest Client Service val restClientService = blueprintWebClientService(resourceAssignment, sourceProperties) val response = restClientService.getResource(urlPath, String::class.java) - if (response.isNotBlank()) { + if (response.isBlank()) { logger.warn("Failed to get $dSource result for dictionary name ($dName) using urlPath ($urlPath)") } else { populateResource(resourceAssignment, sourceProperties, response, path) diff --git a/ms/cds-sdc-listener/application/pom.xml b/ms/cds-sdc-listener/application/pom.xml new file mode 100644 index 00000000..a5e6f1e5 --- /dev/null +++ b/ms/cds-sdc-listener/application/pom.xml @@ -0,0 +1,58 @@ +<!-- + ~ Copyright (C) 2019 Bell Canada. All rights reserved. + ~ + ~ NOTICE: All the intellectual and technical concepts contained herein are + ~ proprietary to Bell Canada and are protected by trade secret or copyright law. + ~ Unauthorized copying of this file, via any medium is strictly prohibited. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>spring-boot-1-starter-parent</artifactId> + <version>1.2.1-SNAPSHOT</version> + <relativePath /> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>application</artifactId> + <name>CDS-SDC Listener Application </name> + + <dependencies> + <!-- Spring boot --> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-devtools</artifactId> + <optional>true</optional> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <id>repackage</id> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> diff --git a/ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/apps/cdssdclistener/CdsSdcListenerApplication.java b/ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/apps/cdssdclistener/CdsSdcListenerApplication.java new file mode 100644 index 00000000..661f8cb5 --- /dev/null +++ b/ms/cds-sdc-listener/application/src/main/java/org/onap/ccsdk/apps/cdssdclistener/CdsSdcListenerApplication.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2019 Bell Canada. All rights reserved. + * + * NOTICE: All the intellectual and technical concepts contained herein are + * proprietary to Bell Canada and are protected by trade secret or copyright law. + * Unauthorized copying of this file, via any medium is strictly prohibited. + */ + +package org.onap.ccsdk.apps.cdssdclistener; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CdsSdcListenerApplication { + public static void main(String[] args) { + SpringApplication.run(CdsSdcListenerApplication.class, args); + } +} diff --git a/ms/cds-sdc-listener/distribution/pom.xml b/ms/cds-sdc-listener/distribution/pom.xml new file mode 100644 index 00000000..9ff555fc --- /dev/null +++ b/ms/cds-sdc-listener/distribution/pom.xml @@ -0,0 +1,106 @@ +<!-- + ~ Copyright (C) 2019 Bell Canada. All rights reserved. + ~ + ~ NOTICE: All the intellectual and technical concepts contained herein are + ~ proprietary to Bell Canada and are protected by trade secret or copyright law. + ~ Unauthorized copying of this file, via any medium is strictly prohibited. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>cds-sdc-listener</artifactId> + <groupId>org.onap.ccsdk.apps</groupId> + <version>0.4.1-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>distribution</artifactId> + <name>CDS-SDC Listener Distribution</name> + + <properties> + <image.name>onap/ccsdk-cdssdclistener</image.name> + <docker.push.phase>deploy</docker.push.phase> + </properties> + + <build> + <plugins> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>copy-dockerfile</id> + <goals> + <goal>copy-resources</goal> + </goals> + <phase>validate</phase> + <configuration> + <outputDirectory>${basedir}/target/docker-stage</outputDirectory> + <resources> + <resource> + <directory>src/main/docker</directory> + <includes> + <include>*</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <!-- Maven plugin for managing docker images and containers --> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.26.1</version> + <inherited>false</inherited> + <configuration> + <images> + <image> + <name>${image.name}</name> + <build> + <cleanup>try</cleanup> + <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> + <imagetags> + <imageTag>${project.version}</imageTag> + <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag> + </imagetags> + </build> + </image> + </images> + <verbose>true</verbose> + </configuration> + <executions> + <execution> + <id>generate-images</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + <execution> + <id>push-images</id> + <phase>${docker.push.phase}</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project>
\ No newline at end of file diff --git a/ms/cds-sdc-listener/pom.xml b/ms/cds-sdc-listener/pom.xml new file mode 100644 index 00000000..3998f5f2 --- /dev/null +++ b/ms/cds-sdc-listener/pom.xml @@ -0,0 +1,28 @@ +<!-- + ~ Copyright (C) 2019 Bell Canada. All rights reserved. + ~ + ~ NOTICE: All the intellectual and technical concepts contained herein are + ~ proprietary to Bell Canada and are protected by trade secret or copyright law. + ~ Unauthorized copying of this file, via any medium is strictly prohibited. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>ccsdk-apps-ms</artifactId> + <groupId>org.onap.ccsdk.apps</groupId> + <version>0.4.1-SNAPSHOT</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + <artifactId>cds-sdc-listener</artifactId> + <name>CDS-SDC Listener Root</name> + <description>A microservice to get the cba file from SDC and store it into database at runtime</description> + <packaging>pom</packaging> + + <modules> + <module>application</module> + <module>distribution</module> + </modules> + +</project>
\ No newline at end of file diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt index d33a2f04..62ed4047 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt +++ b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt @@ -24,7 +24,7 @@ package org.onap.ccsdk.apps.controllerblueprints.resource.dict object ResourceDictionaryConstants { const val SOURCE_INPUT = "input" const val SOURCE_DEFAULT = "default" - const val SOURCE_PRIMARY_CONFIG_DATA = "primary-config-data" + const val SOURCE_PRIMARY_CONFIG_DATA = "rest" const val SOURCE_PRIMARY_DB = "primary-db" const val MODEL_DIR_RESOURCE_DEFINITION: String = "resource_dictionary" @@ -39,5 +39,6 @@ <module>blueprintsprocessor</module> <module>neng</module> <module>vlantag-api</module> + <module>cds-sdc-listener</module> </modules> </project> |