Commit 83a73f65 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

fix(fm): onboard partner apps with capability kind workload

SRM renamed the deploy capability kind from deploy_workload to workload and
rejects the old name, so every inbound OnboardApplication failed at SRM with
400 and reached the partner as 500. Use workload, as OEG already does.
parent 2fb00308
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for src/federation_manager/application/inbound_onboarding.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ class InboundOnboardingService:
                "service_capability_requirements": [
                    {
                        "ref": "require-workload-deployment",
                        "capability_kind": "deploy_workload",
                        "capability_kind": "workload",
                        "domain_kind": "compute",
                        "is_required": True,
                    }
+1 −1
Changes for tests/test_inbound_onboarding.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ def test_onboarding_creates_a_specification_the_partner_can_deploy() -> None:
    assert unit["artifact_ref"] == "nginx:1.27-alpine"
    assert unit["resource_requirements"]["compute"]["cpu_millicores"] == 500
    assert unit["resource_requirements"]["interfaces"][0]["port"] == 80
    assert spec["service_capability_requirements"][0]["capability_kind"] == "deploy_workload"
    assert spec["service_capability_requirements"][0]["capability_kind"] == "workload"
    stored = h.catalogue.resources[(h.partner.id, APPLICATION, f"{APP_ID}:1.0.0")]
    assert UUID(stored["service_specification_id"]) == UUID(spec["service_specification"]["id"])