3 # ============LICENSE_START===============================================
4 # Copyright (C) 2023 Nordix Foundation. All rights reserved.
5 # ========================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=================================================
21 echo "${0##*/} script-home: "$SD
35 echo "Usage: push-genfiles-to-ves-collector.sh <node-count> <num-of-events> <node-name-base> <file-extension> sftp|ftpes|https <num-servers> [hist]"
38 if [ $# -lt 6 ] || [ $# -gt 7 ]; then
42 if [ $TYPE == "sftp" ]; then
43 echo "sftp servers not yet supported"
44 elif [ $TYPE == "ftpes" ]; then
45 echo "ftpes servers not yet supported"
46 elif [ $TYPE == "https" ]; then
52 if [ $FILE_EXT != "xml.gz" ]; then
53 echo "only xml.gz format supported"
57 if [ ! -z "$HIST" ]; then
58 if [ $HIST != "hist" ]; then
63 if [ "$KUBECONFIG" == "" ]; then
64 echo "Env var KUBECONFIG not set, using current settings for kubectl"
66 echo "Env var KUBECONFIG set to $KUBECONFIG"
69 chmod +x kafka-client-send-genfiles-file-ready.sh
70 kubectl cp kafka-client-send-genfiles-file-ready.sh nonrtric/kafka-client:/home/appuser
72 kubectl exec kafka-client -n nonrtric -- bash -c './kafka-client-send-genfiles-file-ready.sh ves '$NODE_COUNT' '$EVT_COUNT' '$NODE_NAME_BASE' '$FILE_EXT' '$TYPE' '$SRV_COUNT' '$HIST