Add HTTP as new protocol to collect files from xNFs 73/116473/3
authorKrzysztof Gajewski <krzysztof.gajewski@nokia.com>
Fri, 18 Dec 2020 08:06:45 +0000 (09:06 +0100)
committerKrzysztof Gajewski <krzysztof.gajewski@nokia.com>
Mon, 4 Jan 2021 19:15:20 +0000 (20:15 +0100)
- documentation

Issue-ID: DCAEGEN2-2527

Signed-off-by: Krzysztof Gajewski <krzysztof.gajewski@nokia.com>
Change-Id: I2b77b9eb6e2745fa44f9d3f88de9be56f4bc80ac

docs/sections/services/dfc/architecture.rst
docs/sections/services/dfc/http-notes.rst [new file with mode: 0644]
docs/sections/services/dfc/index.rst
docs/sections/services/dfc/troubleshooting.rst

index 872a52b..cbd1876 100644 (file)
@@ -30,7 +30,7 @@ Interaction
 """""""""""
 DFC will interact with the DMaaP Message Router, using json, and with the Data Router, using metadata in the header and
 file in the body, via secured protocol.
-So far, the implemented protocols to communicate with xNFs are sftp and ftpes.
+So far, the implemented protocols to communicate with xNFs are http (with basic authentication), sftp and ftpes.
 
 Retry mechanism
 """""""""""""""
diff --git a/docs/sections/services/dfc/http-notes.rst b/docs/sections/services/dfc/http-notes.rst
new file mode 100644 (file)
index 0000000..bd297b1
--- /dev/null
@@ -0,0 +1,63 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+HTTP notes
+==========
+
+HTTP Basic Authentication in FileReady messages
+"""""""""""""""""""""""""""""""""""""""""""""""
+File ready message for http server is the same like in other protocols. The only difference is scheme set to
+"http". Processed uri is in the form of:
+
+.. code-block:: bash
+
+   scheme://userinfo@host:port/path
+   i.e.
+   http://demo:demo123456!@example.com:80/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz
+
+If port number was not provided, port 80 is used by default.
+
+Example file ready message is as follows:
+
+.. code-block:: bash
+
+   curl --location --request POST 'https://portal.api.simpledemo.onap.org:30417/eventListener/v7' \
+   --header 'Content-Type: application/json' \
+   --header 'Authorization: Basic c2FtcGxlMTpzYW1wbGUx' \
+   --data-raw '{
+     "event": {
+       "commonEventHeader": {
+         "version": "4.0.1",
+         "vesEventListenerVersion": "7.0.1",
+         "domain": "notification",
+         "eventName": "Notification_gnb-Nokia_FileReady",
+         "eventId": "FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1",
+         "lastEpochMicrosec": 8745745764578,
+         "priority": "Normal",
+         "reportingEntityName": "NOK6061ZW3",
+         "sequence": 0,
+         "sourceName": "NOK6061ZW3",
+         "startEpochMicrosec": 8745745764578,
+         "timeZoneOffset": "UTC+05.30"
+       },
+       "notificationFields": {
+         "changeIdentifier": "PM_MEAS_FILES",
+         "changeType": "FileReady",
+         "notificationFieldsVersion": "2.0",
+         "arrayOfNamedHashMap": [
+           {
+             "name": "C_28532_measData_file.xml",
+             "hashMap": {
+               "location": "http://login:password@server.com:80/C20200502.1830+0200-20200502.1845+0200_195500.xml.gz",
+               "compression": "gzip",
+               "fileFormatType": "org.3GPP.32.435#measCollec",
+               "fileFormatVersion": "V10"
+             }
+           }
+         ]
+       }
+     }
+   }'
+
+Note, more than one file from the same location can be added to the "arrayOfNamedHashMap". If so, they are downloaded
+from the endpoint through single http connection.
index 0979bfe..25c0861 100644 (file)
@@ -18,5 +18,6 @@ DataFile Collector(DFC)
    ./configuration.rst\r
    ./consumedapis.rst\r
    ./administration.rst\r
+   ./http-notes.rst\r
    ./troubleshooting.rst\r
    ./release-notes.rst\r
index eb90646..9681622 100644 (file)
@@ -166,4 +166,4 @@ When StrictHostKeyChecking is enabled and DFC cannot find a known_hosts file, th
     org.onap.dcaegen2.collectors.datafile.ftp.SftpClient     |2020-07-24T06:32:56.010Z     
     |WARN     |StrictHostKeyChecking is enabled but environment variable KNOWN_HOSTS_FILE_PATH is not set or points to not existing file [/home/datafile/.ssh/known_hosts]  -->  falling back to StrictHostKeyChecking='no'.  
 
-To resolve this warning, provide a known_hosts file or disable StrictHostKeyChecking, see DFC config page - :ref:`strict_host_checking_config`.
\ No newline at end of file
+To resolve this warning, provide a known_hosts file or disable StrictHostKeyChecking, see DFC config page - :ref:`strict_host_checking_config`.