feat: embed measure slots in asset and device documents #372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do ?
This adds a new field to the documents in the
assets
anddevices
collections,measureSlots
, which is populated with the name and type of the measures from the asset/device model.This field is automatically updated when the measures of an asset/device model is updated, for each asset/device of that model provisioned in the platform.
Important
Existing assets and devices will not automatically be updated with this new field.
The following script can be used to create this field manually in all existing assets and devices of all engines using
kourou sdk:execute
:Migration script
Other changes
A new ask,
ask:device-manager:device:refresh-model
, has been added, that updates the embedded measure slots in each provisioned device with the one found in the requested model (akin to the already-existingask:device-manager:asset:refresh-model
ask).Boyscout
The
device-manager/models:updateAsset
action has been updated to update all engines and refresh all assets of the updated model if necessary.The docs were updated to fix the controller names in the
controllers/models/update-asset/
andcontrollers/models/write-asset/
pages.Part of KZLPRD-438.