-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support software type for c8y advanced software management in 10.14 #2613
Support software type for c8y advanced software management in 10.14 #2613
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
Robot Results
|
74733a1
to
e82cc3d
Compare
e82cc3d
to
0aa82d3
Compare
0aa82d3
to
041f84b
Compare
041f84b
to
3126a0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc change (need to check)?
Yes, the doc has to be updated.
The sentence "thin-edge.io ships a default plugin supporting debian packages from both apt repositories as well as remote locations. If you prefer to use packages from an apt repository, select the Provide a file path option and give an empty space (' ')." is really unclear.
I would simply tell that if no version or no path are applicable then a string of empty spaces are accepted by thin-edge meaning that this field is non applicable. We can stress that this is the case for the apt plugin when one wants to install the latest version of the package (.i.e. no version) using the package repository configured on the device (i.e. no path/url).
@reubenmiller does it make sense to accept the string "NA"
as well as white-spaces to mean that the field is non applicable?
tests/RobotFramework/tests/cumulocity/self-update/tedge_self_update.robot
Show resolved
Hide resolved
I don't think it is worth it...from an API view, just leaving out the url is fine. I believe the requirement to use whitespace in the url is only a UI form validation issue...so we could put a change request to remove the UI validation to also allow an option to not treat a missing url as an error. |
0907051
to
83248be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Since the version 10.14, c8y starts supporting "type" field for software list and "softwareType" field for software update operation. Change the Rust code accordingly: 1) Software list Stop combining version and software type with the connector "::". Module type will be declared as "type" and the version field holds its pure version only. 2) Software update Different behaviour if a received operation contains "softwareType" field or not. If yes, softwareType will be used as its module type and version will be used as it is. If no, mapper tries to get the module type from the received version field as we initially implemented. Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
83248be
to
8bbfa2b
Compare
Software type is reported as "type" in the PR thin-edge#2613, however, it should have been "softwareType" according to c8y's document. Refer to here. https://cumulocity.com/guides/reference/device-management-library/#software Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Software type is reported as "type" in the PR thin-edge#2613, however, it should have been "softwareType" according to c8y's document. Refer to here. https://cumulocity.com/guides/reference/device-management-library/#software Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Proposed changes
Since the version 10.14, c8y starts supporting "type" field for software list and "softwareType" field for software update operation.
Change the Rust code accordingly:
Software list
Stop combining version and software type with the connector "::". The module type will be declared as "type" in c8y JSON and the version field holds its pure version only.
Software update
Different behaviour if a received operation contains "softwareType" field or not. If yes, softwareType will be used as its module type and version will be used as it is. If no, mapper tries to get the module type from the received version field as we initially implemented.
Todo:
Types of changes
Paste Link to the issue
#1352
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments