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

feat(rest.cloudconnection.provider): Cloud Connections REST Api #4950

Merged

Conversation

salvatore-coppola
Copy link
Contributor

@salvatore-coppola salvatore-coppola commented Nov 3, 2023

This new bundle provides a REST API that allows access to the CloudConnection object and its DataService and their methods via the REST API.

TODO:

  • Add unit and IT tests.
  • Polish the code
  • Add documentation
  • Migrate to DTO provided by org.eclipse.kura.rest.configuration.provider
  • Add permissions to snapshot_0.xml

@MMaiero
Copy link
Contributor

MMaiero commented Nov 7, 2023

image

@MMaiero
Copy link
Contributor

MMaiero commented Nov 13, 2023

image

@nicolatimeus
Copy link
Contributor

We should also edit the snasphots to add the new permission

@salvatore-coppola salvatore-coppola marked this pull request as ready for review November 13, 2023 15:03
@salvatore-coppola salvatore-coppola force-pushed the cloud-connections-rest-api branch from 2417075 to 2a2d5cf Compare November 13, 2023 15:04
@nicolatimeus
Copy link
Contributor

Please update copyright headers in snapshot files

@salvatore-coppola salvatore-coppola force-pushed the cloud-connections-rest-api branch from 2a2d5cf to b991ce9 Compare November 13, 2023 16:29
@nicolatimeus
Copy link
Contributor

Please check sonarlint issues

@salvatore-coppola salvatore-coppola force-pushed the cloud-connections-rest-api branch from 5fe7de3 to 9a6b6e4 Compare November 14, 2023 14:28
@salvatore-coppola salvatore-coppola force-pushed the cloud-connections-rest-api branch from 9a6b6e4 to a01c29d Compare November 14, 2023 14:46
@nicolatimeus nicolatimeus merged commit 037d68e into eclipse-kura:develop Nov 14, 2023
Copy link
Contributor

The backport to release-5.4.0 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-5.4.0 release-5.4.0
# Navigate to the new working tree
cd .worktrees/backport-release-5.4.0
# Create a new branch
git switch --create backport-4950-to-release-5.4.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 037d68e43fe9987262a948b16f77be84bcf8827e
# Push it to GitHub
git push --set-upstream origin backport-4950-to-release-5.4.0
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-5.4.0

Then, create a pull request where the base branch is release-5.4.0 and the compare/head branch is backport-4950-to-release-5.4.0.

salvatore-coppola added a commit to salvatore-coppola/kura that referenced this pull request Nov 14, 2023
…pse-kura#4950)

* Added bundle skeleton

* Added first code implementation.

* Added some methods implementation

* First partial implementation

* Code cleanup

* fixed line length

* fixed error in bundle renaming during build.

* added missing annotation

* added missing annotation 2

* Full featured

* Several fixes

* Some variables renaming

* Migrated to org.eclipse.kura.rest.configuration.api classes

* commented unready module

* Refactored code to reduce cognitive complexity.

* Added test skeleton

* Added test for `/cloudEntries`

* Removed checked exceptions throwing in init.

* some fixes

* other fixes.

* refactored according with new naming

* code cleanup

* Minor methods name changes

* minor fixes.

* Removed unused DEBUG_MESSSAGE.

* Now if a stackComponent doesn't exist for a specific pid, an empty list is returned.

* Changed the returned error codes.

* replaced cloudServicePid with cloudEndpointPid

* Added KuraErrorCode.NOT_FOUND if connectionId is not found.

* Changer returned error code.

* Almost finished tests.

* Added all tests.

* Fixed shouldDeleteCloudEndpoint

* Replaced CloudService-test pid with constant.

* Replace void return with `javax.ws.rs.core.Response`

* Fixed test.

* Added different specific PID for executions on different Transport

* Fixed error in pid

* Refactored tests.

* Removed unused resources.

* Added `rest.cloudconnection` permission to snapshot_0.xml files

* Updated copyright header.

* Updated year in the copyright plate.

* Refactored code to remove cognitive complexity.

* Fixed wrong class type

* Fixed reversed fields.

* Added check on managed CloudconnectionPids existence.
MMaiero pushed a commit that referenced this pull request Nov 15, 2023
…port release-5.4.0] (#4980)

feat(rest.cloudconnection.provider): Cloud Connections REST Api (#4950)

* Added bundle skeleton

* Added first code implementation.

* Added some methods implementation

* First partial implementation

* Code cleanup

* fixed line length

* fixed error in bundle renaming during build.

* added missing annotation

* added missing annotation 2

* Full featured

* Several fixes

* Some variables renaming

* Migrated to org.eclipse.kura.rest.configuration.api classes

* commented unready module

* Refactored code to reduce cognitive complexity.

* Added test skeleton

* Added test for `/cloudEntries`

* Removed checked exceptions throwing in init.

* some fixes

* other fixes.

* refactored according with new naming

* code cleanup

* Minor methods name changes

* minor fixes.

* Removed unused DEBUG_MESSSAGE.

* Now if a stackComponent doesn't exist for a specific pid, an empty list is returned.

* Changed the returned error codes.

* replaced cloudServicePid with cloudEndpointPid

* Added KuraErrorCode.NOT_FOUND if connectionId is not found.

* Changer returned error code.

* Almost finished tests.

* Added all tests.

* Fixed shouldDeleteCloudEndpoint

* Replaced CloudService-test pid with constant.

* Replace void return with `javax.ws.rs.core.Response`

* Fixed test.

* Added different specific PID for executions on different Transport

* Fixed error in pid

* Refactored tests.

* Removed unused resources.

* Added `rest.cloudconnection` permission to snapshot_0.xml files

* Updated copyright header.

* Updated year in the copyright plate.

* Refactored code to remove cognitive complexity.

* Fixed wrong class type

* Fixed reversed fields.

* Added check on managed CloudconnectionPids existence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants