You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log_message "'Offboards' either the specified SAS Viya deployment (namespace) or the specified tenant within that deployment. This removes the ability to limit admins to the SAS Viya deployment (or a single tenant within a given deployment)."
20
-
log_message "The offboarding process deletes the security access controls and the associated OpenSearch Dashboards tenant space (including any saved OpenSearch Dashboards content (e.g. visualizations, dashboards, etc.)."
21
-
log_message ""
22
-
log_message " Arguments:"
23
-
log_message " -ns, --namespace NAMESPACE - (Required) The SAS Viya deployment/Kubernetes Namespace to which access should be removed."
24
-
log_message " -t, --tenant TENANT - (Optional) The tenant within the specific SAS Viya deployment/Kubernetes Namespace to which access should be removed."
log_message"'Offboards' either the specified SAS Viya deployment (namespace) or the specified tenant within that deployment. This removes the ability to limit admins to the SAS Viya deployment (or a single tenant within a given deployment)."
19
+
log_message"The offboarding process deletes the security access controls and the associated OpenSearch Dashboards tenant space (including any saved OpenSearch Dashboards content (e.g. visualizations, dashboards, etc.)."
20
+
log_message""
21
+
log_message" Arguments:"
22
+
log_message" -ns, --namespace NAMESPACE - (Required) The SAS Viya deployment/Kubernetes Namespace to which access should be removed."
23
+
log_message" -t, --tenant TENANT - (Optional) The tenant within the specific SAS Viya deployment/Kubernetes Namespace to which access should be removed."
24
+
log_message""
25
+
#log_message " Options:"
26
+
#log_message ""
28
27
}
29
28
30
-
31
29
# set flag indicating wrapper/driver script being run
32
30
export LOGGING_DRIVER=true
33
31
34
-
35
32
#
36
33
#Handle arguments and parameters
37
34
#
38
35
POS_PARMS=""
39
36
40
-
while(( "$#" ));do
41
-
case"$1"in
42
-
-ns|--namespace)
43
-
if [ -n"$2" ] && [ ${2:0:1}!="-" ];then
44
-
namespace=$2
45
-
shift 2
46
-
else
47
-
log_error "A value for parameter [NAMESPACE] has not been provided.">&2
37
+
while(("$#"));do
38
+
case"$1"in
39
+
-ns | --namespace)
40
+
if [ -n"$2" ] && [ "${2:0:1}"!="-" ];then
41
+
namespace=$2
42
+
shift 2
43
+
else
44
+
log_error "A value for parameter [NAMESPACE] has not been provided.">&2
45
+
show_usage
46
+
exit 2
47
+
fi
48
+
;;
49
+
-t | --tenant)
50
+
if [ -n"$2" ] && [ "${2:0:1}"!="-" ];then
51
+
tenant=$2
52
+
shift 2
53
+
else
54
+
log_error "A value for parameter [TENANT] has not been provided.">&2
55
+
show_usage
56
+
exit 2
57
+
fi
58
+
;;
59
+
-h | --help)
48
60
show_usage
49
-
exit 2
50
-
fi
51
-
;;
52
-
-t|--tenant)
53
-
if [ -n"$2" ] && [ ${2:0:1}!="-" ];then
54
-
tenant=$2
55
-
shift 2
56
-
else
57
-
log_error "A value for parameter [TENANT] has not been provided.">&2
61
+
exit
62
+
;;
63
+
--*= | -*) # unsupported flags
64
+
log_error "Unsupported flag $1">&2
58
65
show_usage
59
-
exit 2
60
-
fi
61
-
;;
62
-
-h|--help)
63
-
show_usage
64
-
exit
65
-
;;
66
-
-*|--*=) # unsupported flags
67
-
log_error "Unsupported flag $1">&2
68
-
show_usage
69
-
exit 1
70
-
;;
66
+
exit 1
67
+
;;
71
68
*) # preserve positional arguments
72
-
POS_PARMS="$POS_PARMS$1"
73
-
shift
74
-
;;
75
-
esac
69
+
POS_PARMS="$POS_PARMS$1"
70
+
shift
71
+
;;
72
+
esac
76
73
done
77
74
78
75
# set positional arguments in their proper place
79
76
evalset -- "$POS_PARMS"
80
77
81
-
82
78
# No positional parameters are supported
83
79
if [ "$#"-ge 1 ];then
84
80
log_error "Unexpected additional arguments were found; exiting."
log_info "Deleted index [$kibana_index_name]. [$response]"
153
+
log_info "Deleted index [$kibana_index_name]. [$response]"
156
154
else
157
-
log_warn "There was an issue deleting the index [$kibana_index_name] holding content related to OpenSearch Dashboards tenant space [$ktenant]. You may need to manually delete this index. [$response]"
155
+
log_warn "There was an issue deleting the index [$kibana_index_name] holding content related to OpenSearch Dashboards tenant space [$ktenant]. You may need to manually delete this index. [$response]"
log_info "Deleted index [${kibana_index_name}_*]. [$response]"
160
+
log_info "Deleted index [${kibana_index_name}_*]. [$response]"
163
161
else
164
-
log_warn "There was an issue deleting the index [${kibana_index_name}_*] holding content related to OpenSearch Dashboards tenant space [$ktenant]. You may need to manually delete this index. [$response]"
162
+
log_warn "There was an issue deleting the index [${kibana_index_name}_*] holding content related to OpenSearch Dashboards tenant space [$ktenant]. You may need to manually delete this index. [$response]"
0 commit comments