From 73c1e6b65254a0a7c6a915f0ccc962894d2266eb Mon Sep 17 00:00:00 2001 From: kmohr-soprasteria <57349523+kmohr-soprasteria@users.noreply.github.com> Date: Wed, 21 May 2025 09:55:44 +0200 Subject: [PATCH] (QM) Add new integer profile instance for QM data retention Fixes #1224 --- spec/MicroWaveDeviceInventory+config.json | 16 ++++++++++++++++ ...icroWaveDeviceInventory+profileInstances.yaml | 11 +++++++++++ .../CyclicCacheQualityMeasurementProcess.md | 1 + 3 files changed, 28 insertions(+) diff --git a/spec/MicroWaveDeviceInventory+config.json b/spec/MicroWaveDeviceInventory+config.json index 29c0b311..1a7fbe26 100644 --- a/spec/MicroWaveDeviceInventory+config.json +++ b/spec/MicroWaveDeviceInventory+config.json @@ -384,6 +384,22 @@ } } }, + { + "uuid": "mwdi-1-3-0-integer-p-007", + "profile-name": "integer-profile-1-0:PROFILE_NAME_TYPE_INTEGER_PROFILE", + "integer-profile-1-0:integer-profile-pac": { + "integer-profile-capability": { + "integer-name": "qualityMeasurementRetentionPeriod", + "purpose": "Time period for which qualityMeasurement records are kept, before they are deleted.", + "unit": "days", + "minimum": 1, + "maximum": 30 + }, + "integer-profile-configuration": { + "integer-value": 7 + } + } + }, { "uuid": "mwdi-1-3-0-string-p-000", "profile-name": "string-profile-1-0:PROFILE_NAME_TYPE_STRING_PROFILE", diff --git a/spec/MicroWaveDeviceInventory+profileInstances.yaml b/spec/MicroWaveDeviceInventory+profileInstances.yaml index fc487859..60af7400 100644 --- a/spec/MicroWaveDeviceInventory+profileInstances.yaml +++ b/spec/MicroWaveDeviceInventory+profileInstances.yaml @@ -211,6 +211,17 @@ profile-instances: configuration: integer-value: 1 + - profile-name: 'IntegerProfile' + uuid: 'mwdi-1-3-0-integer-p-007' + capability: + integer-name: 'qualityMeasurementRetentionPeriod' + purpose: 'Time period for which qualityMeasurement records are kept, before they are deleted.' + unit: 'days' + minimum: 1 + maximum: 30 + configuration: + integer-value: 7 + - profile-name: 'StringProfile' uuid: 'mwdi-1-3-0-string-p-000' capability: diff --git a/spec/additionalDescription/CyclicCacheQualityMeasurementProcess.md b/spec/additionalDescription/CyclicCacheQualityMeasurementProcess.md index 1a2655fa..a144472b 100644 --- a/spec/additionalDescription/CyclicCacheQualityMeasurementProcess.md +++ b/spec/additionalDescription/CyclicCacheQualityMeasurementProcess.md @@ -38,6 +38,7 @@ By selecting the device, whose cached ControlConstruct was updated the longest t Once a candidate devices has been identified, first its ControlConstruct is retrieved from the MWDI's cache. In the next step, the ControlConstruct is fetched from live (via MWDI live service). Both ControlConstructs are then compared to determine the differences. After the comparison and scoring has been finished, results are written to ElasticSearch. +Data is kept according to the retention period specified in integerProfile *qualityMeasurementRetentionPeriod*. There are no specific presciptions for how the comparison shall be implemented apart from the comparison logic to be applied. An appropriate approach shall be selected by the implementer. *First analysis results showed that* deepdiff *could be a suitable candidate for comparing the ControlConstructs (large JSON structures), as it is claimed to be easy to use and to be handling deep comparisons really well (it can detect value changes, missing or new objects, type mismatches etc., and its output potentially can be easily connected with the intended scoring model).*