summaryrefslogtreecommitdiffstats
path: root/development/bin/dcae-reset.sh
diff options
context:
space:
mode:
authorFilip Krzywka <filip.krzywka@nokia.com>2019-04-08 12:40:26 +0200
committerFilip Krzywka <filip.krzywka@nokia.com>2019-04-10 09:34:24 +0000
commit4d76345d06ee7591d839723a82026f6d8e756c65 (patch)
tree4bbf6174d9ca95001aa1bc9b4b7e6345102feae4 /development/bin/dcae-reset.sh
parentd52444107a3c62c1027e35178b76645ceb4d2c4e (diff)
Update development scripts
Change-Id: I51c6f834ea6d47d055baab81d08eb7484eebef20 Issue-ID: DCAEGEN2-1399 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'development/bin/dcae-reset.sh')
-rwxr-xr-xdevelopment/bin/dcae-reset.sh10
1 files changed, 7 insertions, 3 deletions
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