Add Readme.md 66/77866/5
authoryanhuanwang <martin.c.yan@est.tech>
Fri, 1 Feb 2019 14:23:35 +0000 (15:23 +0100)
committeryanhuanwang <martin.yan.seu@gmail.com>
Wed, 13 Feb 2019 08:35:09 +0000 (09:35 +0100)
Format code

Change-Id: Iba56718868043d3b19c71892f363fbb838f4988a
Signed-off-by: Chengkai Yan <martin.c.yan@est.tech>
Issue-ID: DCAEGEN2-1039

README.md [new file with mode: 0644]
datafile-app-server/config/datafile_endpoints.json
datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/CloudConfigParserTest.java

diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..82f58ed
--- /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)
index 7918954..e1a9d38 100644 (file)
@@ -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"
             }
         },
index 3299f71..acae1e6 100644 (file)
@@ -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());