Loading src/edgecloud/clients/aeros/client.py +39 −0 Original line number Diff line number Diff line Loading @@ -40,3 +40,42 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): self, region: Optional[str] = None, status: Optional[str] = None ) -> List[Dict]: return [{"edgeCloudZoneId": "zone-1", "status": "active"}] def get_edge_cloud_zones_details( self, zone_id: str, flavour_id: Optional[str] = None ) -> Dict: # Minimal mocked response based on required fields of 'ZoneRegisteredData' in GSMA OPG E/WBI API return { "zoneId": zone_id, "reservedComputeResources": [ { "cpuArchType": "ISA_X86_64", "numCPU": "4", "memory": 8192, } ], "computeResourceQuotaLimits": [ { "cpuArchType": "ISA_X86_64", "numCPU": "8", "memory": 16384, } ], "flavoursSupported": [ { "flavourId": "medium-x86", "cpuArchType": "ISA_X86_64", "supportedOSTypes": [ { "architecture": "x86_64", "distribution": "UBUNTU", "version": "OS_VERSION_UBUNTU_2204_LTS", "license": "OS_LICENSE_TYPE_FREE", } ], "numCPU": 4, "memorySize": 8192, "storageSize": 100, } ], } src/edgecloud/clients/i2edge/client.py +43 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,46 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): except I2EdgeError as e: raise e # Harcoded def get_edge_cloud_zones_details( self, zone_id: str, flavour_id: Optional[str] = None ) -> Dict: # Minimal mocked response based on required fields of 'ZoneRegisteredData' in GSMA OPG E/WBI API return { "zoneId": zone_id, "reservedComputeResources": [ { "cpuArchType": "ISA_X86_64", "numCPU": "4", "memory": 8192, } ], "computeResourceQuotaLimits": [ { "cpuArchType": "ISA_X86_64", "numCPU": "8", "memory": 16384, } ], "flavoursSupported": [ { "flavourId": "medium-x86", "cpuArchType": "ISA_X86_64", "supportedOSTypes": [ { "architecture": "x86_64", "distribution": "UBUNTU", "version": "OS_VERSION_UBUNTU_2204_LTS", "license": "OS_LICENSE_TYPE_FREE", } ], "numCPU": 4, "memorySize": 8192, "storageSize": 100, } ], } def _create_artefact( self, artefact_id: str, Loading Loading @@ -139,9 +179,11 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): except I2EdgeError as e: raise e # Harcoded def deploy_app(self, app_id: str, app_zones: List[Dict]) -> Dict: return {"appInstanceId": "abcd-efgh"} # Harcoded def get_all_deployed_apps( self, app_id: Optional[str] = None, Loading @@ -150,5 +192,6 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): ) -> List[Dict]: return [{"appInstanceId": "abcd-efgh", "status": "ready"}] # Harcoded def undeploy_app(self, app_instance_id: str) -> None: print(f"Deleting app instance: {app_instance_id}") src/edgecloud/clients/piedge/client.py +39 −0 Original line number Diff line number Diff line Loading @@ -113,3 +113,42 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): zone["edgeCloudRegion"] = node.get("location") zone_list.append(zone) return zone_list def get_edge_cloud_zones_details( self, zone_id: str, flavour_id: Optional[str] = None ) -> Dict: # Minimal mocked response based on required fields of 'ZoneRegisteredData' in GSMA OPG E/WBI API return { "zoneId": zone_id, "reservedComputeResources": [ { "cpuArchType": "ISA_X86_64", "numCPU": "4", "memory": 8192, } ], "computeResourceQuotaLimits": [ { "cpuArchType": "ISA_X86_64", "numCPU": "8", "memory": 16384, } ], "flavoursSupported": [ { "flavourId": "medium-x86", "cpuArchType": "ISA_X86_64", "supportedOSTypes": [ { "architecture": "x86_64", "distribution": "UBUNTU", "version": "OS_VERSION_UBUNTU_2204_LTS", "license": "OS_LICENSE_TYPE_FREE", } ], "numCPU": 4, "memorySize": 8192, "storageSize": 100, } ], } src/edgecloud/core/edgecloud_interface.py +14 −0 Original line number Diff line number Diff line Loading @@ -107,3 +107,17 @@ class EdgeCloudManagementInterface(ABC): :return: List of Edge Cloud Zones. """ pass @abstractmethod def get_edge_cloud_zones_details( self, federation_context_id: str, zone_id: str ) -> Dict: """ Retrieves details of a specific Edge Cloud Zone reserved for the specified zone by the partner OP. :param federation_context_id: Identifier of the federation context. :param zone_id: Unique identifier of the Edge Cloud Zone. :return: Dictionary with Edge Cloud Zone details. """ pass Loading
src/edgecloud/clients/aeros/client.py +39 −0 Original line number Diff line number Diff line Loading @@ -40,3 +40,42 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): self, region: Optional[str] = None, status: Optional[str] = None ) -> List[Dict]: return [{"edgeCloudZoneId": "zone-1", "status": "active"}] def get_edge_cloud_zones_details( self, zone_id: str, flavour_id: Optional[str] = None ) -> Dict: # Minimal mocked response based on required fields of 'ZoneRegisteredData' in GSMA OPG E/WBI API return { "zoneId": zone_id, "reservedComputeResources": [ { "cpuArchType": "ISA_X86_64", "numCPU": "4", "memory": 8192, } ], "computeResourceQuotaLimits": [ { "cpuArchType": "ISA_X86_64", "numCPU": "8", "memory": 16384, } ], "flavoursSupported": [ { "flavourId": "medium-x86", "cpuArchType": "ISA_X86_64", "supportedOSTypes": [ { "architecture": "x86_64", "distribution": "UBUNTU", "version": "OS_VERSION_UBUNTU_2204_LTS", "license": "OS_LICENSE_TYPE_FREE", } ], "numCPU": 4, "memorySize": 8192, "storageSize": 100, } ], }
src/edgecloud/clients/i2edge/client.py +43 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,46 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): except I2EdgeError as e: raise e # Harcoded def get_edge_cloud_zones_details( self, zone_id: str, flavour_id: Optional[str] = None ) -> Dict: # Minimal mocked response based on required fields of 'ZoneRegisteredData' in GSMA OPG E/WBI API return { "zoneId": zone_id, "reservedComputeResources": [ { "cpuArchType": "ISA_X86_64", "numCPU": "4", "memory": 8192, } ], "computeResourceQuotaLimits": [ { "cpuArchType": "ISA_X86_64", "numCPU": "8", "memory": 16384, } ], "flavoursSupported": [ { "flavourId": "medium-x86", "cpuArchType": "ISA_X86_64", "supportedOSTypes": [ { "architecture": "x86_64", "distribution": "UBUNTU", "version": "OS_VERSION_UBUNTU_2204_LTS", "license": "OS_LICENSE_TYPE_FREE", } ], "numCPU": 4, "memorySize": 8192, "storageSize": 100, } ], } def _create_artefact( self, artefact_id: str, Loading Loading @@ -139,9 +179,11 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): except I2EdgeError as e: raise e # Harcoded def deploy_app(self, app_id: str, app_zones: List[Dict]) -> Dict: return {"appInstanceId": "abcd-efgh"} # Harcoded def get_all_deployed_apps( self, app_id: Optional[str] = None, Loading @@ -150,5 +192,6 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): ) -> List[Dict]: return [{"appInstanceId": "abcd-efgh", "status": "ready"}] # Harcoded def undeploy_app(self, app_instance_id: str) -> None: print(f"Deleting app instance: {app_instance_id}")
src/edgecloud/clients/piedge/client.py +39 −0 Original line number Diff line number Diff line Loading @@ -113,3 +113,42 @@ class EdgeApplicationManager(EdgeCloudManagementInterface): zone["edgeCloudRegion"] = node.get("location") zone_list.append(zone) return zone_list def get_edge_cloud_zones_details( self, zone_id: str, flavour_id: Optional[str] = None ) -> Dict: # Minimal mocked response based on required fields of 'ZoneRegisteredData' in GSMA OPG E/WBI API return { "zoneId": zone_id, "reservedComputeResources": [ { "cpuArchType": "ISA_X86_64", "numCPU": "4", "memory": 8192, } ], "computeResourceQuotaLimits": [ { "cpuArchType": "ISA_X86_64", "numCPU": "8", "memory": 16384, } ], "flavoursSupported": [ { "flavourId": "medium-x86", "cpuArchType": "ISA_X86_64", "supportedOSTypes": [ { "architecture": "x86_64", "distribution": "UBUNTU", "version": "OS_VERSION_UBUNTU_2204_LTS", "license": "OS_LICENSE_TYPE_FREE", } ], "numCPU": 4, "memorySize": 8192, "storageSize": 100, } ], }
src/edgecloud/core/edgecloud_interface.py +14 −0 Original line number Diff line number Diff line Loading @@ -107,3 +107,17 @@ class EdgeCloudManagementInterface(ABC): :return: List of Edge Cloud Zones. """ pass @abstractmethod def get_edge_cloud_zones_details( self, federation_context_id: str, zone_id: str ) -> Dict: """ Retrieves details of a specific Edge Cloud Zone reserved for the specified zone by the partner OP. :param federation_context_id: Identifier of the federation context. :param zone_id: Unique identifier of the Edge Cloud Zone. :return: Dictionary with Edge Cloud Zone details. """ pass