diff --git a/bin/reset_config b/bin/reset_config index b81357fa7d..b624b31284 100755 --- a/bin/reset_config +++ b/bin/reset_config @@ -36,11 +36,25 @@ echo Setting config timestamp ${now_date} jq < ${src_config} .timestamp=\"${now_date}\" |\ jq .system.testing.sequence_name=\"${config_file%.json}\" > ${dst_config} +if [[ -n $project_id ]]; then + quoted_id=\"${project_id##*/}\" +else + quoted_id=null +fi + +if [[ $project_id =~ ^// ]]; then + sans_project=${project_id%/*} + iot_provider=\"${sans_project#//}\" +else + iot_provider=null +fi + echo Resetting device ${device_id} config... echo Writing config to $REFLECTOR_CONFIG cat < $REFLECTOR_CONFIG { - "project_id": "$project_id", + "iot_provider": $iot_provider, + "project_id": $quoted_id, "site_model": "$site_dir", "device_id": "$device_id", "registry_suffix": $registry_suffix diff --git a/tests/traces/simple/devices/AHU-22/003_event_system.json b/tests/traces/simple/devices/AHU-22/003_event_system.json index b75c1683aa..2b255a1f58 100644 --- a/tests/traces/simple/devices/AHU-22/003_event_system.json +++ b/tests/traces/simple/devices/AHU-22/003_event_system.json @@ -2,7 +2,7 @@ "logentries" : [ { "message" : "2022-07-19T05:04:39Z sent message #70", "category" : "device.log_message", - "timestamp" : "2022-07-19T05:04:39Z", + "timestamp" : "2022-07-19T05:04:32Z", "level" : 200 } ], "timestamp" : "2022-07-19T05:04:39Z", diff --git a/tests/traces/simple/devices/AHU-22/004_event_pointset.json b/tests/traces/simple/devices/AHU-22/004_event_pointset.json index 05498163eb..4d1e72f2fa 100644 --- a/tests/traces/simple/devices/AHU-22/004_event_pointset.json +++ b/tests/traces/simple/devices/AHU-22/004_event_pointset.json @@ -10,6 +10,6 @@ "present_value" : 21 } }, - "timestamp" : "2022-07-19T05:04:39Z", + "timestamp" : "2022-07-19T05:04:49Z", "version" : "1.3.14" -} \ No newline at end of file +} diff --git a/udmis/.idea/runConfigurations/UdmiServicePod_configured.xml b/udmis/.idea/runConfigurations/UdmiServicePod_ClearBlade.xml similarity index 71% rename from udmis/.idea/runConfigurations/UdmiServicePod_configured.xml rename to udmis/.idea/runConfigurations/UdmiServicePod_ClearBlade.xml index d05214369a..c870d5db93 100644 --- a/udmis/.idea/runConfigurations/UdmiServicePod_configured.xml +++ b/udmis/.idea/runConfigurations/UdmiServicePod_ClearBlade.xml @@ -1,11 +1,12 @@ - + - - - + + + +