Loading edge_cloud_management_api/controllers/app_controllers.py +27 −10 Original line number Diff line number Diff line Loading @@ -183,11 +183,20 @@ def create_app_instance(): pi_edge_client_factory = PiEdgeAPIClientFactory() pi_edge_client = pi_edge_client_factory.create_pi_edge_api_client() zone = get_zone( app_zones[0] first_zone = app_zones[0] if isinstance(app_zones, list) and app_zones else {} if not isinstance(first_zone, dict): first_zone = {} edge_cloud_zone_id = ( first_zone .get("EdgeCloudZone", {}) .get("edgeCloudZoneId") ) zone = get_zone(edge_cloud_zone_id) if not zone: return jsonify({ "error": "Edge Cloud Zone not found", "edgeCloudZoneId": edge_cloud_zone_id }), 404 # ============================================================ # PARTNER DEPLOYMENT (Federation path) Loading @@ -198,7 +207,9 @@ def create_app_instance(): # Step 1: Retrieve application metadata from SRM # ============================================================ app_response = pi_edge_client.get_app(appId=app_id) appData = app_response.get("appManifest") appData = app_response.get("appManifest") if isinstance(app_response, dict) else None if not isinstance(appData, dict): appData = None if not appData: return jsonify({ Loading Loading @@ -240,9 +251,15 @@ def create_app_instance(): ] } fed_token = get_fed( fed_record = get_fed( zone.get("fedContextId") ).get("token") ) if not fed_record or "token" not in fed_record: return jsonify({ "error": "Federation token not found", "federationContextId": zone.get("fedContextId") }), 404 fed_token = fed_record.get("token") print("\n========== OEG → FM ARTEFACT PAYLOAD ==========") print(json.dumps(artefact, indent=2)) Loading Loading
edge_cloud_management_api/controllers/app_controllers.py +27 −10 Original line number Diff line number Diff line Loading @@ -183,11 +183,20 @@ def create_app_instance(): pi_edge_client_factory = PiEdgeAPIClientFactory() pi_edge_client = pi_edge_client_factory.create_pi_edge_api_client() zone = get_zone( app_zones[0] first_zone = app_zones[0] if isinstance(app_zones, list) and app_zones else {} if not isinstance(first_zone, dict): first_zone = {} edge_cloud_zone_id = ( first_zone .get("EdgeCloudZone", {}) .get("edgeCloudZoneId") ) zone = get_zone(edge_cloud_zone_id) if not zone: return jsonify({ "error": "Edge Cloud Zone not found", "edgeCloudZoneId": edge_cloud_zone_id }), 404 # ============================================================ # PARTNER DEPLOYMENT (Federation path) Loading @@ -198,7 +207,9 @@ def create_app_instance(): # Step 1: Retrieve application metadata from SRM # ============================================================ app_response = pi_edge_client.get_app(appId=app_id) appData = app_response.get("appManifest") appData = app_response.get("appManifest") if isinstance(app_response, dict) else None if not isinstance(appData, dict): appData = None if not appData: return jsonify({ Loading Loading @@ -240,9 +251,15 @@ def create_app_instance(): ] } fed_token = get_fed( fed_record = get_fed( zone.get("fedContextId") ).get("token") ) if not fed_record or "token" not in fed_record: return jsonify({ "error": "Federation token not found", "federationContextId": zone.get("fedContextId") }), 404 fed_token = fed_record.get("token") print("\n========== OEG → FM ARTEFACT PAYLOAD ==========") print(json.dumps(artefact, indent=2)) Loading