Loading src/sunrise6g_opensdk/edgecloud/adapters/aeros/client.py +526 −162 File changed.Preview size limit exceeded, changes collapsed. Show changes src/sunrise6g_opensdk/edgecloud/adapters/aeros/config.py +1 −1 Original line number Diff line number Diff line Loading @@ -23,5 +23,5 @@ if not aerOS_ACCESS_TOKEN: aerOS_HLO_TOKEN = "harcoded_hlo_token" if not aerOS_HLO_TOKEN: raise ValueError("Environment variable 'aerOS_HLO_TOKEN' is not set.") DEBUG = False DEBUG = True LOG_FILE = ".log/aeros_client.log" src/sunrise6g_opensdk/edgecloud/adapters/aeros/continuum_client.py +3 −1 Original line number Diff line number Diff line Loading @@ -127,8 +127,10 @@ class ContinuumClient: undeploy_url = f"{self.api_url}/hlo_fe/services/{service_id}" response = requests.delete(undeploy_url, headers=self.hlo_headers, timeout=15) if response is None: self.logger.debug("In NONE Undeploy service URL: %s", undeploy_url) return None else: self.logger.debug("In OK Undeploy and text: %s", response.text) if config.DEBUG: self.logger.debug("Re-allocate service URL: %s", undeploy_url) self.logger.debug( Loading Loading @@ -165,7 +167,7 @@ class ContinuumClient: response.status_code, response.text, ) return response.json() return response @catch_requests_exceptions def purge_service(self, service_id: str) -> bool: Loading src/sunrise6g_opensdk/edgecloud/adapters/aeros/converters/__init__.py 0 → 100644 +0 −0 Empty file added. src/sunrise6g_opensdk/edgecloud/adapters/aeros/camara2aeros_converter.py→src/sunrise6g_opensdk/edgecloud/adapters/aeros/converters/camara2aeros_converter.py +2 −4 Original line number Diff line number Diff line Loading @@ -17,8 +17,7 @@ from sunrise6g_opensdk.edgecloud.adapters.aeros.continuum_models import ( logger = setup_logger(__name__, is_debug=True, file_name=config.LOG_FILE) def generate_tosca(app_manifest: AppManifest, app_zones: List[Dict[str, Any]]) -> str: def generate_tosca(app_manifest: AppManifest, app_zones: List[str]) -> str: ''' Generate a TOSCA model from the application manifest and app zones. Args: Loading @@ -33,8 +32,7 @@ def generate_tosca(app_manifest: AppManifest, repository_url = "/".join( image_path.split("/")[:-1]) if "/" in image_path else "docker_hub" zone_id = app_zones[0].get("EdgeCloudZone", {}).get("edgeCloudZoneId", "default-zone") zone_id = app_zones[0] logger.info("DEBUG : %s", app_manifest.requiredResources.root) # Extract minNodeMemory (fallback = 1024 MB) Loading Loading
src/sunrise6g_opensdk/edgecloud/adapters/aeros/client.py +526 −162 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/sunrise6g_opensdk/edgecloud/adapters/aeros/config.py +1 −1 Original line number Diff line number Diff line Loading @@ -23,5 +23,5 @@ if not aerOS_ACCESS_TOKEN: aerOS_HLO_TOKEN = "harcoded_hlo_token" if not aerOS_HLO_TOKEN: raise ValueError("Environment variable 'aerOS_HLO_TOKEN' is not set.") DEBUG = False DEBUG = True LOG_FILE = ".log/aeros_client.log"
src/sunrise6g_opensdk/edgecloud/adapters/aeros/continuum_client.py +3 −1 Original line number Diff line number Diff line Loading @@ -127,8 +127,10 @@ class ContinuumClient: undeploy_url = f"{self.api_url}/hlo_fe/services/{service_id}" response = requests.delete(undeploy_url, headers=self.hlo_headers, timeout=15) if response is None: self.logger.debug("In NONE Undeploy service URL: %s", undeploy_url) return None else: self.logger.debug("In OK Undeploy and text: %s", response.text) if config.DEBUG: self.logger.debug("Re-allocate service URL: %s", undeploy_url) self.logger.debug( Loading Loading @@ -165,7 +167,7 @@ class ContinuumClient: response.status_code, response.text, ) return response.json() return response @catch_requests_exceptions def purge_service(self, service_id: str) -> bool: Loading
src/sunrise6g_opensdk/edgecloud/adapters/aeros/converters/__init__.py 0 → 100644 +0 −0 Empty file added.
src/sunrise6g_opensdk/edgecloud/adapters/aeros/camara2aeros_converter.py→src/sunrise6g_opensdk/edgecloud/adapters/aeros/converters/camara2aeros_converter.py +2 −4 Original line number Diff line number Diff line Loading @@ -17,8 +17,7 @@ from sunrise6g_opensdk.edgecloud.adapters.aeros.continuum_models import ( logger = setup_logger(__name__, is_debug=True, file_name=config.LOG_FILE) def generate_tosca(app_manifest: AppManifest, app_zones: List[Dict[str, Any]]) -> str: def generate_tosca(app_manifest: AppManifest, app_zones: List[str]) -> str: ''' Generate a TOSCA model from the application manifest and app zones. Args: Loading @@ -33,8 +32,7 @@ def generate_tosca(app_manifest: AppManifest, repository_url = "/".join( image_path.split("/")[:-1]) if "/" in image_path else "docker_hub" zone_id = app_zones[0].get("EdgeCloudZone", {}).get("edgeCloudZoneId", "default-zone") zone_id = app_zones[0] logger.info("DEBUG : %s", app_manifest.requiredResources.root) # Extract minNodeMemory (fallback = 1024 MB) Loading