Commit 93f4f703 authored by Adrian Pino's avatar Adrian Pino
Browse files

Polish the edgecloud structure

parent 16e4624a
Loading
Loading
Loading
Loading

artifact/clients/skopeo/.gitkeep

deleted100644 → 0
+0 −0

Empty file deleted.

+0 −0

Empty file deleted.

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

class EdgeApplicationManager(EdgeCloudManagementInterface):
    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"}]
Loading