aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdevelopment/bin/consul.sh16
-rwxr-xr-xdevelopment/bin/dcae-msgs.sh12
-rwxr-xr-xdevelopment/bin/dcae-reset.sh10
-rwxr-xr-xdevelopment/bin/dcae-topic.sh9
-rwxr-xr-xdevelopment/bin/xnf-simulation.sh8
5 files changed, 37 insertions, 18 deletions
diff --git a/development/bin/consul.sh b/development/bin/consul.sh
index 2a6bc0f5..5f9271f2 100755
--- a/development/bin/consul.sh
+++ b/development/bin/consul.sh
@@ -60,22 +60,22 @@ DOMAIN=${1:-perf3gpp}
TOPIC=${2:-HV_VES_PERF3GPP}
CONFIGURATION="{
- "streams_publishes": {
- "${DOMAIN}": {
- "type": "kafka",
- "kafka_info": {
- "bootstrap_servers": "message-router-kafka:9092",
- "topic_name": "${TOPIC}"
+ \"streams_publishes\": {
+ \"${DOMAIN}\": {
+ \"type\": \"kafka\",
+ \"kafka_info\": {
+ \"bootstrap_servers\": \"message-router-kafka:9092\",
+ \"topic_name\": \"${TOPIC}\"
}
}
}
}"
-CONFIGURATION_ENDPOINT=localhost:8500/v1/kv/veshv-config
+CONFIGURATION_ENDPOINT=localhost:8500/v1/kv/dcae-hv-ves-collector
if [ -n "${VERBOSE+x}" ]; then
echo "Configuration: ${CONFIGURATION}"
- echo "Putting configuration under ${CONFIGURATION_ENDPOINT}."
+ echo "Putting configuration under ${CONFIGURATION_ENDPOINT}"
fi
curl --request PUT ${CONFIGURATION_ENDPOINT} -d "${CONFIGURATION}"
echo
diff --git a/development/bin/dcae-msgs.sh b/development/bin/dcae-msgs.sh
index 964be14f..84cef972 100755
--- a/development/bin/dcae-msgs.sh
+++ b/development/bin/dcae-msgs.sh
@@ -20,8 +20,10 @@
set -euo pipefail
usage() {
- echo "Return current amount of consumed messages by dcae-app-simulator"
- echo "Usage: $0 [-h|--help] [-v|--verbose]"
+ echo "Return current amount of consumed messages by dcae-app-simulator on given topic"
+ echo "Usage: $0 [-h|--help] [-v|--verbose] <topic>"
+ echo ""
+ echo " - topic : kafka topic to retrieve messages from, default `HV_VES_PERF3GPP`"
exit 1
}
@@ -56,12 +58,14 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+TOPIC=${1:-HV_VES_PERF3GPP}
+
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: "
+ echo "All messages count currently consumed by dcae app simulator on topic ${TOPIC}: "
fi
-curl --request GET ${DCAE_APP_ADDRESS}/messages/all/count
+curl --request GET ${DCAE_APP_ADDRESS}/messages/${TOPIC}/count
echo
diff --git a/development/bin/dcae-reset.sh b/development/bin/dcae-reset.sh
index 03baf97a..d2d8ebd0 100755
--- a/development/bin/dcae-reset.sh
+++ b/development/bin/dcae-reset.sh
@@ -21,8 +21,10 @@ set -euo pipefail
usage() {
- echo "Resets dcae-app-simulator consumed messages count"
- echo "Usage: $0 [-h|--help] [-v|--verbose]"
+ echo "Resets dcae-app-simulator consumed messages count on given topic"
+ echo "Usage: $0 [-h|--help] [-v|--verbose] <topic>"
+ echo ""
+ echo " - topic : kafka topic to reset consumer for, default 'HV_VES_PERF3GPP'"
exit 1
}
@@ -57,6 +59,8 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+TOPIC=${1:-HV_VES_PERF3GPP}
+
DEVELOPMENT_BIN_DIRECTORY=$(realpath $(dirname "$0"))
source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
@@ -64,5 +68,5 @@ if [ -n "${VERBOSE+x}" ]; then
echo "Requesting DCAE app running on port ${DCAE_APP_PORT} to reset messages count"
fi
-curl --request DELETE ${DCAE_APP_ADDRESS}/messages
+curl --request DELETE ${DCAE_APP_ADDRESS}/messages/${TOPIC}
echo
diff --git a/development/bin/dcae-topic.sh b/development/bin/dcae-topic.sh
index aefb1d0b..b4c2638d 100755
--- a/development/bin/dcae-topic.sh
+++ b/development/bin/dcae-topic.sh
@@ -20,8 +20,11 @@
set -euo pipefail
usage() {
- echo "Set dcae-app-simulator to start consuming messages from given topic (HV_VES_PERF3GPP by default)"
- echo "Usage: $0 [-h|--help] [-v|--verbose] [topic]"
+ echo "Set dcae-app-simulator to start consuming messages from given comma-separated topics (HV_VES_PERF3GPP by default)"
+ echo "Usage: $0 [-h|--help] [-v|--verbose] [topics]"
+ echo ""
+ echo "Example invocations:"
+ echo "./dcae-topic.sh FAULT_TOPIC,HEARTBEAT_TOPIC,HV_VES_PERF3GPP"
exit 1
}
@@ -62,7 +65,7 @@ source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
TOPIC=${1:-HV_VES_PERF3GPP}
if [ -n "${VERBOSE+x}" ]; then
- echo "Requesting DCAE app running on ${DCAE_APP_ADDRESS} to consume messages from topic: ${TOPIC}"
+ echo "Requesting DCAE app running on ${DCAE_APP_ADDRESS} to consume messages from topics: ${TOPIC}"
fi
curl --request PUT ${DCAE_APP_ADDRESS}/configuration/topics -d ${TOPIC}
diff --git a/development/bin/xnf-simulation.sh b/development/bin/xnf-simulation.sh
index c3025b9b..ade0e426 100755
--- a/development/bin/xnf-simulation.sh
+++ b/development/bin/xnf-simulation.sh
@@ -22,6 +22,14 @@ set -euo pipefail
usage() {
echo "Send request to xnf-simulator"
echo "Usage: $0 [-h|--help] [-v|--verbose] [<xnf listen port> [<messages amount> [<messages type> [<xnf endpoint>]]]]"
+ echo ""
+ echo "Default values:"
+ echo " - xnf listen port : 6062"
+ echo " - messages amount : 1"
+ echo " - messages type : VALID"
+ echo " - xnf endpoint : simulator/async"
+ echo "Example invocations:"
+ echo "./xnf-simulation.sh -v 6062 1000 VALID"
exit 1
}