Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Feature/make i2edge fully camara compliant - #153

Merged
adrian-pino merged 14 commits into
mainfrom
feature/make-i2edge-fully-camara-compliant
Jul 31, 2025
Merged

Feature/make i2edge fully camara compliant#153
adrian-pino merged 14 commits into
mainfrom
feature/make-i2edge-fully-camara-compliant

Conversation

@adrian-pino

@adrian-pino adrian-pino commented Jul 31, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

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
@adrian-pino
adrian-pino requested a review from Copilot July 31, 2025 12:56

This comment was marked as outdated.

adrian-pino and others added 4 commits July 31, 2025 15:33
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.
@adrian-pino
adrian-pino requested a review from Copilot July 31, 2025 14:20

This comment was marked as outdated.

adrian-pino and others added 4 commits July 31, 2025 16:25
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.
@adrian-pino
adrian-pino requested a review from Copilot July 31, 2025 14:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id parameter 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):

Comment thread src/sunrise6g_opensdk/edgecloud/adapters/i2edge/client.py Outdated
Comment thread src/sunrise6g_opensdk/edgecloud/adapters/i2edge/client.py Outdated
Comment thread src/sunrise6g_opensdk/edgecloud/adapters/i2edge/client.py
Comment thread src/sunrise6g_opensdk/edgecloud/adapters/i2edge/client.py
adrian-pino and others added 2 commits July 31, 2025 16:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@adrian-pino
adrian-pino merged commit ae7f76d into main Jul 31, 2025
2 checks passed
@adrian-pino
adrian-pino deleted the feature/make-i2edge-fully-camara-compliant branch July 31, 2025 14:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants