#set -x
*/}}
-function enable_odl_cluster(){
+enable_odl_cluster () {
if [ -z $APPC_REPLICAS ]; then
echo "APPC_REPLICAS is not configured in Env field"
exit
show databases like 'sdnctl';
END
)
- if [ "x${sdnc_db_exists}" == "x" ]
+ if [ "x${sdnc_db_exists}" = "x" ]
then
echo "Installing SDNC database"
${SDNC_HOME}/bin/installSdncDb.sh
show databases like 'appcctl';
END
)
- if [ "x${appc_db_exists}" == "x" ]
+ if [ "x${appc_db_exists}" = "x" ]
then
echo "Installing APPC database"
${APPC_HOME}/bin/installAppcDb.sh
ss="snapshots"
me=`basename $0`
-function find_target_table_name()
+find_target_table_name ()
{
dest_path=$1
keyspace_name=$2
printf $dest_table_name
}
-function print_usage()
+print_usage ()
{
echo "NAME"
echo " Script to restore Cassandra database from Nuvo/Cain snapshot"
done
# Validate inputs
- if [ "$base_db_dir" == "" ] || [ "$ss_dir" == "" ] || [ "$keyspace_name" == "" ]
+ if [ "$base_db_dir" = "" ] || [ "$ss_dir" = "" ] || [ "$keyspace_name" = "" ]
then
echo ""
echo ">>>>>>>>>>Not all inputs provided, please check usage >>>>>>>>>>"
#
# Execute tags built to support the hands-on demo
#
-function usage
+usage ()
{
echo "Usage: demo-k8s.sh <namespace> <command> [<parameters>] [execscript]"
echo " "
# Check if execscript flag is used and drop it from input arguments
- if [[ "${!#}" == "execscript" ]]; then
+ if [[ "${!#}" = "execscript" ]]; then
set -- "${@:1:$#-1}"
execscript=true
fi