Unverified Commit 5d5a47e2 authored by Adrian Pino's avatar Adrian Pino Committed by GitHub
Browse files

Merge pull request #32 from OpenOperatorPlatform/refactor/delete-edgecloud-dmo

Delete DMO-related files as it finally won't be implemented
parents 71dbeb4c b2a2b3ff
Loading
Loading
Loading
Loading
+0 −0

Empty file deleted.

+0 −32
Original line number Diff line number Diff line
# Mocked API for testing purposes
from typing import Dict, List, Optional
from src.edgecloud.core.edgecloud_interface import EdgeCloudManagementInterface

class EdgeApplicationManager(EdgeCloudManagementInterface):
    def __init__(self, base_url: str):
        self.base_url = base_url

    def onboard_app(self, app_manifest: Dict) -> Dict:
        print(f"Submitting application: {app_manifest}")
        return {"appId": "1234-5678"}

    def get_all_onboarded_apps(self) -> List[Dict]:
        return [{"appId": "1234-5678", "name": "TestApp"}]

    def get_onboarded_app(self, app_id: str) -> Dict:
        return {"appId": app_id, "name": "TestApp"}

    def delete_onboarded_app(self, app_id: str) -> None:
        print(f"Deleting application: {app_id}")

    def deploy_app(self, app_id: str, app_zones: List[Dict]) -> Dict:
        return {"appInstanceId": "abcd-efgh"}

    def get_all_deployed_apps(self, app_id: Optional[str] = None, app_instance_id: Optional[str] = None, region: Optional[str] = None) -> List[Dict]:
        return [{"appInstanceId": "abcd-efgh", "status": "ready"}]

    def undeploy_app(self, app_instance_id: str) -> None:
        print(f"Deleting app instance: {app_instance_id}")

    def get_edge_cloud_zones(self, region: Optional[str] = None, status: Optional[str] = None) -> List[Dict]:
        return [{"edgeCloudZoneId": "zone-1", "status": "active"}]
+0 −3
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ from __future__ import annotations
from typing import TYPE_CHECKING

from src.edgecloud.clients.aeros.client import EdgeApplicationManager as AerosClient
from src.edgecloud.clients.dmo.client import EdgeApplicationManager as DmoClient
from src.edgecloud.clients.i2edge.client import EdgeApplicationManager as I2EdgeClient
from src.edgecloud.clients.piedge.client import EdgeApplicationManager as PiEdgeClient

@@ -50,12 +49,10 @@ class EdgeCloudTypes:

    I2EDGE = "i2edge"
    AEROS = "aeros"
    DMO = "dmo"
    PIEDGE = "piedge"

    edgecloud_types = {
        I2EDGE: lambda url: I2EdgeClient(base_url=url),
        AEROS: lambda url: AerosClient(base_url=url),
        DMO: lambda url: DmoClient(base_url=url),
        PIEDGE: lambda url: PiEdgeClient(base_url=url),
    }
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ def create_edgecloud_client(client_name: str, base_url: str):

    Args:
        client_name (str): Name of the edge cloud platform. Must be one of:
                          'i2edge', 'aeros', 'dmo', 'piedge'
                          'i2edge', 'aeros', 'piedge'
        base_url (str): The base URL for the client.

    Returns:

tests/edgecloud/test_dmo.py

deleted100644 → 0
+0 −0

Empty file deleted.