aboutsummaryrefslogtreecommitdiffstats
path: root/development/bin/xnf-simulation.sh
diff options
context:
space:
mode:
authorFilip Krzywka <filip.krzywka@nokia.com>2018-12-18 10:10:06 +0100
committerFilip Krzywka <filip.krzywka@nokia.com>2019-01-03 08:36:41 +0000
commit88871ce8d9e069c7967734163c4406d78f91823d (patch)
tree39e1f60210c18658e821117dbf653d9097a41b23 /development/bin/xnf-simulation.sh
parent3d3eff47f0f94176f351d05f7dca39957a0c3c8b (diff)
Add script for sending messages from multiple xNFs
Change-Id: I9acd3278929c30a3036f97f403a31a8817723d27 Issue-ID: DCAEGEN2-1027 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'development/bin/xnf-simulation.sh')
-rwxr-xr-xdevelopment/bin/xnf-simulation.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/development/bin/xnf-simulation.sh b/development/bin/xnf-simulation.sh
index e1d65aa0..c3025b9b 100755
--- a/development/bin/xnf-simulation.sh
+++ b/development/bin/xnf-simulation.sh
@@ -65,7 +65,8 @@ if [ -n "${VERBOSE+x}" ]; then
echo "Requesting xnf-simulator on port ${XNF_PORT} to send ${MESSAGES_AMOUNT} messages of type ${MESSAGES_TYPE}"
fi
-REQUEST_ID=$(curl --request POST -s localhost:${XNF_PORT}/${XNF_ENDPOINT} -d "
+currentTimeMicros=$((`date +%s%N`/1000))
+REQUEST_ID=$(curl --request POST -s --header 'Content-Type: application/json' localhost:${XNF_PORT}/${XNF_ENDPOINT} -d "
[
{
\"commonEventHeader\": {
@@ -77,7 +78,7 @@ REQUEST_ID=$(curl --request POST -s localhost:${XNF_PORT}/${XNF_ENDPOINT} -d "
\"eventName\": \"sample-event-name\",
\"eventType\": \"sample-event-type\",
\"startEpochMicrosec\": 120034455,
- \"lastEpochMicrosec\": 120034455,
+ \"lastEpochMicrosec\": $currentTimeMicros,
\"nfNamingCode\": \"sample-nf-naming-code\",
\"nfcNamingCode\": \"sample-nfc-naming-code\",
\"reportingEntityId\": \"sample-reporting-entity-id\",