aboutsummaryrefslogtreecommitdiffstats
path: root/sanitycheck/https-server
diff options
context:
space:
mode:
Diffstat (limited to 'sanitycheck/https-server')
-rw-r--r--sanitycheck/https-server/Makefile28
-rw-r--r--sanitycheck/https-server/docker-compose.yml33
-rw-r--r--sanitycheck/https-server/events/eventToVesWithHttpServer.json36
-rw-r--r--sanitycheck/https-server/events/fewEventsToVesWithHttpServer.json24
-rw-r--r--sanitycheck/https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gzbin0 -> 2046 bytes
5 files changed, 121 insertions, 0 deletions
diff --git a/sanitycheck/https-server/Makefile b/sanitycheck/https-server/Makefile
new file mode 100644
index 0000000..00bd3d9
--- /dev/null
+++ b/sanitycheck/https-server/Makefile
@@ -0,0 +1,28 @@
+all: start
+
+.PHONY: start
+
+start:
+ @echo "##### Start HTTPS server #####"
+ docker-compose up -d
+ @echo "##### DONE #####"
+
+stop:
+ @echo "##### Stop HTTPS server #####"
+ docker-compose down
+ @echo "##### DONE #####"
+
+upload-file-http-server:
+ @echo "##### Upload file to Http server #####"
+ curl -F "uploaded_file=@./resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz" -u demo:demo123456! http://localhost:32080/upload.php
+ @echo "\n##### DONE #####"
+
+generate-event-http-server:
+ @echo "##### Trigger VES client to generate event with Http Server #####"
+ curl -X POST http://localhost:5000/simulator/event -d @events/eventToVesWithHttpServer.json --header "Content-Type: application/json"
+ @echo "\n##### DONE #####"
+
+generate-multiple-events-http-server:
+ @echo "\n##### Trigger VES client to generate multiple events with http server#####"
+ curl -X POST http://localhost:5000/simulator/start -d @events/fewEventsToVesWithHttpServer.json --header "Content-Type: application/json"
+ @echo "\n##### DONE #####"
diff --git a/sanitycheck/https-server/docker-compose.yml b/sanitycheck/https-server/docker-compose.yml
new file mode 100644
index 0000000..fabce9a
--- /dev/null
+++ b/sanitycheck/https-server/docker-compose.yml
@@ -0,0 +1,33 @@
+version: "2.1"
+
+services:
+
+ http-server:
+ image: onap/org.onap.integration.nfsimulator.pmhttpsserver
+ ports:
+ - "32080:80"
+ - "38080:8080"
+ - "32443:443"
+ - "32000:32000"
+ - "32100:32100"
+ networks:
+ - nf-simulator-network
+ volumes:
+ - ./volumes/httpservervolumes/:/usr/local/apache2/htdocs
+ - ./volumes/logs:/var/log/apache2
+ command: bash -c "
+ echo 'Http Server start';
+ while [[ $$(ls -1 /etc/apache2/certs/ | wc -l) != '3' ]]; do echo 'Waiting for certs...'; sleep 3; done;
+ chmod 777 /usr/local/apache2/htdocs;
+ cp /usr/local/apache2/conf/upload.php /usr/local/apache2/htdocs/upload.php;
+ touch /usr/local/apache2/htdocs/index.html;
+ /usr/sbin/apache2ctl -D FOREGROUND;
+ "
+ restart: on-failure
+
+#
+# external network
+networks:
+ nf-simulator-network:
+ external:
+ name: nf-simulator-network
diff --git a/sanitycheck/https-server/events/eventToVesWithHttpServer.json b/sanitycheck/https-server/events/eventToVesWithHttpServer.json
new file mode 100644
index 0000000..a5e0a27
--- /dev/null
+++ b/sanitycheck/https-server/events/eventToVesWithHttpServer.json
@@ -0,0 +1,36 @@
+{
+ "event": {
+ "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_pm_98.xml",
+ "hashMap": {
+ "location": "http://demo:demo123456!@localhost:32080/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz",
+ "compression": "gzip",
+ "fileFormatType": "org.3GPP.32.435#measCollec",
+ "fileFormatVersion": "V10"
+ }
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/sanitycheck/https-server/events/fewEventsToVesWithHttpServer.json b/sanitycheck/https-server/events/fewEventsToVesWithHttpServer.json
new file mode 100644
index 0000000..de3f100
--- /dev/null
+++ b/sanitycheck/https-server/events/fewEventsToVesWithHttpServer.json
@@ -0,0 +1,24 @@
+{
+ "simulatorParams": {
+ "repeatCount": 2,
+ "repeatInterval": 5
+ },
+ "templateName": "notificationHttpServer.json",
+ "patch": {
+ "event": {
+ "commonEventHeader": {
+ "domain": "notification",
+ "eventName": "vFirewallBroadcastPackets",
+ "eventId": "#RandomString(10)",
+ "priority": "Normal",
+ "reportingEntityName": "myVNF",
+ "sequence": 1,
+ "sourceName": "ClosedLoopVNF",
+ "startEpochMicrosec": 1531616794,
+ "lastEpochMicrosec": 1531719042,
+ "vesEventListenerVersion": "7.0.1",
+ "version": "4.0.1"
+ }
+ }
+ }
+}
diff --git a/sanitycheck/https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz b/sanitycheck/https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz
new file mode 100644
index 0000000..3af5ea8
--- /dev/null
+++ b/sanitycheck/https-server/resources/E_VES_bulkPM_IF_3GPP_3_example_1.xml.gz
Binary files differ