+##################################################################
+#### API Test case functions Configuration ####
+##################################################################
+
+# API Test function: PUT /v2/configuration
+# args: <response-code> <config-file>
+# (Function for test scripts)
+api_put_configuration() {
+ __log_test_start $@
+
+ if [ "$PMS_VERSION" != "V2" ]; then
+ __log_test_fail_not_supported
+ return 1
+ fi
+
+ if [ $# -ne 2 ]; then
+ __print_err "<response-code> <config-file>" $@
+ return 1
+ fi
+ if [ ! -f $2 ]; then
+ _log_test_fail_general "Config file "$2", does not exist"
+ return 1
+ fi
+ inputJson=$(< $2)
+ inputJson="{\"config\":"$inputJson"}"
+ file="./tmp/.config.json"
+ echo $inputJson > $file
+ query="/v2/configuration"
+ res="$(__do_curl_to_api PA PUT $query $file)"
+ status=${res:${#res}-3}
+
+ if [ $status -ne $1 ]; then
+ __log_test_fail_status_code $1 $status
+ return 1
+ fi
+
+ __log_test_pass
+ return 0
+}
+
+# API Test function: GET /v2/configuration
+# args: <response-code> [<config-file>]
+# (Function for test scripts)
+api_get_configuration() {
+ __log_test_start $@
+
+ if [ "$PMS_VERSION" != "V2" ]; then
+ __log_test_fail_not_supported
+ return 1
+ fi
+
+ if [ $# -lt 1 ] || [ $# -gt 2 ]; then
+ __print_err "<response-code> [<config-file>]" $@
+ return 1
+ fi
+ if [ ! -f $2 ]; then
+ _log_test_fail_general "Config file "$2" for comparison, does not exist"
+ return 1
+ fi
+
+ query="/v2/configuration"
+ res="$(__do_curl_to_api PA GET $query)"
+ status=${res:${#res}-3}
+
+ if [ $status -ne $1 ]; then
+ __log_test_fail_status_code $1 $status
+ return 1
+ fi
+
+ if [ $# -eq 2 ]; then
+
+ body=${res:0:${#res}-3}
+
+ targetJson=$(< $2)
+ targetJson="{\"config\":"$targetJson"}"
+ echo "TARGET JSON: $targetJson" >> $HTTPLOG
+ res=$(python3 ../common/compare_json.py "$targetJson" "$body")
+
+ if [ $res -ne 0 ]; then
+ __log_test_fail_body
+ return 1
+ fi
+ fi
+
+ __log_test_pass
+ return 0
+}
\ No newline at end of file