feat: add x-plan-decomposition Service Plan metadata extension #212
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
phoenix-oss/open-service-broker!212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/x-iaas-decomposition"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Proposal —
x-plan-decompositionService Plan metadata extensionThis PR enhances the broker schema with the
x-plan-decompositionvendor extension. A Service Plan may declare the other Service Plans it is composed of and how many units of each it consumes per one unit of the plan. The extension is generic — the referenced plans are most commonly IaaS plans, but it is not restricted to them.The composition is informational and platform-internal — consumed by the platform (principally the invoicing module) and not surfaced to end users.
Refs: phoenix/tenant-portal#515
Specification basis
The extension is an extra key inside the Service Plan
metadataobject, which the specification explicitly allows:spec.md§ Service Plan Object:metadatais "an opaque object of metadata … Platforms will treat this as a blob."profile.md§ Service Metadata: "the specification does not mandate the property names used in themetadataobjects" — the listed names are only RECOMMENDED.spec.md§ Vendor Extension Fields: a unique prefix (x-) reduces clashes, and receivers MUST ignore unknown fields.Shape
services[].plans[].metadata.x-plan-decompositionx-plan-decomposition[].planIdSERVICE.PLANconvention), e.g.PHOENIQS_INFRA.COMPUTE_CPU.[].quantity> 0; fractional allowed.Changes
open-service-broker-model— newPlanDecompositionrecord;ServicePlanMetadatagains the optionalx-plan-decompositioncomponent. A backward-compatible constructor is kept, so existing positional callers (osb-core, osb-catalog, osb-maas, kvant-api, …) keep compiling.open-service-broker-api— no production code change: the extension flows through the shared model. Integration tests added:GET /v2/catalogexposes the extension, and it appears in the generated OpenAPI schema.docs— new proposaldocs/proposals/x-plan-decomposition.md, linked from the README.Module impact
open-service-broker-modelPlanDecompositionrecord +x-plan-decompositiononServicePlanMetadata.open-service-broker-apiopen-service-broker-clientCatalogthrough the shared model and carries the extension transparently.open-service-broker-schema-validatorschemas.*.parameters), not planmetadata.Compatibility
Testing
./mvnw verifyis green across all modules. New coverage:PlanDecompositionTest(4),ServicePlanMetadataTest(+2 — serialize/deserialize with the extension, fractional quantity),CatalogResourceTest(+2 — catalog exposure and OpenAPI documentation).feat: add x-iaas-decomposition Service Plan metadata extensionto feat: add x-plan-decomposition Service Plan metadata extensionSuperseded by #214 — the extension was renamed from
x-iaas-decompositiontox-plan-decompositionto make it generic (not IaaS-only). Same content, branchfeat/x-plan-decomposition.Pull request closed