This repository was archived by the owner on Aug 7, 2025. It is now read-only.
Feature/make i2edge fully camara compliant - #153
Merged
Conversation
Updates the i2Edge adapter to fully comply with CAMARA specifications. This includes standardizing request and response formats, improving error handling, and aligning status codes with CAMARA expectations (e.g., using 204 for successful deletions and 202 for deployment requests). Changes include: - Removing redundant status code checks as i2edge_get/post/delete now handle this, raising an exception if unexpected - Mapping i2Edge responses to CAMARA-compliant schemas. - Adding filtering capabilities to get all deployed apps. - Adding expected_status param to i2edge_get/post/delete to raise exceptions if the status is wrong - Implemented the get_deployed_app method according to CAMARA
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Improves app instance information retrieval from i2Edge. - Maps i2Edge deployment status to CAMARA status correctly. - Extracts edge cloud zone ID from the application specification's node selector, rather than relying on a dedicated zone ID field. - Implements dynamic fallback zone retrieval if the app instance is not found in the initial instances list by querying available zones from i2Edge. - Uses "unknown" and "Unknown_Provider" as safer defaults when instance data is unavailable. - Enables `AppId` and `AppInstanceId` to accept strings to comply with current i2Edge limitations.
Adds a placeholder implementation for the `get_deployed_app` method in both the AEROS and Kubernetes adapters. This method is intended to retrieve information about a specific deployed application instance, supporting CAMARA compliance. The current implementation raises a `NotImplementedError` as the actual logic is adapter-specific and requires further development.
Adds tests to verify the retrieval of onboarded and deployed applications. These tests cover: - Retrieving a specific onboarded application. - Retrieving all onboarded applications. - Retrieving all deployed application instances. - Retrieving a specific deployed application instance.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Ensures all artefact-related methods consistently return Response objects. This change promotes API consistency across the i2Edge adapter.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR makes the i2Edge adapter fully CAMARA compliant by updating schemas to support both UUID and string types for app/instance IDs, adding comprehensive tests for app retrieval operations, and implementing proper CAMARA-compliant response formatting across all API endpoints.
- Updates core schemas to handle both UUID and string types for AppId and AppInstanceId
- Adds comprehensive test coverage for onboarded and deployed app retrieval operations
- Implements CAMARA-compliant response formatting and error handling in the i2Edge adapter
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/edgecloud/test_e2e.py | Adds new test cases for getting onboarded apps, deployed apps, and specific app instances |
| src/sunrise6g_opensdk/edgecloud/core/schemas.py | Updates AppId and AppInstanceId to accept both UUID and string types |
| src/sunrise6g_opensdk/edgecloud/core/edgecloud_interface.py | Updates method signatures and documentation for CAMARA compliance |
| src/sunrise6g_opensdk/edgecloud/adapters/kubernetes/client.py | Adds placeholder implementation for get_deployed_app method |
| src/sunrise6g_opensdk/edgecloud/adapters/i2edge/schemas.py | Makes several optional fields truly optional by removing default values |
| src/sunrise6g_opensdk/edgecloud/adapters/i2edge/common.py | Enhances HTTP utility functions with better status code handling and error reporting |
| src/sunrise6g_opensdk/edgecloud/adapters/i2edge/client.py | Major refactoring to implement CAMARA-compliant response formatting and proper error handling |
| src/sunrise6g_opensdk/edgecloud/adapters/aeros/client.py | Adds placeholder implementation for get_deployed_app method |
Comments suppressed due to low confidence (1)
tests/edgecloud/test_e2e.py:274
- The test function uses an
app_instance_idparameter that is not defined in the function signature's pytest.mark.parametrize decorator. This parameter should be properly configured as a fixture or passed through the parametrize decorator to ensure the test can execute.
def test_get_deployed_app(edgecloud_client, app_instance_id):
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.