diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3ff57f..639da4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - CFLAGS: "-DBBF_VENDOR_PREFIX=\\\"X_IOPSYS_EU_\\\"" + CFLAGS: "-DBBF_VENDOR_PREFIX=\\\"X_IOWRT_EU_\\\"" DEBUG: 'TRUE' SOURCE_FOLDER: "." COMPILATION_FIXUP: "cmake ." diff --git a/gitlab-ci/functional-api-test.sh b/gitlab-ci/functional-api-test.sh index f34ee11..6e36369 100755 --- a/gitlab-ci/functional-api-test.sh +++ b/gitlab-ci/functional-api-test.sh @@ -8,8 +8,8 @@ pwd trap cleanup EXIT trap cleanup SIGINT -echo "Add X_IOPSYS_EU_Dropbear Object that is needed for functional test" -DROPBEAR_OBJECT='{"parent_dm": "Device.", "object": "X_IOPSYS_EU_Dropbear"}' +echo "Add X_IOWRT_EU_Dropbear Object that is needed for functional test" +DROPBEAR_OBJECT='{"parent_dm": "Device.", "object": "X_IOWRT_EU_Dropbear"}' jq --argjson newObj "$DROPBEAR_OBJECT" '.daemon.services += [$newObj]' "/etc/bbfdm/services/core.json" > /tmp/updated_core.json mv /tmp/updated_core.json /etc/bbfdm/services/core.json diff --git a/test/files/etc/icwmpd/custom_notification_forced.json b/test/files/etc/icwmpd/custom_notification_forced.json index 5f32f8f..575c92a 100644 --- a/test/files/etc/icwmpd/custom_notification_forced.json +++ b/test/files/etc/icwmpd/custom_notification_forced.json @@ -1,7 +1,7 @@ { "custom_notification": [ { - "parameter": "Device.X_IOPSYS_EU_Dropbear.", + "parameter": "Device.X_IOWRT_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/files/etc/icwmpd/custom_notification_invalid_json.json b/test/files/etc/icwmpd/custom_notification_invalid_json.json index 5e7ae4e..d595c61 100644 --- a/test/files/etc/icwmpd/custom_notification_invalid_json.json +++ b/test/files/etc/icwmpd/custom_notification_invalid_json.json @@ -1,7 +1,7 @@ { "custom_notification": { - "parameter": "Device.X_IOPSYS_EU_Dropbear.", + "parameter": "Device.X_IOWRT_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/files/etc/icwmpd/custom_notification_invalid_parameter.json b/test/files/etc/icwmpd/custom_notification_invalid_parameter.json index 5872ed5..8f76bbc 100644 --- a/test/files/etc/icwmpd/custom_notification_invalid_parameter.json +++ b/test/files/etc/icwmpd/custom_notification_invalid_parameter.json @@ -1,7 +1,7 @@ { "custom_notification": [ { - "parameter": "Device.X_IOPSYS_EU_Dropbear.", + "parameter": "Device.X_IOWRT_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/files/etc/icwmpd/custom_notification_valid.json b/test/files/etc/icwmpd/custom_notification_valid.json index 7f08ec9..368bddb 100644 --- a/test/files/etc/icwmpd/custom_notification_valid.json +++ b/test/files/etc/icwmpd/custom_notification_valid.json @@ -1,7 +1,7 @@ { "custom_notification": [ { - "parameter": "Device.X_IOPSYS_EU_Dropbear.", + "parameter": "Device.X_IOWRT_EU_Dropbear.", "notify_type": "2" }, { diff --git a/test/script/00_verify_add_method.sh b/test/script/00_verify_add_method.sh index bbf6fc3..09313a0 100755 --- a/test/script/00_verify_add_method.sh +++ b/test/script/00_verify_add_method.sh @@ -8,7 +8,7 @@ TEST_NAME="ADD RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "addObject","objectName":"Device.X_IOPSYS_EU_Dropbear"}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "addObject","objectName":"Device.X_IOWRT_EU_Dropbear"}' >/dev/null 2>&1 check_ret $? wait_for_session_end @@ -22,7 +22,7 @@ if [ "$obj_instance" != "2" -o $status != "0" ]; then fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.2"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOWRT_EU_Dropbear.2"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end diff --git a/test/script/01_verify_delete_method.sh b/test/script/01_verify_delete_method.sh index a06e2be..f498f51 100755 --- a/test/script/01_verify_delete_method.sh +++ b/test/script/01_verify_delete_method.sh @@ -8,7 +8,7 @@ TEST_NAME="DELETE RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "deleteObject","objectName":"Device.X_IOPSYS_EU_Dropbear.2"}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "deleteObject","objectName":"Device.X_IOWRT_EU_Dropbear.2"}' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "DeleteObject" @@ -19,12 +19,12 @@ if [ "$status" != "1" ]; then fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOWRT_EU_Dropbear"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" -if grep -q "Device.X_IOPSYS_EU_Dropbear.2" "$icwmp_log_file"; then - echo "Error: 'Device.X_IOPSYS_EU_Dropbear.2' object is not really deleted" >> ./funl-test-debug.log +if grep -q "Device.X_IOWRT_EU_Dropbear.2" "$icwmp_log_file"; then + echo "Error: 'Device.X_IOWRT_EU_Dropbear.2' object is not really deleted" >> ./funl-test-debug.log exit 1 fi diff --git a/test/script/02_verify_get_method.sh b/test/script/02_verify_get_method.sh index cfe7a96..a62d065 100755 --- a/test/script/02_verify_get_method.sh +++ b/test/script/02_verify_get_method.sh @@ -8,13 +8,13 @@ TEST_NAME="GET RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.1.Alias"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOWRT_EU_Dropbear.1.Alias"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" param_value=$(print_tag_value "cwmp:GetParameterValuesResponse" "Value xsi:type=\"xsd:string\"") if [ "$param_value" != "cpe-1" ]; then - echo "Error: Default value of 'Device.X_IOPSYS_EU_Dropbear.1.Alias' is wrong, current_value($param_value) expected_value(cpe-1)" >> ./funl-test-debug.log + echo "Error: Default value of 'Device.X_IOWRT_EU_Dropbear.1.Alias' is wrong, current_value($param_value) expected_value(cpe-1)" >> ./funl-test-debug.log exit 1 fi diff --git a/test/script/03_verify_set_method.sh b/test/script/03_verify_set_method.sh index 644ff8f..bc08d70 100755 --- a/test/script/03_verify_set_method.sh +++ b/test/script/03_verify_set_method.sh @@ -8,18 +8,18 @@ TEST_NAME="SET RPC Method" echo "Running: $TEST_NAME" remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOWRT_EU_Dropbear.1.PasswordAuth"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" param_value_before=$(print_tag_value "cwmp:GetParameterValuesResponse" "Value xsi:type=\"xsd:boolean\"") if [ "$param_value_before" != "1" ]; then - echo "Error: Default value of 'Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth' is wrong, current_value($param_value_before) expected_value(1)" >> ./funl-test-debug.log + echo "Error: Default value of 'Device.X_IOWRT_EU_Dropbear.1.PasswordAuth' is wrong, current_value($param_value_before) expected_value(1)" >> ./funl-test-debug.log exit 1 fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth",false]]}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.X_IOWRT_EU_Dropbear.1.PasswordAuth",false]]}' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "SetParameterValues" @@ -30,17 +30,17 @@ if [ "$get_status" != "0" ]; then fi remove_icwmp_log -curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth"] }' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "getParameterValues", "parameterNames": ["Device.X_IOWRT_EU_Dropbear.1.PasswordAuth"] }' >/dev/null 2>&1 check_ret $? wait_for_session_end check_session "GetParameterValues" param_value_after=$(print_tag_value "cwmp:GetParameterValuesResponse" "Value xsi:type=\"xsd:boolean\"") if [ "$param_value_after" != "0" ]; then - echo "Error: the value of 'Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth' is wrong, current_value($param_value_after) expected_value(0)" >> ./funl-test-debug.log + echo "Error: the value of 'Device.X_IOWRT_EU_Dropbear.1.PasswordAuth' is wrong, current_value($param_value_after) expected_value(0)" >> ./funl-test-debug.log exit 1 fi -curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.X_IOPSYS_EU_Dropbear.1.PasswordAuth",true]]}' >/dev/null 2>&1 +curl $connection_request_path -X POST --data '{"name": "setParameterValues", "parameterValues": [["Device.X_IOWRT_EU_Dropbear.1.PasswordAuth",true]]}' >/dev/null 2>&1 wait_for_session_end echo "PASS: $TEST_NAME" diff --git a/test/script/05_verify_cmd_line.sh b/test/script/05_verify_cmd_line.sh index 4ce443f..c1f397b 100755 --- a/test/script/05_verify_cmd_line.sh +++ b/test/script/05_verify_cmd_line.sh @@ -99,8 +99,8 @@ if [[ $res != *"9009"* ]]; then fi log "ADD METHOD: Correct Path" -res=$(./icwmpd -c add Device.X_IOPSYS_EU_Dropbear. 2>&1) -if [[ $res != *"Device.X_IOPSYS_EU_Dropbear."* ]]; then +res=$(./icwmpd -c add Device.X_IOWRT_EU_Dropbear. 2>&1) +if [[ $res != *"Device.X_IOWRT_EU_Dropbear."* ]]; then log "Error: Add Method with correct path doesn't work correctly" exit 1 fi @@ -129,7 +129,7 @@ if [[ $res != *"Deleted ${del_path}"* ]]; then fi log "DELETE METHOD: Correct Path && all instance" -res=$(./icwmpd -c del Device.X_IOPSYS_EU_Dropbear. 2>&1) +res=$(./icwmpd -c del Device.X_IOWRT_EU_Dropbear. 2>&1) if [[ $res != *"9005"* ]]; then log "Error: Delete Method with correct path && all instances doesn't work correctly" exit 1 diff --git a/test/script/verify_custom_notifications.sh b/test/script/verify_custom_notifications.sh index f5aad63..a5db54f 100755 --- a/test/script/verify_custom_notifications.sh +++ b/test/script/verify_custom_notifications.sh @@ -27,9 +27,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` -if [[ $notif1 != *"Device.X_IOPSYS_EU_Dropbear."* ]]; then - echo "FAIL: active notifications list doesn't contain Device.X_IOPSYS_EU_Dropbear. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOWRT_EU_Dropbear."` +if [[ $notif1 != *"Device.X_IOWRT_EU_Dropbear."* ]]; then + echo "FAIL: active notifications list doesn't contain Device.X_IOWRT_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.WiFi.SSID.1.SSID"` @@ -60,9 +60,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` -if [[ $notif1 == *"Device.X_IOPSYS_EU_Dropbear."* ]]; then - echo "FAIL: the json file is invalid, the active notifcation list shouldn't contain Device.X_IOPSYS_EU_Dropbear. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOWRT_EU_Dropbear."` +if [[ $notif1 == *"Device.X_IOWRT_EU_Dropbear."* ]]; then + echo "FAIL: the json file is invalid, the active notifcation list shouldn't contain Device.X_IOWRT_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.WiFi.SSID.1.SSID"` @@ -98,9 +98,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` -if [[ $notif1 != *"Device.X_IOPSYS_EU_Dropbear."* ]]; then - echo "FAIL: active notifications list doesn't contain Device.X_IOPSYS_EU_Dropbear. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOWRT_EU_Dropbear."` +if [[ $notif1 != *"Device.X_IOWRT_EU_Dropbear."* ]]; then + echo "FAIL: active notifications list doesn't contain Device.X_IOWRT_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.DeviceInfo.ProvisioningCode"` @@ -136,9 +136,9 @@ supervisorctl stop icwmpd check_valgrind_xml -notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOPSYS_EU_Dropbear."` -if [[ $notif1 != *"Device.X_IOPSYS_EU_Dropbear."* ]]; then - echo "FAIL: active notifications list doesn't contain Device.X_IOPSYS_EU_Dropbear. parameter" +notif1=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].active | grep "Device.X_IOWRT_EU_Dropbear."` +if [[ $notif1 != *"Device.X_IOWRT_EU_Dropbear."* ]]; then + echo "FAIL: active notifications list doesn't contain Device.X_IOWRT_EU_Dropbear. parameter" exit 1 fi notif2=`uci -c /etc/icwmpd get cwmp_notifications.@notifications[0].passive | grep "Device.WiFi.SSID.1.SD"`