diff options
3 files changed, 84 insertions, 16 deletions
diff --git a/README.md b/README.md new file mode 100644 index 00000000..82f58edc --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# DFC (DataFile Collector) + +Physical Network Function Registration Handler is responsible for registration of PNF (Physical Network Function) to +ONAP (Open Network Automation Platform) in plug and play manner. + +## Introduction + +DFC is delivered as one **Docker container** which hosts application server and can be started by `docker-compose`. + +## Compiling DFC + +Whole project (top level of DFC directory) and each module (sub module directory) can be compiled using +`mvn clean install` command. + +## Main API Endpoints + +Running with dev-mode of DFC + +- **Heartbeat**: http://<container_address>:8100/**heartbeat** or https://<container_address>:8443/**heartbeat** + +- **Start DFC**: http://<container_address>:8100/**start** or https://<container_address>:8433/**start** + +- **Stop DFC**: http://<container_address>:8100/**stopDatafile** or https://<container_address>:8433/**stopDatafile** + +## Maven GroupId: + +org.onap.dcaegen2.collectors + +### Maven Parent ArtifactId: + +dcae-services + +### Maven Children Artifacts: +1. datafile-app-server: Datafile Collector (DFC) server +2. datafile-commons: Common code for whole dfc modules +3. datafile-dmaap-client: http client used to connect to dmaap message router/data router + +## License + +Copyright (C) 2018-2019 NOKIA Intellectual Property, 2018-2019 Nordix Foundation. All rights reserved. +[License](http://www.apache.org/licenses/LICENSE-2.0) diff --git a/datafile-app-server/config/datafile_endpoints.json b/datafile-app-server/config/datafile_endpoints.json index 79189549..e1a9d38a 100644 --- a/datafile-app-server/config/datafile_endpoints.json +++ b/datafile-app-server/config/datafile_endpoints.json @@ -26,9 +26,9 @@ }, "ftp": { "ftpesConfiguration": { - "keyCert": "config/ftpKey.jks", + "keyCert": "config/dfc.jks", "keyPassword": "secret", - "trustedCA": "config/cacerts", + "trustedCA": "config/ftp.jks", "trustedCAPassword": "secret" } }, diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParserTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParserTest.java index 3299f71d..acae1e6e 100644 --- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParserTest.java +++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParserTest.java @@ -30,27 +30,54 @@ import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.config.Immutabl class CloudConfigParserTest { private static final ImmutableDmaapConsumerConfiguration CORRECT_DMAAP_CONSUMER_CONFIG = - new ImmutableDmaapConsumerConfiguration.Builder().timeoutMs(-1) - .dmaapHostName("message-router.onap.svc.cluster.local").dmaapUserName("admin") - .dmaapUserPassword("admin").dmaapTopicName("/events/unauthenticated.VES_NOTIFICATION_OUTPUT") - .dmaapPortNumber(2222).dmaapContentType("application/json").messageLimit(-1).dmaapProtocol("http") - .consumerId("C12").consumerGroup("OpenDCAE-c12").trustStorePath("trustStorePath") - .trustStorePasswordPath("trustStorePasswordPath").keyStorePath("keyStorePath") - .keyStorePasswordPath("keyStorePasswordPath").enableDmaapCertAuth(true) + //@formatter:on + new ImmutableDmaapConsumerConfiguration.Builder() + .timeoutMs(-1) + .dmaapHostName("message-router.onap.svc.cluster.local") + .dmaapUserName("admin") + .dmaapUserPassword("admin") + .dmaapTopicName("/events/unauthenticated.VES_NOTIFICATION_OUTPUT") + .dmaapPortNumber(2222) + .dmaapContentType("application/json") + .messageLimit(-1) + .dmaapProtocol("http") + .consumerId("C12") + .consumerGroup("OpenDCAE-c12") + .trustStorePath("trustStorePath") + .trustStorePasswordPath("trustStorePasswordPath") + .keyStorePath("keyStorePath") + .keyStorePasswordPath("keyStorePasswordPath") + .enableDmaapCertAuth(true) .build(); + //@formatter:off private static final ImmutableDmaapPublisherConfiguration CORRECT_DMAAP_PUBLISHER_CONFIG = - new ImmutableDmaapPublisherConfiguration.Builder().dmaapTopicName("publish").dmaapUserPassword("dradmin") - .dmaapPortNumber(3907).dmaapProtocol("https").dmaapContentType("application/json") - .dmaapHostName("message-router.onap.svc.cluster.local").dmaapUserName("dradmin") + //@formatter:on + new ImmutableDmaapPublisherConfiguration.Builder() + .dmaapTopicName("publish") + .dmaapUserPassword("dradmin") + .dmaapPortNumber(3907) + .dmaapProtocol("https") + .dmaapContentType("application/json") + .dmaapHostName("message-router.onap.svc.cluster.local") + .dmaapUserName("dradmin") .trustStorePath("trustStorePath") - .trustStorePasswordPath("trustStorePasswordPath").keyStorePath("keyStorePath") - .keyStorePasswordPath("keyStorePasswordPath").enableDmaapCertAuth(true) + .trustStorePasswordPath("trustStorePasswordPath") + .keyStorePath("keyStorePath") + .keyStorePasswordPath("keyStorePasswordPath") + .enableDmaapCertAuth(true) .build(); + //@formatter:off private static final ImmutableFtpesConfig CORRECT_FTPES_CONFIGURATION = - new ImmutableFtpesConfig.Builder().keyCert("/config/ftpKey.jks").keyPassword("secret") - .trustedCA("config/cacerts").trustedCAPassword("secret").build(); + //@formatter:on + new ImmutableFtpesConfig.Builder() + .keyCert("/config/ftpKey.jks") + .keyPassword("secret") + .trustedCA("config/cacerts") + .trustedCAPassword("secret") + .build(); + //@formatter:off private CloudConfigParser cloudConfigParser = new CloudConfigParser(getCloudConfigJsonObject()); |