Loading edge_cloud_management_api/controllers/app_controllers.py +15 −2 Original line number Diff line number Diff line Loading @@ -112,6 +112,16 @@ def _normalize_federated_app_provider_id(app_provider_id, fallback_source): ) def _normalize_federated_artefact_id(federation_context_id, artefact_id, fallback_source): if artefact_id and re.match( r"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-" r"[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", str(artefact_id), ): return str(uuid.uuid5(uuid.NAMESPACE_URL, f"{federation_context_id}:{artefact_id}")) return str(uuid.uuid5(uuid.NAMESPACE_URL, f"{federation_context_id}:{fallback_source}")) def submit_app(body: dict): """ Controller for submitting application metadata. Loading Loading @@ -349,8 +359,11 @@ def create_app_instance(): if component_specs and isinstance(component_specs, list): component_name = component_specs[0].get("componentName") component_name = component_name or app_name if not artefact_id: artefact_id = str(uuid.uuid5(uuid.NAMESPACE_URL, str(app_id))) artefact_id = _normalize_federated_artefact_id( zone.get("fedContextId"), artefact_id, app_id, ) service_name_nb = _ensure_service_name( (component_specs[0].get("serviceNameNB") if component_specs else None), Loading Loading
edge_cloud_management_api/controllers/app_controllers.py +15 −2 Original line number Diff line number Diff line Loading @@ -112,6 +112,16 @@ def _normalize_federated_app_provider_id(app_provider_id, fallback_source): ) def _normalize_federated_artefact_id(federation_context_id, artefact_id, fallback_source): if artefact_id and re.match( r"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-" r"[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$", str(artefact_id), ): return str(uuid.uuid5(uuid.NAMESPACE_URL, f"{federation_context_id}:{artefact_id}")) return str(uuid.uuid5(uuid.NAMESPACE_URL, f"{federation_context_id}:{fallback_source}")) def submit_app(body: dict): """ Controller for submitting application metadata. Loading Loading @@ -349,8 +359,11 @@ def create_app_instance(): if component_specs and isinstance(component_specs, list): component_name = component_specs[0].get("componentName") component_name = component_name or app_name if not artefact_id: artefact_id = str(uuid.uuid5(uuid.NAMESPACE_URL, str(app_id))) artefact_id = _normalize_federated_artefact_id( zone.get("fedContextId"), artefact_id, app_id, ) service_name_nb = _ensure_service_name( (component_specs[0].get("serviceNameNB") if component_specs else None), Loading