aboutsummaryrefslogtreecommitdiffstats
path: root/development/bin
diff options
context:
space:
mode:
Diffstat (limited to 'development/bin')
-rwxr-xr-xdevelopment/bin/constants.sh22
-rwxr-xr-xdevelopment/bin/dcae-msgs.sh5
-rwxr-xr-xdevelopment/bin/dcae-reset.sh7
-rwxr-xr-xdevelopment/bin/dcae-topic.sh7
-rwxr-xr-xdevelopment/bin/start-simulation.sh2
5 files changed, 37 insertions, 6 deletions
diff --git a/development/bin/constants.sh b/development/bin/constants.sh
new file mode 100755
index 00000000..f0df9b00
--- /dev/null
+++ b/development/bin/constants.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+# ============LICENSE_START=======================================================
+# dcaegen2-collectors-veshv
+# ================================================================================
+# Copyright (C) 2019 NOKIA
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+DCAE_APP_HOSTNAME=localhost
+DCAE_APP_PORT=6064
+DCAE_APP_ADDRESS=${DCAE_APP_HOSTNAME}:${DCAE_APP_PORT} \ No newline at end of file
diff --git a/development/bin/dcae-msgs.sh b/development/bin/dcae-msgs.sh
index cb05a8c3..964be14f 100755
--- a/development/bin/dcae-msgs.sh
+++ b/development/bin/dcae-msgs.sh
@@ -56,9 +56,12 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+DEVELOPMENT_BIN_DIRECTORY=$(realpath $(dirname "$0"))
+source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
+
if [ -n "${VERBOSE+x}" ]; then
echo "All messages count currently consumed by dcae app simulator: "
fi
-curl --request GET localhost:6063/messages/all/count
+curl --request GET ${DCAE_APP_ADDRESS}/messages/all/count
echo
diff --git a/development/bin/dcae-reset.sh b/development/bin/dcae-reset.sh
index e5b7b056..03baf97a 100755
--- a/development/bin/dcae-reset.sh
+++ b/development/bin/dcae-reset.sh
@@ -57,9 +57,12 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+DEVELOPMENT_BIN_DIRECTORY=$(realpath $(dirname "$0"))
+source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
+
if [ -n "${VERBOSE+x}" ]; then
- echo "Requesting DCAE app running on port 6063 to reset messages count"
+ echo "Requesting DCAE app running on port ${DCAE_APP_PORT} to reset messages count"
fi
-curl --request DELETE localhost:6063/messages
+curl --request DELETE ${DCAE_APP_ADDRESS}/messages
echo
diff --git a/development/bin/dcae-topic.sh b/development/bin/dcae-topic.sh
index 8c176221..aefb1d0b 100755
--- a/development/bin/dcae-topic.sh
+++ b/development/bin/dcae-topic.sh
@@ -56,11 +56,14 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+DEVELOPMENT_BIN_DIRECTORY=$(realpath $(dirname "$0"))
+source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
+
TOPIC=${1:-HV_VES_PERF3GPP}
if [ -n "${VERBOSE+x}" ]; then
- echo "Requesting DCAE app running on port 6063 to consume messages from topic: ${TOPIC}"
+ echo "Requesting DCAE app running on ${DCAE_APP_ADDRESS} to consume messages from topic: ${TOPIC}"
fi
-curl --request PUT localhost:6063/configuration/topics -d ${TOPIC}
+curl --request PUT ${DCAE_APP_ADDRESS}/configuration/topics -d ${TOPIC}
echo \ No newline at end of file
diff --git a/development/bin/start-simulation.sh b/development/bin/start-simulation.sh
index beede920..dfb63e65 100755
--- a/development/bin/start-simulation.sh
+++ b/development/bin/start-simulation.sh
@@ -114,7 +114,7 @@ function wait_for_containers_startup_or_fail() {
function start_simulation() {
verbose_log "Simulation: every xNF will send ${MESSAGES_IN_BATCH} messages to hv-ves
- ${MESSAGE_BATCHES_AMOUNT} times, once every ${MESSAGES_SENDING_INTERVAL}"
+ ${MESSAGE_BATCHES_AMOUNT} times, once every ${MESSAGES_SENDING_INTERVAL}s"
for port in ${CREATED_XNF_SIMULATORS_PORTS[@]}; do
start_single_simulation $port $MESSAGES_IN_BATCH &
done