Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Device Birth Extended Properties #3273

Merged
merged 5 commits into from Mar 24, 2021

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Mar 15, 2021

This PR adds the support for extendedProperties in Birth message sent from the device.

Related Issue
None

Description of the solution adopted
This PR adds mapping and resources to store the extendedProperties metric sent by Kura.
Those properties will be sent as an additional metric in the BIRTH message in a well defined JSON format.
Those properties are read and stored as an additional field of the Device entity to allow query easily those values.
Values from the device are not parsed (other than the value itself) nor there is logic on them because they can change from device to device.

Screenshots
Some screenshot of the new values in console.

Screenshot 2021-03-15 at 16 23 26

Any side note on the changes made
Completed a bit the Javadocs of Device-related entities.

@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label Mar 15, 2021
@Coduz Coduz requested a review from lorthirk March 15, 2021 15:49
@Coduz Coduz added this to In Progress in 1.5.0 via automation Mar 15, 2021
@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #3273 (1e35c09) into develop (7f08c8d) will increase coverage by 0.33%.
The diff coverage is 36.87%.

❗ Current head 1e35c09 differs from pull request most recent head 2667032. Consider uploading reports for the commit 2667032 to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3273      +/-   ##
=============================================
+ Coverage      25.47%   25.80%   +0.33%     
- Complexity       655      658       +3     
=============================================
  Files           1467     1470       +3     
  Lines          29943    30025      +82     
  Branches        2504     2507       +3     
=============================================
+ Hits            7629     7749     +120     
+ Misses         21716    21670      -46     
- Partials         598      606       +8     
Impacted Files Coverage Δ Complexity Δ
...e/device/lifecycle/KapuaBirthPayloadAttibutes.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...nternal/device/lifecycle/KapuaAppsPayloadImpl.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...evice/lifecycle/model/BirthExtendedProperties.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../device/lifecycle/model/BirthExtendedProperty.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../eclipse/kapua/service/device/registry/Device.java 100.00% <ø> (ø) 0.00 <0.00> (ø)
...apua/service/device/registry/DeviceAttributes.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...pua/service/device/registry/DeviceXmlRegistry.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ce/device/registry/internal/DeviceFactoryImpl.java 25.00% <0.00%> (-29.55%) 0.00 <0.00> (ø)
...slator/kura/kapua/TranslatorLifeAppsKuraKapua.java 8.33% <0.00%> (-0.15%) 0.00 <0.00> (ø)
.../registry/internal/DeviceExtendedPropertyImpl.java 7.40% <7.40%> (ø) 0.00 <0.00> (?)
... and 42 more

1.5.0 automation moved this from In Progress to In Review Mar 16, 2021
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
@Coduz Coduz merged commit a9a2354 into eclipse:develop Mar 24, 2021
1.5.0 automation moved this from In Review to Done Mar 24, 2021
@Coduz Coduz deleted the feature-extensibleBirth branch March 24, 2021 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
No open projects
1.5.0
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants