+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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-starter-parent</artifactId>
- <version>1.2.2-SNAPSHOT</version>
- </parent>
-
- <groupId>org.onap.ccsdk.cds</groupId>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>cds-sdc-listener-application</artifactId>
- <version>0.4.2-SNAPSHOT</version>
- <name>CDS-SDC Listener Application</name>
-
- <properties>
- <grpc.version>1.17.1</grpc.version>
- <protobuf.version>3.6.1</protobuf.version>
- <image.name>onap/ccsdk-cds-sdc-listener</image.name>
- <docker.push.phase>deploy</docker.push.phase>
- <project.version>${parent.version}</project.version>
- <!-- Start of Docker Related Properties -->
- <docker.fabric.version>0.26.1</docker.fabric.version>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- </properties>
-
- <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>
-
- <!-- SDC Distribution client dependency -->
- <dependency>
- <groupId>org.onap.sdc.sdc-distribution-client</groupId>
- <artifactId>sdc-distribution-client</artifactId>
- <version>1.3.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.jmockit</groupId>
- <artifactId>jmockit</artifactId>
- <version>1.19</version>
- <scope>test</scope>
- </dependency>
-
- <!-- GRPC Dependencies -->
- <dependency>
- <groupId>io.grpc</groupId>
- <artifactId>grpc-netty</artifactId>
- <version>${grpc.version}</version>
- </dependency>
- <dependency>
- <groupId>io.grpc</groupId>
- <artifactId>grpc-protobuf</artifactId>
- <version>${grpc.version}</version>
- </dependency>
- <dependency>
- <groupId>io.grpc</groupId>
- <artifactId>grpc-stub</artifactId>
- <version>${grpc.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.protobuf</groupId>
- <artifactId>protobuf-java</artifactId>
- <version>${protobuf.version}</version>
- </dependency>
- <dependency>
- <groupId>io.grpc</groupId>
- <artifactId>grpc-testing</artifactId>
- <version>${grpc.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.cds.components</groupId>
- <artifactId>proto-definition</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>io.projectreactor</groupId>
- <artifactId>reactor-core</artifactId>
- <version>3.2.6.RELEASE</version>
- <scope>compile</scope>
- </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>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.8</version>
- <executions>
- <execution>
- <id>copy</id>
- <phase>package</phase>
- <configuration>
- <target>
- <echo>ANT TASK - copying Docker files</echo>
- <copy todir="${basedir}/target/docker-stage" overwrite="true" flatten="true">
- <fileset dir="${basedir}/src/main/docker">
- <include name="Dockerfile"/>
- <include name="start.sh"/>
- </fileset>
- <fileset dir="${basedir}/target">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${basedir}/src/main/resources/">
- <include name="application.yml"/>
- </fileset>
- </copy>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>${basedir}/../../../TagVersion.groovy</source>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>docker</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker.fabric.version}</version>
- <inherited>false</inherited>
- <configuration>
- <images>
- <image>
- <name>${image.name}</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
- <tags>
- <tag>${project.docker.latestminortag.version}</tag>
- <tag>${project.docker.latestfulltag.version}</tag>
- <tag>${project.docker.latesttagtimestamp.version}</tag>
- </tags>
- </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>
+++ /dev/null
-FROM openjdk:8-jdk-alpine
-
-ENV HTTP_PROXY ${HTTP_PROXY}
-ENV HTTPS_PROXY ${HTTPS_PROXY}
-
-RUN mkdir -p /opt/app/onap/ /opt/app/onap/config
-WORKDIR /opt/app/onap/
-COPY start.sh /opt/app/onap/
-COPY application.yml /opt/app/onap/config
-RUN chmod 751 /opt/app/onap/start.sh
-COPY cds-sdc-listener-application-0.4.2-SNAPSHOT.jar /opt/app/onap/cds-sdc-listener-distribution.jar
-EXPOSE 9000
-ENTRYPOINT /opt/app/onap/start.sh
+++ /dev/null
-#!/bin/sh
-extraArgs=$@
-java -jar /opt/app/onap/cds-sdc-listener-distribution.jar \
--Dspring.config=/opt/app/onap/config/application.yml \
--Djava.security.egd=file:/dev/./urandom \
-${extraArgs}
<module>controllerblueprints</module>
<module>blueprintsprocessor</module>
<module>command-executor</module>
- <module>cds-sdc-listener</module>
+ <module>sdclistener</module>
</modules>
</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+
+ <artifactId>application</artifactId>
+ <packaging>jar</packaging>
+ <version>0.4.2-SNAPSHOT</version>
+ <name>SDC Listener Application</name>
+
+ <properties>
+ <protobuf.version>3.6.1</protobuf.version>
+ <project.version>${parent.version}</project.version>
+ </properties>
+
+ <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>
+
+ <!-- SDC Distribution client dependency -->
+ <dependency>
+ <groupId>org.onap.sdc.sdc-distribution-client</groupId>
+ <artifactId>sdc-distribution-client</artifactId>
+ <version>1.3.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jmockit</groupId>
+ <artifactId>jmockit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- GRPC Dependencies -->
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-netty</artifactId>
+ <version>${grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-protobuf</artifactId>
+ <version>${grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-stub</artifactId>
+ <version>${grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-testing</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.components</groupId>
+ <artifactId>proto-definition</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>io.projectreactor</groupId>
+ <artifactId>reactor-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@SpringBootApplication
-@EnableConfigurationProperties(CdsSdcListenerConfiguration.class)
-public class CdsSdcListenerApplication {
+@EnableConfigurationProperties(SdcListenerConfiguration.class)
+public class SdcListenerApplication {
public static void main(String[] args) {
- SpringApplication.run(CdsSdcListenerApplication.class, args);
+ SpringApplication.run(SdcListenerApplication.class, args);
}
}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
import java.util.List;
import org.onap.sdc.api.consumer.IConfiguration;
* distribution client needs.
*/
@ConfigurationProperties("listenerservice")
-public class CdsSdcListenerConfiguration implements IConfiguration {
+public class SdcListenerConfiguration implements IConfiguration {
public static final String TOSCA_CSAR = "TOSCA_CSAR";
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
import static org.onap.sdc.utils.DistributionActionResultEnum.SUCCESS;
import java.io.File;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.service.ListenerService;
-import org.onap.ccsdk.cds.cdssdclistener.status.CdsSdcListenerStatus;
-import org.onap.ccsdk.cds.cdssdclistener.util.FileUtil;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.service.ListenerService;
+import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
+import org.onap.ccsdk.cds.sdclistener.util.FileUtil;
import org.onap.sdc.api.IDistributionClient;
import org.onap.sdc.api.consumer.INotificationCallback;
import org.onap.sdc.api.notification.IArtifactInfo;
@ConfigurationProperties("listenerservice")
@Component
@ComponentScan("org.onap.ccsdk.cds.cdssdclistener.dto")
-public class CdsSdcListenerNotificationCallback implements INotificationCallback {
+public class SdcListenerNotificationCallback implements INotificationCallback {
@Autowired
- private CdsSdcListenerDto cdsSdcListenerDto;
+ private SdcListenerDto sdcListenerDto;
@Autowired
private ListenerService listenerService;
private String pathToStoreArchives;
@Autowired
- private CdsSdcListenerStatus listenerStatus;
+ private SdcListenerStatus listenerStatus;
- private static final Logger LOGGER = LoggerFactory.getLogger(CdsSdcListenerNotificationCallback.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(SdcListenerNotificationCallback.class);
@Override
public void activateCallback(INotificationData notificationData) {
final String distributionId = notificationData.getDistributionID();
- cdsSdcListenerDto.setDistributionId(distributionId);
+ sdcListenerDto.setDistributionId(distributionId);
LOGGER.info("Received service distribution from SDC with the id {}", distributionId);
processNotification(notificationData);
}
private void processNotification(INotificationData notificationData) {
- final IDistributionClient distributionClient = cdsSdcListenerDto.getDistributionClient();
+ final IDistributionClient distributionClient = sdcListenerDto.getDistributionClient();
notificationData.getServiceArtifacts()
.forEach(artifactInfo -> downloadCsarArtifacts(artifactInfo, distributionClient));
}
final String url = info.getArtifactURL();
final String id = info.getArtifactUUID();
- if (Objects.equals(info.getArtifactType(), CdsSdcListenerConfiguration.TOSCA_CSAR)) {
+ if (Objects.equals(info.getArtifactType(), SdcListenerConfiguration.TOSCA_CSAR)) {
LOGGER.info("Trying to download the artifact from : {} and UUID is {} ", url, id);
// Download the artifact
if (!Objects.equals(result.getDistributionActionResult(), SUCCESS)) {
String errorMessage = String.format("Failed to download the artifact from : %s due to %s ", url,
result.getDistributionActionResult());
- listenerStatus.sendResponseStatusBackToSDC(cdsSdcListenerDto.getDistributionId(),
+ listenerStatus.sendResponseStatusBackToSDC(sdcListenerDto.getDistributionId(),
DistributionStatusEnum.COMPONENT_DONE_ERROR, errorMessage);
LOGGER.error(errorMessage);
} else {
}
}
- listenerService.saveBluePrintToCdsDatabase(cbaArchivePath, cdsSdcListenerDto.getManagedChannelForGrpc());
+ listenerService.saveBluePrintToCdsDatabase(cbaArchivePath, sdcListenerDto.getManagedChannelForGrpc());
}
}
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.client;
+package org.onap.ccsdk.cds.sdclistener.client;
import io.grpc.CallOptions;
import io.grpc.Channel;
*/
@ConfigurationProperties("listenerservice")
@Component
-public class CdsSdcListenerAuthClientInterceptor implements ClientInterceptor {
+public class SdcListenerAuthClientInterceptor implements ClientInterceptor {
@Value("${listenerservice.config.authHeader}")
private String basicAuth;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.client;
+package org.onap.ccsdk.cds.sdclistener.client;
import java.util.Optional;
-import org.onap.ccsdk.cds.cdssdclistener.CdsSdcListenerConfiguration;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.CdsSdcListenerNotificationCallback;
-import org.onap.ccsdk.cds.cdssdclistener.exceptions.CdsSdcListenerException;
+import org.onap.ccsdk.cds.sdclistener.SdcListenerConfiguration;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.SdcListenerNotificationCallback;
+import org.onap.ccsdk.cds.sdclistener.exceptions.SdcListenerException;
import org.onap.sdc.api.IDistributionClient;
import org.onap.sdc.api.results.IDistributionClientResult;
import org.onap.sdc.impl.DistributionClientFactory;
@Component
@ComponentScan("org.onap.ccsdk.cds.cdssdclistener.dto")
-public class CdsSdcListenerClient {
+public class SdcListenerClient {
- private static Logger LOG = LoggerFactory.getLogger(CdsSdcListenerClient.class);
+ private static Logger LOG = LoggerFactory.getLogger(SdcListenerClient.class);
@Autowired
- private CdsSdcListenerConfiguration configuration;
+ private SdcListenerConfiguration configuration;
@Autowired
- private CdsSdcListenerNotificationCallback notification;
+ private SdcListenerNotificationCallback notification;
@Autowired
- private CdsSdcListenerDto listenerDto;
+ private SdcListenerDto listenerDto;
private IDistributionClient distributionClient;
* This method initializes the SDC Distribution client.
*/
@EventListener(ApplicationReadyEvent.class)
- public void initSdcClient() throws CdsSdcListenerException {
+ public void initSdcClient() throws SdcListenerException {
LOG.info("Initialize the SDC distribution client");
distributionClient = Optional.of(DistributionClientFactory.createDistributionClient())
- .orElseThrow(() -> new CdsSdcListenerException("Could not able to create SDC Distribution client"));
+ .orElseThrow(() -> new SdcListenerException("Could not able to create SDC Distribution client"));
listenerDto.setManagedChannelForGrpc();
startSdcClientBasedOnTheResult(result);
}
- private void startSdcClientBasedOnTheResult(IDistributionClientResult result) throws CdsSdcListenerException {
+ private void startSdcClientBasedOnTheResult(IDistributionClientResult result) throws SdcListenerException {
if (!result.getDistributionActionResult().equals(DistributionActionResultEnum.SUCCESS)) {
- throw new CdsSdcListenerException(
+ throw new SdcListenerException(
"SDC distribution client init failed with reason:" + result.getDistributionMessageResult());
}
result = this.distributionClient.start();
if (!result.getDistributionActionResult().equals(DistributionActionResultEnum.SUCCESS)) {
- throw new CdsSdcListenerException(
+ throw new SdcListenerException(
"Startup of the SDC distribution client failed with reason: " + result.getDistributionMessageResult());
}
}
- private void closeSdcDistributionclient() throws CdsSdcListenerException {
+ private void closeSdcDistributionclient() throws SdcListenerException {
LOG.info("Closing SDC distribution client");
IDistributionClientResult status = this.distributionClient.stop();
if (status.getDistributionActionResult().equals(DistributionActionResultEnum.SUCCESS)) {
- throw new CdsSdcListenerException(
+ throw new SdcListenerException(
"Failed to close the SDC distribution client due to : " + status.getDistributionMessageResult());
}
}
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.controller;
+package org.onap.ccsdk.cds.sdclistener.controller;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.dto;
+package org.onap.ccsdk.cds.sdclistener.dto;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
import org.onap.sdc.api.IDistributionClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@Component
@ConfigurationProperties("listenerservice")
-public class CdsSdcListenerDto {
+public class SdcListenerDto {
@Value("${listenerservice.config.grpcAddress}")
private String grpcAddress;
private int grpcPort;
@Autowired
- private CdsSdcListenerAuthClientInterceptor cdsSdcListenerAuthClientInterceptor;
+ private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
private IDistributionClient distributionClient;
private ManagedChannel managedChannel;
public void setManagedChannelForGrpc() {
managedChannel = ManagedChannelBuilder.forAddress(grpcAddress, grpcPort)
.usePlaintext()
- .intercept(cdsSdcListenerAuthClientInterceptor)
+ .intercept(sdcListenerAuthClientInterceptor)
.build();
}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.exceptions;
+package org.onap.ccsdk.cds.sdclistener.exceptions;
-public class CdsSdcListenerException extends Exception {
+public class SdcListenerException extends Exception {
/**
* @param message The message to dump
*/
- public CdsSdcListenerException(final String message) {
+ public SdcListenerException(final String message) {
super(message);
}
* @param message The message to dump
* @param cause The Throwable cause object
*/
- public CdsSdcListenerException(final String message, final Throwable cause) {
+ public SdcListenerException(final String message, final Throwable cause) {
super(message, cause);
}
}
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.handler;
+package org.onap.ccsdk.cds.sdclistener.handler;
import io.grpc.ManagedChannel;
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.service;
+package org.onap.ccsdk.cds.sdclistener.service;
import io.grpc.ManagedChannel;
import java.nio.file.Path;
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.service;
+package org.onap.ccsdk.cds.sdclistener.service;
import static java.nio.file.Files.walk;
import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_ERROR;
import java.util.List;
import java.util.Optional;
import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.apache.commons.io.FileUtils;
import org.apache.tomcat.util.http.fileupload.IOUtils;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.handler.BluePrintProcesssorHandler;
-import org.onap.ccsdk.cds.cdssdclistener.status.CdsSdcListenerStatus;
-import org.onap.ccsdk.cds.cdssdclistener.util.FileUtil;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.handler.BluePrintProcesssorHandler;
+import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
+import org.onap.ccsdk.cds.sdclistener.util.FileUtil;
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput;
import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk;
private BluePrintProcesssorHandler bluePrintProcesssorHandler;
@Autowired
- private CdsSdcListenerAuthClientInterceptor cdsSdcListenerAuthClientInterceptor;
+ private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
@Autowired
- private CdsSdcListenerStatus listenerStatus;
+ private SdcListenerStatus listenerStatus;
@Autowired
- private CdsSdcListenerDto cdsSdcListenerDto;
+ private SdcListenerDto sdcListenerDto;
@Value("${listenerservice.config.grpcAddress}")
private String grpcAddress;
}
private void prepareRequestForCdsBackend(List<File> files, ManagedChannel managedChannel, String path) {
- final String distributionId = cdsSdcListenerDto.getDistributionId();
+ final String distributionId = sdcListenerDto.getDistributionId();
files.forEach(zipFile -> {
try {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.status;
+package org.onap.ccsdk.cds.sdclistener.status;
import org.onap.sdc.api.consumer.IFinalDistrStatusMessage;
import org.onap.sdc.utils.DistributionStatusEnum;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.status;
+package org.onap.ccsdk.cds.sdclistener.status;
import static org.onap.sdc.utils.DistributionActionResultEnum.SUCCESS;
import java.util.Objects;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.util.BuilderUtil;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.util.BuilderUtil;
import org.onap.sdc.api.IDistributionClient;
import org.onap.sdc.api.consumer.IFinalDistrStatusMessage;
import org.onap.sdc.api.results.IDistributionClientResult;
-import org.onap.sdc.impl.DistributionClientImpl;
import org.onap.sdc.utils.DistributionStatusEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Component
@ConfigurationProperties("listenerservice")
@ComponentScan("org.onap.ccsdk.cds.cdssdclistener.dto")
-public class CdsSdcListenerStatus {
+public class SdcListenerStatus {
- private static final Logger LOGGER = LoggerFactory.getLogger(CdsSdcListenerStatus.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(SdcListenerStatus.class);
private static final String COMPONENT_NAME = "cds";
@Value("${listenerservice.config.consumerId}")
private String consumerId;
@Autowired
- private CdsSdcListenerDto cdsSdcListenerDto;
+ private SdcListenerDto sdcListenerDto;
/**
* Send the response back to SDC.
*/
public void sendResponseStatusBackToSDC(String distributionID, DistributionStatusEnum status, String errorReason) {
- final IDistributionClient distributionClient = cdsSdcListenerDto.getDistributionClient();
+ final IDistributionClient distributionClient = sdcListenerDto.getDistributionClient();
IFinalDistrStatusMessage finalDistribution = new BuilderUtil<>(new DistributionStatusMessage())
.build(builder -> {
* 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.cds.cdssdclistener.util;
+package org.onap.ccsdk.cds.sdclistener.util;
import java.util.function.Consumer;
* Unauthorized copying of this file, via any medium is strictly prohibited.
*/
-package org.onap.ccsdk.cds.cdssdclistener.util;
+package org.onap.ccsdk.cds.sdclistener.util;
import static java.nio.file.Files.walk;
import java.io.File;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
import mockit.Expectations;
import mockit.Injectable;
import mockit.integration.junit4.JMockit;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerClient;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.exceptions.CdsSdcListenerException;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerClient;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.exceptions.SdcListenerException;
import org.onap.sdc.api.IDistributionClient;
import org.onap.sdc.api.results.IDistributionClientResult;
import org.onap.sdc.impl.DistributionClientFactory;
import org.onap.sdc.utils.DistributionActionResultEnum;
@RunWith(JMockit.class)
-public class CdsSdcListenerClientTest {
+public class SdcListenerClientTest {
@Tested
- private CdsSdcListenerClient cdsSdcListenerClient;
+ private SdcListenerClient sdcListenerClient;
@Test
public void testInitCdsClientSuccesfully(@Injectable IDistributionClient distributionClient,
- @Injectable CdsSdcListenerConfiguration configuration,
- @Injectable CdsSdcListenerNotificationCallback notification,
- @Injectable CdsSdcListenerDto cdsSdcListenerDto) throws CdsSdcListenerException {
+ @Injectable SdcListenerConfiguration configuration,
+ @Injectable SdcListenerNotificationCallback notification,
+ @Injectable SdcListenerDto sdcListenerDto) throws SdcListenerException {
//Arrange
new MockUp<DistributionClientFactory>() {
}};
// Act
- cdsSdcListenerClient.initSdcClient();
+ sdcListenerClient.initSdcClient();
// Verify
new VerificationsInOrder() {{
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener;
+package org.onap.ccsdk.cds.sdclistener;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
-@EnableConfigurationProperties(CdsSdcListenerConfiguration.class)
-@SpringBootTest(classes = {CdsSdcListenerConfigurationTest.class})
-public class CdsSdcListenerConfigurationTest {
+@EnableConfigurationProperties(SdcListenerConfiguration.class)
+@SpringBootTest(classes = {SdcListenerConfigurationTest.class})
+public class SdcListenerConfigurationTest {
@Autowired
- private CdsSdcListenerConfiguration listenerConfiguration;
+ private SdcListenerConfiguration listenerConfiguration;
@Test
public void testCdsSdcListenerConfiguration() {
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.handler;
+package org.onap.ccsdk.cds.sdclistener.handler;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput;
import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
-@EnableConfigurationProperties({BluePrintProcesssorHandler.class, CdsSdcListenerAuthClientInterceptor.class})
+@EnableConfigurationProperties({BluePrintProcesssorHandler.class, SdcListenerAuthClientInterceptor.class})
@SpringBootTest(classes = {BluePrintProcessorHandlerTest.class})
public class BluePrintProcessorHandlerTest {
private BluePrintProcesssorHandler bluePrintProcesssorHandler;
@Autowired
- private CdsSdcListenerAuthClientInterceptor cdsSdcListenerAuthClientInterceptor;
+ private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
@Rule
public GrpcCleanupRule grpcCleanup = new GrpcCleanupRule();
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.ccsdk.cds.cdssdclistener.service;
+package org.onap.ccsdk.cds.sdclistener.service;
import static junit.framework.TestCase.assertTrue;
import java.io.File;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
-import org.onap.ccsdk.cds.cdssdclistener.CdsSdcListenerConfiguration;
-import org.onap.ccsdk.cds.cdssdclistener.client.CdsSdcListenerAuthClientInterceptor;
-import org.onap.ccsdk.cds.cdssdclistener.dto.CdsSdcListenerDto;
-import org.onap.ccsdk.cds.cdssdclistener.handler.BluePrintProcesssorHandler;
-import org.onap.ccsdk.cds.cdssdclistener.status.CdsSdcListenerStatus;
+import org.onap.ccsdk.cds.sdclistener.SdcListenerConfiguration;
+import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
+import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
+import org.onap.ccsdk.cds.sdclistener.handler.BluePrintProcesssorHandler;
+import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
import org.onap.sdc.api.results.IDistributionClientDownloadResult;
import org.onap.sdc.impl.mock.DistributionClientResultStubImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
-@EnableConfigurationProperties({CdsSdcListenerAuthClientInterceptor.class,
- BluePrintProcesssorHandler.class, CdsSdcListenerDto.class, ListenerServiceImpl.class, CdsSdcListenerStatus.class,
- CdsSdcListenerConfiguration.class})
+@EnableConfigurationProperties({SdcListenerAuthClientInterceptor.class,
+ BluePrintProcesssorHandler.class, SdcListenerDto.class, ListenerServiceImpl.class, SdcListenerStatus.class,
+ SdcListenerConfiguration.class})
@SpringBootTest(classes = {ListenerServiceImplTest.class})
public class ListenerServiceImplTest {
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © 2019 IBM, Bell Canada.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <artifactId>distribution</artifactId>
+ <packaging>pom</packaging>
+ <name>SDC Listener Distribution</name>
+ <properties>
+ <assembly.id>maven</assembly.id>
+ <name.space>org.onap.ccsdk.cds</name.space>
+ <serviceArtifactName>sdclistener</serviceArtifactName>
+ <image.name>onap/ccsdk-sdclistener</image.name>
+ <!--disabled for now to mirror #85964 https://gerrit.onap.org/r/#/c/85964/2/ms/command-executor/pom.xml-->
+ <!--<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>-->
+ <docker.push.phase>deploy</docker.push.phase>
+ <docker.verbose>true</docker.verbose>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+ <artifactId>application</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-dockerfile</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <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>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ant-test</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!--build the final artifact for docker deployment -->
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.1.0</version>
+ <configuration>
+ <!-- <skipAssembly>${skip.assembly}</skipAssembly> -->
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <descriptors>
+ <descriptor>src/main/docker/distribution.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>posix</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>${assembly.id}</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${basedir}/../../../TagVersion.groovy</source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <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>
+ <tags>
+ <tag>${project.docker.latestminortag.version}</tag>
+ <tag>${project.docker.latestfulltag.version}</tag>
+ <tag>${project.docker.latesttagtimestamp.version}</tag>
+ </tags>
+ </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>
services:
cds-sdc-listener:
- image: onap/cdssdclistener:latest
+ image: onap/ccsdk-sdclistener:latest
container_name: cdssdclistener
restart: always
environment:
--- /dev/null
+FROM openjdk:8-jdk-alpine
+
+ENV HTTP_PROXY ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+
+# add entrypoint
+COPY startService.sh /startService.sh
+RUN chmod 751 /startService.sh
+# add application
+COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
+RUN tar -xzf /source.tar.gz -C /tmp \
+ && cp -rf /tmp/@project.build.finalName@/opt / \
+ && rm -rf /source.tar.gz \
+ && rm -rf /tmp/@project.build.finalName@
+
+ENTRYPOINT /startService.sh
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © 2018-2019 Bell Canada.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <!-- create a tar.gz file containing the projects dependencies -->
+ <id>${assembly.id}</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/opt/app/onap/lib</outputDirectory>
+ <outputFileNameMapping>${artifact.groupId}-${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ <excludes>
+ <exclude>org.slf4j:slf4j-simple</exclude>
+ </excludes>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/../application/src/main/resources</directory>
+ <includes>
+ <include>application.properties</include>
+ <include>application.yml</include>
+ <include>logback.xml</include>
+ </includes>
+ <outputDirectory>/opt/app/onap/config</outputDirectory>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ </fileSet>
+ </fileSets>
+</assembly>
--- /dev/null
+#!/bin/sh
+echo "Starting SDC Listener"
+
+export APP_HOME=/opt/app/onap
+export APP_CONFIG_HOME=${APP_HOME}/config
+echo "APP Config HOME : ${APP_CONFIG_HOME}"
+
+java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \
+-Dlogging.config=${APP_CONFIG_HOME}/logback.xml \
+-Djava.security.egd=file:/dev/./urandom \
+-Dspring.config.location=${APP_CONFIG_HOME}/ \
+org.onap.ccsdk.cds.sdclistener.SdcListenerApplication
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © 2017-2018 AT&T Intellectual Property.
+ ~
+ ~ Modifications Copyright © 2018 - 2019 IBM, Bell Canada
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.ccsdk.cds</groupId>
+ <artifactId>sdclistener</artifactId>
+ <version>0.4.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+ <artifactId>parent</artifactId>
+ <packaging>pom</packaging>
+ <name>SDC Listener Parent</name>
+ <description>SDC Listener Parent</description>
+ <properties>
+ <spring.boot.version>2.1.3.RELEASE</spring.boot.version>
+ <spring.version>5.1.5.RELEASE</spring.version>
+ <grpc.version>1.18.0</grpc.version>
+ <protobuff.java.utils.version>3.6.1</protobuff.java.utils.version>
+ <eelf.version>1.0.0</eelf.version>
+ <sli.version>0.4.2-SNAPSHOT</sli.version>
+ <guava.version>27.0.1-jre</guava.version>
+ <onap.logger.slf4j>1.2.2</onap.logger.slf4j>
+ <powermock.version>1.7.4</powermock.version>
+ <mockk.version>1.9</mockk.version>
+ <dmaap.client.version>1.1.5</dmaap.client.version>
+ <mockkserver.version>5.5.1</mockkserver.version>
+ <sdc-distribution-client.version>1.3.0</sdc-distribution-client.version>
+ <jmockit.version>1.19</jmockit.version>
+ <reactorcore.version>3.2.6.RELEASE</reactorcore.version>
+ </properties>
+ <dependencyManagement>
+ <dependencies>
+ <!-- Spring Boot -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-parent</artifactId>
+ <version>${spring.boot.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <!-- Common Utils Dependencies -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.15</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>${guava.version}</version>
+ </dependency>
+
+ <!-- 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>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-protobuf</artifactId>
+ <version>${grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-stub</artifactId>
+ <version>${grpc.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>${protobuff.java.utils.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.components</groupId>
+ <artifactId>proto-definition</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.projectreactor</groupId>
+ <artifactId>reactor-core</artifactId>
+ <version>${reactorcore.version}</version>
+ </dependency>
+
+ <!-- Blueprint Processor Application Module Dependencies -->
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>processor-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>db-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>rest-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>dmaap-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>grpc-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>execution-service</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>workflow-service</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>resource-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>selfservice-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>application</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+
+ <!-- Controller Blueprints Application Dependency -->
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+ <artifactId>resource-dict</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+ <artifactId>blueprint-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+ <artifactId>blueprint-scripts</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+ <artifactId>db-resources</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+ <artifactId>blueprint-validation</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- Test Dependency -->
+ <dependency>
+ <groupId>io.grpc</groupId>
+ <artifactId>grpc-testing</artifactId>
+ <version>${grpc.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmockit</groupId>
+ <artifactId>jmockit</artifactId>
+ <version>${jmockit.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- SDC Distribution client dependency -->
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
+ <artifactId>application</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.sdc.sdc-distribution-client</groupId>
+ <artifactId>sdc-distribution-client</artifactId>
+ <version>${sdc-distribution-client.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>${maven.compiler.source}</source>
+ <target>${maven.compiler.target}</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
* See the License for the specific language governing permissions and
* limitations under the License.
-->
-<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">
+<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">
+ <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.cds</groupId>
<artifactId>ms</artifactId>
<relativePath>..</relativePath>
</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>
+ <artifactId>sdclistener</artifactId>
+ <name>SDC Listener Root</name>
+ <description>SDC Listener Root</description>
<packaging>pom</packaging>
+ <properties>
+ <service.name>sdclistener</service.name>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+ <build.number>${maven.build.timestamp}</build.number>
+ <java.version>1.8</java.version>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <ccsdk.project.version>${project.version}</ccsdk.project.version>
+ </properties>
+
<modules>
+ <module>parent</module>
<module>application</module>
- <!-- Module is not currently working
<module>distribution</module>
- -->
</modules>
</project>